1002884655 пре 3 година
родитељ
комит
0b66c82655
2 измењених фајлова са 9 додато и 6 уклоњено
  1. 7
    5
      src/components/MainPage/index.vue
  2. 2
    1
      src/pages/Index/BookDetail/index.vue

+ 7
- 5
src/components/MainPage/index.vue Прегледај датотеку

@@ -178,11 +178,13 @@ export default {
178 178
       }
179 179
       this.WxGetPhoneAuth({ data: { data: { ...this.WxInfoData, sessionKey: this.UserInfo.sessionKey } } }).then((res) => {
180 180
         if (res.data.data.phone) {
181
-          this.PutUserInfo({ data: { data: { phone: res.data.data.phone, personId: this.UserInfo.personId } } }).then(() => {
182
-            this.EditUserInfo({ name: 'phone', value: res.data.data.phone })
183
-            this.ShowPhoneAuthPopup = false
184
-            this.$emit('UserInfoChange')
185
-          })
181
+          // this.PutUserInfo({ data: { data: { phone: res.data.data.phone, personId: this.UserInfo.personId } } }).then(() => {
182
+          //   this.EditUserInfo({ name: 'phone', value: res.data.data.phone })
183
+          //   this.ShowPhoneAuthPopup = false
184
+          //   this.$emit('UserInfoChange')
185
+          // })
186
+          this.ShowPhoneAuthPopup = false
187
+          this.$emit('UserInfoChange')
186 188
         } else {
187 189
           wx.showToast({
188 190
             title: '获取手机号失败',

+ 2
- 1
src/pages/Index/BookDetail/index.vue Прегледај датотеку

@@ -103,7 +103,7 @@ export default {
103 103
   computed: {
104 104
     ...mapUserState({
105 105
       UserInfo: x => x.UserInfo, // 用户信息
106
-      Student: x => x.UserInfo.student, // 用户信息
106
+      Student: x => x.UserInfo?.student || {}, // 用户信息
107 107
     })
108 108
   },
109 109
   components: {
@@ -143,6 +143,7 @@ export default {
143 143
           this.$refs.MainPage.HideLoading()
144 144
         })
145 145
 
146
+        // if (!this.Student?.studentId) {
146 147
         if (!this.UserInfo?.student?.studentId) {
147 148
           if (this.$refs.MainPage) {
148 149
             this.$refs.MainPage.ShowStudentIdPopup = true