Browse Source

重新发起

lifanagju_citu 11 months ago
parent
commit
4a98f1c05f
2 changed files with 25 additions and 18 deletions
  1. 0 1
      src/layout/personal/navBar.vue
  2. 25 17
      src/views/enterprise/components/inReview.vue

+ 0 - 1
src/layout/personal/navBar.vue

@@ -144,7 +144,6 @@ const changeLoginType = async () => {
 const getApplyInfo = async () => {
   const data = await getUserRegisterEnterpriseApply()
   const bool = data && Object.keys(data).length // 已经有数据说明已经申请过了
-  localStorage.setItem('userApplyInfo', JSON.stringify(data))
   const path = bool ? '/enterprise/inReview' : '/enterprise/register'
   router.push({ path })
 }

+ 25 - 17
src/views/enterprise/components/inReview.vue

@@ -9,34 +9,34 @@
         </div>
 
         <!-- 等待审核 -->
-        <div v-else-if="status === '0'">
+        <div v-else-if="info.status === '0'">
           <span>您的申请正在审核中,审核时间在1~3个工作日内,申请结果会以短信方式通知到您的手机上,请注意查收</span>
           <div class="mt-5">
-            <span>提交时间:{{ commitTime }}</span>
+            <span>提交时间:{{ info.info.createTime }}</span>
           </div>
         </div>
 
         <!-- 审核不通过 -->
-        <div v-else-if="status === '2'">
+        <div v-else-if="info.status === '2'">
           <div class="mb-3" style="color: red;">审核不通过</div>
-          <div class="mb-3">原因:{{ reason }}</div>
-          <div v-if="remark">备注:{{ remark }}</div>
+          <div class="mb-3">原因:{{ info.reason }}</div>
+          <div v-if="info.remark">备注:{{ info.remark }}</div>
+          <!-- <div class="mt-5">
+            <span>审核时间:{{ updateTime }}</span>
+          </div> -->
           <div class="mt-5">
-            <span>更新时间:{{ updateTime }}</span>
-          </div>
-          <div class="mt-5">
-            <span>提交时间:{{ commitTime }}</span>
+            <span>提交时间:{{ info.info.createTime }}</span>
           </div>
         </div>
 
         <!-- 审核通过(审核通过不会进入此页面) -->
-        <div v-else-if="status === '1'">
+        <div v-else-if="info.status === '1'">
           <span>审核通过</span>
         </div>
         
         <div class="text-center">
           <v-btn class="mt-16" color="warning" to="/">{{ $t('common.toHome') }}</v-btn>
-          <v-btn class="mt-16 ml-12" color="primary" to="/enterprise/register">{{ $t('common.resubmit') }}</v-btn>
+          <v-btn v-if="info.status === '2'" class="mt-16 ml-12" color="primary" to="/enterprise/register">{{ $t('common.resubmit') }}</v-btn>
         </div>
       </div>
     </v-card>
@@ -46,15 +46,23 @@
 <script setup>
 import { ref } from 'vue';
 import { timesTampChange } from '@/utils/date'
+import { getUserRegisterEnterpriseApply } from '@/api/personal/user'
 defineOptions({name: 'enterprise-enterpriseRegister-inReview'})
 
+const info = ref({})
+
+// 查看用户是否有在申请中的数据
+const getApplyInfo = async () => {
+  const data = await getUserRegisterEnterpriseApply() // 已经有数据说明已经申请过了
+  localStorage.setItem('userApplyInfo', JSON.stringify(data))
+  info.value.info.createTime = ref(data?.createTime ? timesTampChange(data.createTime) : null) // 创建时间
+  // updateTime = ref(data?.createTime ? timesTampChange(data.updateTime) : null) // 更新时间
+  info.value.status = ref(data?.status) // 帐号状态(0正常 1停用 2 等待审核 3不通过) // 审核状态
+  info.value.reason = ref(data?.reason) // 审核原因
+  info.value.remark = ref(data?.remark) // 备注
+}
+getApplyInfo()
 
-const info = JSON.parse(localStorage.getItem('userApplyInfo'))
-const commitTime = ref(info?.createTime ? timesTampChange(info.createTime) : null) // 创建时间
-const updateTime = ref(info?.createTime ? timesTampChange(info.updateTime) : null) // 更新时间
-const status = ref(info?.status) // 帐号状态(0正常 1停用 2 等待审核 3不通过) // 审核状态
-const reason = ref(info?.reason) // 审核原因
-const remark = ref(info?.remark) // 备注
 </script>
 <style lang="scss" scoped>
 </style>