学员端小程序
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.

74 lines
2.1 KiB

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