PrefectInfo.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. 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. console.log(customInfo.value)
  50. router.push({
  51. path:'/pages/mine/improveImmediately'
  52. })
  53. }
  54. function initStatus() {
  55. dialogCheck.value.close()
  56. }
  57. onMounted(() => {
  58. if (info.value.status == 2|| [1,2].includes(info.value.applyRealStatus)) {
  59. // dialogCheck.value.open()
  60. }else{
  61. // dialogCheck.value.close()
  62. }
  63. })
  64. </script>
  65. <style scoped lang="scss">
  66. @import "@/uni.scss";
  67. .PerfectInfo {
  68. width: 100%;
  69. padding: px2rpx(16);
  70. background-color: #fff9eb;
  71. .content {
  72. width: 100%;
  73. display: flex;
  74. align-items: center;
  75. height: px2rpx(40);
  76. flex: 1;
  77. .icon{
  78. margin-right: 10px;
  79. }
  80. //justify-content: center;
  81. .title {
  82. font-weight: 400;
  83. line-height: px2rpx(24);
  84. font-size: px2rpx(16);
  85. letter-spacing: 0px;
  86. }
  87. }
  88. .btn-improve {
  89. width: px2rpx(120);
  90. height: px2rpx(40);
  91. background-color: #ffde02;
  92. line-height: px2rpx(40);
  93. font-size: px2rpx(14);
  94. margin: 0;
  95. }
  96. }
  97. </style>