PrefectInfo.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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 } 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. const customInfo = computed(() => {
  37. return userInfo.customInfo
  38. })
  39. const isPerfectInfo = computed(() => {
  40. const {status,applyRealStatus} = userInfo.customInfo
  41. console.log(route)
  42. return (status === 2 || applyRealStatus == 1|| applyRealStatus ==2) && route.path != '/pages/mine/improveImmediately'
  43. })
  44. function immediately() {
  45. console.log(customInfo.value)
  46. router.push({
  47. path:'/pages/mine/improveImmediately'
  48. })
  49. }
  50. </script>
  51. <style scoped lang="scss">
  52. @import "@/uni.scss";
  53. .PerfectInfo {
  54. width: 100%;
  55. padding: px2rpx(16);
  56. background-color: #fff9eb;
  57. .content {
  58. width: 100%;
  59. display: flex;
  60. align-items: center;
  61. height: px2rpx(40);
  62. flex: 1;
  63. .icon{
  64. margin-right: 10px;
  65. }
  66. //justify-content: center;
  67. .title {
  68. font-weight: 400;
  69. line-height: px2rpx(24);
  70. font-size: px2rpx(16);
  71. letter-spacing: 0px;
  72. }
  73. }
  74. .btn-improve {
  75. width: px2rpx(120);
  76. height: px2rpx(40);
  77. background-color: #ffde02;
  78. line-height: px2rpx(40);
  79. font-size: px2rpx(14);
  80. margin: 0;
  81. }
  82. }
  83. </style>