PrefectInfo.vue 2.9 KB

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