ccjgmwz 3 年之前
父节点
当前提交
6aecab8bed
共有 3 个文件被更改,包括 16 次插入13 次删除
  1. 6 1
      pageD/identity/companyIdentityThree.vue
  2. 6 9
      pages/user/set_nickname.vue
  3. 4 3
      pages/user/user.vue

+ 6 - 1
pageD/identity/companyIdentityThree.vue

@@ -337,7 +337,12 @@
 						verifyCode: this.verifyCode
 					}).then(res => {
 						if (res.data.code == 200) {
-							that.identityAuthenticationInfo.commonId = that.userInfo.id
+							if(that.userInfo){
+								that.identityAuthenticationInfo.commonId = that.userInfo.id
+							}
+							else{
+								that.identityAuthenticationInfo.commonId = res.data.data.id
+							}
 							that.identityAuthenticationInfo.payeeAddressUrl = that.bankid.toString()
 							that.identityAuthenticationInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
 							uni.showModal({

+ 6 - 9
pages/user/set_nickname.vue

@@ -49,15 +49,12 @@
 							that.deptListurl.id = that.userInfo.id
 							that.$api.doRequest('post', '/commonUser/editUserInfo', that.deptListurl).then(res => {
 								if (res.data.code == 200) {
-								// this.$api.msg('修改成功!')
-								var _student = wx.getStorageSync('userInfo');
-								_student.userName = that.nickname;
-								wx.setStorageSync('userInfo', _student);
-								
-									uni.navigateTo({
-										url: `/pages/user/setUp`
-									})
-									}
+									// this.$api.msg('修改成功!')
+									var _student = uni.getStorageSync('userInfo');
+									_student.userName = that.nickname;
+									uni.setStorageSync('userInfo', _student);
+									uni.navigateBack()
+								}
 								})
 								.catch(res => {
 									uni.showToast({

+ 4 - 3
pages/user/user.vue

@@ -268,11 +268,12 @@
 			}else{
 				this.headUrl = this.userInfo.avatarUrl
 			}
-			if(!this.username){
-				this.username = "请更改昵称"
+			console.log("this.userInfo",this.userInfo)
+			if(this.userInfo.userName){
+				this.username = this.userInfo.userName
 			}
 			else{
-				this.username = this.userInfo.userName
+				this.username = "请更改昵称"
 			}
 			if(this.userInfo.phone){
 				this.userphone = this.userInfo.phone