review.vue 6.4 KB

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