lex 2 سال پیش
والد
کامیت
b7fe8eb1a8
2فایلهای تغییر یافته به همراه23 افزوده شده و 19 حذف شده
  1. 5 3
      public/project/initiation.html
  2. 18 16
      public/project/preRegister.html

+ 5 - 3
public/project/initiation.html

@@ -337,7 +337,8 @@
           },
           btnLoading: false,
           checkPhone: true,
-          showPopup: false
+          showPopup: false,
+          code: '',
         }
       },
       async mounted() {
@@ -357,7 +358,7 @@
             this.getAppIdAndCode(window.location.href)
             return
           } else {
-            state.code = code
+            this.code = code
           }
         }
 
@@ -479,7 +480,8 @@
               schoolId: this.schoolId,
               ...stu,
               currentClass: stu.currentClassNum,
-              currentGrade: stu.currentGradeNum
+              currentGrade: stu.currentGradeNum,
+              code: this.code,
             })
             console.log(res)
             if (res.data.code === 200) {

+ 18 - 16
public/project/preRegister.html

@@ -354,7 +354,8 @@
           },
           btnLoading: false,
           checkPhone: true,
-          showPopup: false
+          showPopup: false,
+          code: ''
         }
       },
       async mounted() {
@@ -363,20 +364,20 @@
         }
 
         // 判断是否是微信,只能微信中打开
-        // if (!browser().weixin) {
-        //   this.showPopup = true
-        //   return
-        // } else {
-        //   //授权
-        //   const code = getUrlCode()
-        //   console.log(code)
-        //   if (!code) {
-        //     this.getAppIdAndCode(window.location.href)
-        //     return
-        //   } else {
-        //     state.code = code
-        //   }
-        // }
+        if (!browser().weixin) {
+          this.showPopup = true
+          return
+        } else {
+          //授权
+          const code = getUrlCode()
+          console.log(code)
+          if (!code) {
+            this.getAppIdAndCode(window.location.href)
+            return
+          } else {
+            this.code = code
+          }
+        }
 
         if (!this.orchestraId) {
           vant.showToast('信息获取失败,请联系老师')
@@ -535,7 +536,8 @@
               ...stu,
               currentClass: stu.currentClassNum,
               currentGrade: stu.currentGradeNum,
-              registerSubjectId: stu.registerSubjectNum
+              registerSubjectId: stu.registerSubjectNum,
+              code: this.code
             })
             if (res.data.code === 200) {
               this.submitStatus = true