PrefectInfo.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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 useUserStore from '@/stores/use-user-store'
  30. import useRouter from '@/hooks/useRouter'
  31. import useRoute from '@/hooks/useRoute'
  32. const router = useRouter()
  33. const route = useRoute()
  34. const { userInfo } = useUserStore()
  35. const { t } = useI18n()
  36. // 认证弹窗,
  37. const dialogCheck = ref(null)
  38. const customInfo = computed(() => {
  39. return userInfo.customInfo
  40. })
  41. const isPerfectInfo = computed(() => {
  42. const {status,applyRealStatus} = userInfo.customInfo
  43. console.log(route)
  44. return !(status == 2 || applyRealStatus == 1|| applyRealStatus ==2) && route.path != '/pages/mine/improveImmediately'
  45. })
  46. const info = computed(() => {
  47. return userInfo.customInfo
  48. })
  49. function immediately() {
  50. console.log(customInfo.value)
  51. router.push({
  52. path:'/pages/mine/improveImmediately'
  53. })
  54. }
  55. function initStatus() {
  56. dialogCheck.value.close()
  57. }
  58. onMounted(() => {
  59. if (info.value.status == 2|| [1,2].includes(info.value.applyRealStatus)) {
  60. // dialogCheck.value.open()
  61. }else{
  62. // dialogCheck.value.close()
  63. }
  64. })
  65. </script>
  66. <style scoped lang="scss">
  67. @import "@/uni.scss";
  68. .PerfectInfo {
  69. width: 100%;
  70. padding: px2rpx(16);
  71. background-color: #fff9eb;
  72. .content {
  73. width: 100%;
  74. display: flex;
  75. align-items: center;
  76. height: px2rpx(40);
  77. flex: 1;
  78. .icon{
  79. margin-right: 10px;
  80. }
  81. //justify-content: center;
  82. .title {
  83. font-weight: 400;
  84. line-height: px2rpx(24);
  85. font-size: px2rpx(16);
  86. letter-spacing: 0px;
  87. }
  88. }
  89. .btn-improve {
  90. width: px2rpx(120);
  91. height: px2rpx(40);
  92. background-color: #ffde02;
  93. line-height: px2rpx(40);
  94. font-size: px2rpx(14);
  95. margin: 0;
  96. }
  97. }
  98. </style>