Browse Source

信息修改

1002884655 3 years ago
parent
commit
1a187ed689
2 changed files with 10 additions and 11 deletions
  1. 3
    8
      src/components/MainPage/index.vue
  2. 7
    3
      src/pages/Mine/MyInfo/index.vue

+ 3
- 8
src/components/MainPage/index.vue View File

169
       })
169
       })
170
     },
170
     },
171
     GetUserPhone (e) {
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
       for (let key in this.WxInfoData) {
176
       for (let key in this.WxInfoData) {
177
         this.WxInfoData[key] = e.detail[key]
177
         this.WxInfoData[key] = e.detail[key]
178
       }
178
       }
179
       this.WxGetPhoneAuth({ data: { data: { ...this.WxInfoData, sessionKey: this.UserInfo.sessionKey } } }).then((res) => {
179
       this.WxGetPhoneAuth({ data: { data: { ...this.WxInfoData, sessionKey: this.UserInfo.sessionKey } } }).then((res) => {
180
         if (res.data.data.phone) {
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
           this.EditUserInfo({ name: 'phone', value: res.data.data.phone })
181
           this.EditUserInfo({ name: 'phone', value: res.data.data.phone })
187
           this.ShowPhoneAuthPopup = false
182
           this.ShowPhoneAuthPopup = false
188
           this.$emit('UserInfoChange')
183
           this.$emit('UserInfoChange')

+ 7
- 3
src/pages/Mine/MyInfo/index.vue View File

153
     Init () {
153
     Init () {
154
       if (this.UserInfo !== null) {
154
       if (this.UserInfo !== null) {
155
         for (let key in this.Form) {
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
       if (this.Student !== null) {
161
       if (this.Student !== null) {
160
         for (let key in this.Form) {
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
     SexChange (e) {
169
     SexChange (e) {
166
       this.SexList.map((item, index) => {
170
       this.SexList.map((item, index) => {
167
-        if(item.id === e.id) {
171
+        if (item.id === e.id) {
168
           this.SexIndex = index
172
           this.SexIndex = index
169
         }
173
         }
170
       })
174
       })