1002884655 3 vuotta sitten
vanhempi
commit
1a187ed689
2 muutettua tiedostoa jossa 10 lisäystä ja 11 poistoa
  1. 3
    8
      src/components/MainPage/index.vue
  2. 7
    3
      src/pages/Mine/MyInfo/index.vue

+ 3
- 8
src/components/MainPage/index.vue Näytä tiedosto

@@ -169,20 +169,15 @@ export default {
169 169
       })
170 170
     },
171 171
     GetUserPhone (e) {
172
-      if (e.detail.errMsg !== 'getPhoneNumber:ok') {
173
-        return
174
-      }
172
+      // if (e.detail.errMsg !== 'getPhoneNumber:ok') {
173
+      //   return
174
+      // }
175 175
 
176 176
       for (let key in this.WxInfoData) {
177 177
         this.WxInfoData[key] = e.detail[key]
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
-          // })
186 181
           this.EditUserInfo({ name: 'phone', value: res.data.data.phone })
187 182
           this.ShowPhoneAuthPopup = false
188 183
           this.$emit('UserInfoChange')

+ 7
- 3
src/pages/Mine/MyInfo/index.vue Näytä tiedosto

@@ -153,18 +153,22 @@ export default {
153 153
     Init () {
154 154
       if (this.UserInfo !== null) {
155 155
         for (let key in this.Form) {
156
-          this.Form[key] = this.UserInfo[key]
156
+          if (this.UserInfo[key]) {
157
+            this.Form[key] = this.UserInfo[key]
158
+          }
157 159
         }
158 160
       }
159 161
       if (this.Student !== null) {
160 162
         for (let key in this.Form) {
161
-          this.Form[key] = this.Student[key]
163
+          if (this.Student[key]) {
164
+            this.Form[key] = this.Student[key]
165
+          }
162 166
         }
163 167
       }
164 168
     },
165 169
     SexChange (e) {
166 170
       this.SexList.map((item, index) => {
167
-        if(item.id === e.id) {
171
+        if (item.id === e.id) {
168 172
           this.SexIndex = index
169 173
         }
170 174
       })