PrefectInfo.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <view class="PerfectInfo" v-if="isPerfectInfo">
  3. <!-- <i class="iconfont icondengpao"></i>-->
  4. <uni-row>
  5. <uni-col :xs="24" :sm="24" :md="16" :lg="16" :xl="16">
  6. <view class="content">
  7. <view class="icon">
  8. <cwg-icon color="#333" icon="crm-user-pen" />
  9. </view>
  10. <view class="title">
  11. {{ t('Home.msg.content') }}
  12. </view>
  13. </view>
  14. </uni-col>
  15. <uni-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8">
  16. <button
  17. class="btn-improve"
  18. @click="immediately"
  19. >
  20. {{ t('Home.msg.btn') }}
  21. </button>
  22. </uni-col>
  23. </uni-row>
  24. </view>
  25. </template>
  26. <script setup lang="ts">
  27. import { computed, ref,onMounted } from 'vue'
  28. import { useI18n } from 'vue-i18n'
  29. import useGlobalStore from '@/stores/use-global-store'
  30. import useUserStore from '@/stores/use-user-store'
  31. import useRouter from '@/hooks/useRouter'
  32. import useRoute from '@/hooks/useRoute'
  33. const router = useRouter()
  34. const route = useRoute()
  35. const { userInfo } = useUserStore()
  36. const { setApplyStatus } = useGlobalStore()
  37. const { t } = useI18n()
  38. // 认证弹窗,
  39. const dialogCheck = ref(null)
  40. const isPerfectInfo = computed(() => {
  41. const {status,applyRealStatus} = userInfo.customInfo
  42. setApplyStatus(!(status == 2 || applyRealStatus == 1|| applyRealStatus ==2))
  43. return !(status == 2 || applyRealStatus == 1|| applyRealStatus ==2) && route.path != '/pages/mine/improveImmediately'
  44. })
  45. const info = computed(() => {
  46. return userInfo.customInfo
  47. })
  48. function immediately() {
  49. router.push({
  50. path:'/pages/mine/improveImmediately'
  51. })
  52. }
  53. function initStatus() {
  54. dialogCheck.value.close()
  55. }
  56. onMounted(() => {
  57. if (info.value.status == 2|| [1,2].includes(info.value.applyRealStatus)) {
  58. // dialogCheck.value.open()
  59. }else{
  60. // dialogCheck.value.close()
  61. }
  62. })
  63. </script>
  64. <style scoped lang="scss">
  65. @import "@/uni.scss";
  66. .PerfectInfo {
  67. width: 100%;
  68. padding: px2rpx(16);
  69. background-color: #fff9eb;
  70. .content {
  71. width: 100%;
  72. display: flex;
  73. align-items: center;
  74. height: px2rpx(40);
  75. flex: 1;
  76. .icon{
  77. margin-right: 10px;
  78. }
  79. //justify-content: center;
  80. .title {
  81. font-weight: 400;
  82. line-height: px2rpx(24);
  83. font-size: px2rpx(16);
  84. letter-spacing: 0px;
  85. }
  86. }
  87. .btn-improve {
  88. width: px2rpx(120);
  89. height: px2rpx(40);
  90. background-color: #ffde02;
  91. line-height: px2rpx(40);
  92. font-size: px2rpx(14);
  93. margin: 0;
  94. }
  95. }
  96. </style>