review.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <template>
  2. <view v-if="show" style="padding: 15px;">
  3. <!-- 等待审核 -->
  4. <view v-if="applyInfo?.status === '0'">
  5. <view class="d-flex flex-column align-center">
  6. <image src="/static/svg/submit.svg" style="height: 200px; width: "></image>
  7. </view>
  8. <view>
  9. 您的企业账号申请<span class="color-primary font-size-20 font-weight-bold"> 正在审核中,</span>审核时间在1~3个工作日内,申请结果会以短信方式通知到您的手机上,请注意查收。
  10. </view>
  11. <view class="ss-m-t-30">
  12. <span>提交时间:{{ applyInfo.createTime }}</span>
  13. </view>
  14. <view style="width: 100%;">
  15. <view class="mt-5 mb-1">如有疑问请长按二维码添加下方企业微信联系我们:</view>
  16. <view style="width: 150px; height: 150px; margin: auto;">
  17. <image show-menu-by-longpress="true" src="https://minio.menduner.com/dev/menduner/contact.png" style="width: 150px; height: 150px;"></image>
  18. </view>
  19. <view class="text-center ml-5">潘青海先生(Peter Pan)</view>
  20. </view>
  21. </view>
  22. <!-- 审核不通过 -->
  23. <view v-else-if="applyInfo?.status === '2'" class="ss-m-b-100">
  24. <view class="ss-m-b-20 color-error">
  25. 您的企业账号注册申请<span class="color-error font-size-20 font-weight-bold"> 审核不通过</span>
  26. </view>
  27. <view class="ss-m-b-20 color-error">具体原因如下:{{ applyInfo.reason }}</view>
  28. <view v-if="applyInfo.remark">备注:{{ applyInfo.remark }}</view>
  29. <view class="mt-5">
  30. <span>审核时间:{{ applyInfo.updateTime }}</span>
  31. </view>
  32. <view>
  33. <span>提交时间:{{ applyInfo.createTime }}</span>
  34. </view>
  35. <view style="width: 100%;">
  36. <view class="mt-5 mb-1">如有疑问请长按二维码添加下方企业微信联系我们:</view>
  37. <view style="width: 150px; height: 150px; margin: auto;">
  38. <image show-menu-by-longpress="true" src="https://minio.menduner.com/dev/menduner/contact.png" style="width: 150px; height: 150px;"></image>
  39. </view>
  40. <view class="text-center ml-5">潘青海先生(Peter Pan)</view>
  41. </view>
  42. </view>
  43. <!-- 提交企业注册以后跳转显示页面 -->
  44. <view v-else>
  45. <view class="d-flex flex-column align-center">
  46. <image src="/static/svg/submit.svg" style="height: 200px; width: "></image>
  47. </view>
  48. <view style="text-align: center;"><span class="color-primary font-size-20 font-weight-bold">您的企业注册申请已提交</span></view>
  49. <view class="mt-5">审核时间预计在1~3个工作日内,申请结果会以短信方式通知到您的手机上,请注意查收。</view>
  50. <view style="width: 100%;">
  51. <view class="mt-5 mb-1">如有疑问请长按二维码添加下方企业微信联系我们:</view>
  52. <view style="width: 150px; height: 150px; margin: auto;">
  53. <image show-menu-by-longpress="true" src="https://minio.menduner.com/dev/menduner/contact.png" style="width: 150px; height: 150px;"></image>
  54. </view>
  55. <view class="text-center ml-5">潘青海先生(Peter Pan)</view>
  56. </view>
  57. </view>
  58. <view class="d-flex align-center">
  59. <!-- <button :class="{'second-button': applyInfo.status === '2', 'send-button': applyInfo.status !== '2'}" @tap="handleToHome">回到首页</button> -->
  60. <button v-if="applyInfo.status === '2'" class="recomm-button" @tap="handleConfirm">重新提交</button>
  61. </view>
  62. </view>
  63. </template>
  64. <script setup>
  65. import { ref } from 'vue'
  66. import { getUserRegisterEnterpriseApply } from '@/api/enterprise.js'
  67. import { timesTampChange } from '@/utils/date'
  68. import { onLoad } from '@dcloudio/uni-app'
  69. import { userStore } from '@/store/user'
  70. const user = userStore()
  71. const applyInfo = ref({})
  72. const show = ref(false)
  73. // 查看用户是否有在申请中的数据
  74. const getApplyInfo = async () => {
  75. // 已经有数据说明已经申请过了
  76. let result = {}
  77. if (hasData && uni.getStorageSync('entRegisterData')) {
  78. result = JSON.parse(uni.getStorageSync('entRegisterData'))
  79. } else {
  80. const { data } = await getUserRegisterEnterpriseApply()
  81. result = data || {}
  82. uni.setStorageSync('applyInfo', JSON.stringify(result))
  83. }
  84. applyInfo.value = {
  85. phone: result.phone,
  86. createTime: timesTampChange(result.createTime), // 创建时间
  87. updateTime: timesTampChange(result.updateTime), // 更新时间
  88. status: result.status, // 审核状态(0审核中 1审核通过 2审核不通过)) // 审核状态
  89. reason: result.reason, // 审核原因
  90. remark: result.remark // 备注
  91. }
  92. console.log(result, 'review----查看是否有申请中的数据', applyInfo.value)
  93. show.value = true
  94. }
  95. let hasData = false
  96. onLoad((options) => {
  97. hasData = options?.hasData ? true : false
  98. getApplyInfo()
  99. })
  100. // 回到首页时需将当前个人登录状态及缓存中的数据清除
  101. const handleToHome = async () => {
  102. await user.handleUserLogout()
  103. uni.reLaunch({
  104. url: '/pages/index/my'
  105. })
  106. }
  107. const handleConfirm = () => {
  108. if (uni.getStorageSync('token') && uni.getStorageSync('isPersonalToken')) {
  109. uni.navigateTo({ url: '/pages/register/index' })
  110. return
  111. }
  112. uni.reLaunch({
  113. url: `/pages/register/phoneValidate?phone=${applyInfo.value?.phone}`
  114. })
  115. }
  116. </script>
  117. <style scoped lang="scss">
  118. </style>