review.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <view style="padding: 15px;">
  3. <!-- 提交企业注册以后跳转显示页面 -->
  4. <view v-if="!applyInfo?.status">
  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 style="text-align: center;"><span class="color-primary font-size-20 font-weight-bold">您的企业注册申请已提交</span></view>
  9. <view class="mt-5">审核时间预计在1~3个工作日内,申请结果会以短信方式通知到您的手机上,请注意查收。</view>
  10. <view style="width: 100%;">
  11. <view class="mt-5 mb-1">如有疑问请长按二维码添加下方企业微信联系我们:</view>
  12. <view style="width: 150px; height: 150px; margin: auto;">
  13. <image show-menu-by-longpress="true" src="https://minio.menduner.com/dev/menduner/contact.png" style="width: 150px; height: 150px;"></image>
  14. </view>
  15. <view class="text-center ml-5">潘青海先生(Peter Pan)</view>
  16. </view>
  17. </view>
  18. <!-- 等待审核 -->
  19. <view v-else-if="applyInfo?.status === '0'">
  20. <view class="d-flex flex-column align-center">
  21. <image src="/static/svg/submit.svg" style="height: 200px; width: "></image>
  22. </view>
  23. <view>
  24. 您的企业账号申请<span class="color-primary font-size-20 font-weight-bold"> 正在审核中,</span>审核时间在1~3个工作日内,申请结果会以短信方式通知到您的手机上,请注意查收。
  25. </view>
  26. <view class="ss-m-t-30">
  27. <span>提交时间:{{ applyInfo.createTime }}</span>
  28. </view>
  29. <view style="width: 100%;">
  30. <view class="mt-5 mb-1">如有疑问请长按二维码添加下方企业微信联系我们:</view>
  31. <view style="width: 150px; height: 150px; margin: auto;">
  32. <image show-menu-by-longpress="true" src="https://minio.menduner.com/dev/menduner/contact.png" style="width: 150px; height: 150px;"></image>
  33. </view>
  34. <view class="text-center ml-5">潘青海先生(Peter Pan)</view>
  35. </view>
  36. </view>
  37. <!-- 审核不通过 -->
  38. <view v-else-if="applyInfo?.status === '2'" class="ss-m-b-100">
  39. <view class="ss-m-b-20 color-error">
  40. 您的企业账号注册申请<span class="color-error font-size-20 font-weight-bold"> 审核不通过</span>
  41. </view>
  42. <view class="ss-m-b-20 color-error">具体原因如下:{{ applyInfo.reason }}</view>
  43. <view v-if="applyInfo.remark">备注:{{ applyInfo.remark }}</view>
  44. <view class="mt-5">
  45. <span>审核时间:{{ applyInfo.updateTime }}</span>
  46. </view>
  47. <view>
  48. <span>提交时间:{{ applyInfo.createTime }}</span>
  49. </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>
  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. <button class="recomm-button" @tap="refresh">刷新结果</button>
  62. </view>
  63. </view>
  64. </template>
  65. <script setup>
  66. import { ref } from 'vue'
  67. import { getUserRegisterEnterpriseApply } from '@/api/enterprise.js'
  68. import { timesTampChange } from '@/utils/date'
  69. import { onLoad } from '@dcloudio/uni-app'
  70. import { userStore } from '@/store/user'
  71. const user = userStore()
  72. const applyInfo = ref({})
  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('entRegisterData', 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. }
  94. let hasData = false
  95. onLoad((options) => {
  96. hasData = options?.hasData ? true : false
  97. // 刚提交审核,只显示提交页面,不查询审核状态,刷新后再显示申请状态
  98. if (options?.applySubmit) return
  99. getApplyInfo()
  100. })
  101. const refresh = async () => {
  102. hasData = false
  103. await getApplyInfo()
  104. uni.showToast({ title: '刷新成功', icon: 'success', duration: 1500 })
  105. }
  106. // 回到首页时需将当前个人登录状态及缓存中的数据清除
  107. const handleToHome = async () => {
  108. await user.handleUserLogout()
  109. uni.reLaunch({
  110. url: '/pages/index/my'
  111. })
  112. }
  113. const handleConfirm = () => {
  114. if (uni.getStorageSync('token') && uni.getStorageSync('isPersonalToken')) {
  115. uni.navigateTo({ url: '/pages/register/index' })
  116. return
  117. }
  118. uni.reLaunch({
  119. url: `/pages/register/phoneValidate?phone=${applyInfo.value?.phone}`
  120. })
  121. }
  122. </script>
  123. <style scoped lang="scss">
  124. </style>