学员端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.2 KiB

1 year ago
1 year ago
1 year ago
12 months ago
1 year ago
12 months ago
12 months ago
12 months ago
1 year ago
12 months ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="pageBgImg">
  3. <topNavbar title="实名认证"></topNavbar>
  4. </view>
  5. </template>
  6. <script>
  7. import { GetDetectInfoEnhanced, getbiztoken } from '@/config/api.js'
  8. import { website } from '@/config/site.config.js'
  9. export default {
  10. data() {
  11. return {
  12. userId: ''
  13. }
  14. },
  15. onLoad(options) {
  16. alert(options.userId)
  17. alert(options.test)
  18. const routeInfo = this.$route;
  19. console.log('当前页面路由信息:', routeInfo);
  20. const fullPath = '/' + routeInfo.path + '?' + Object.keys(routeInfo.query).map(key => key + '=' + routeInfo.query[key]).join('&');
  21. console.log('当前页面全路径:', fullPath);
  22. alert(fullPath)
  23. alert(routeInfo.query.userId)
  24. alert(routeInfo.query.test)
  25. if(options.userId) {
  26. this.userId = options.userId
  27. this.GetDetectInfoEnhancedFn()
  28. }
  29. },
  30. onPullDownRefresh() {
  31. this.GetDetectInfoEnhancedFn()
  32. },
  33. methods: {
  34. async GetDetectInfoEnhancedFn() {
  35. const data = await getbiztoken({ userId: this.userId})
  36. // alert(this.$store.state.school.BizToken)
  37. uni.showLoading({
  38. title: '正在检测中...'
  39. })
  40. let redirectUrl = website + '/pages/indexEntry/enroll/registInfo/registInfo'
  41. if(this.$store.state.user.NonPlatformStudent) {
  42. redirectUrl = website + '/pages/indexEntry/NonPlatformStudent/NonPlatformStudent'
  43. }
  44. let obj = {
  45. ruleId: 1,
  46. redirectUrl,
  47. bizToken: data.data,
  48. userId: this.userId
  49. }
  50. const res = await GetDetectInfoEnhanced(obj)
  51. // alert(res.msg)
  52. // if(!res.msg) return false
  53. let obj2 = JSON.parse(res.data)
  54. await this.$store.dispatch('getUserInfo')
  55. uni.hideLoading()
  56. if (process.env.VUE_APP_PLATFORM === 'h5') {
  57. window.close(); // 关闭当前页面
  58. } else {
  59. // 处理其他平台下的关闭逻辑
  60. console.log('当前不是 H5 环境,无法关闭页面');
  61. }
  62. if(obj2.Text.ErrMsg=='成功') {
  63. this.$goPage('/pages/indexEntry/enroll/registInfo/registInfo')
  64. }
  65. // console.log(obj2)
  66. // alert('请求结果来了')
  67. // alert(obj2.Text.ErrMsg)
  68. // alert(obj2.Text.name)
  69. // uni.setStorageSync(obj2)
  70. },
  71. }
  72. }
  73. </script>
  74. <style>
  75. </style>