|
@@ -156,10 +156,16 @@ Page({
|
|
|
User1List
|
|
|
})
|
|
|
this.setData({
|
|
|
- avatar: User1List[0].avatar,
|
|
|
- nickname: User1List[0].nickname,
|
|
|
+ avatar: User1List[0].avatar||'https://file-cloud.fmode.cn/qpFbRRSZrO/20241120/95uip6030022742.png?imageView2/1/w/200/h/200',
|
|
|
+ nickname: User1List[0].nickname||'微信用户',
|
|
|
sex: User1List[0].sex || '男',
|
|
|
+
|
|
|
})
|
|
|
+ if(User1List[0].diyform){
|
|
|
+ this.setData({
|
|
|
+ height:User1List[0].diyform.height
|
|
|
+ })
|
|
|
+ }
|
|
|
console.log(this.data.User1List);
|
|
|
},
|
|
|
//获取部门
|
|
@@ -214,7 +220,7 @@ Page({
|
|
|
},
|
|
|
//上传信息
|
|
|
async setinfo() {
|
|
|
- if (!this.data.nickname || !this.data.sex || !this.data.selectobjectid || !this.data.avatar) {
|
|
|
+ if (!this.data.nickname || !this.data.sex || !this.data.selectobjectid || !this.data.avatar||!this.data.height) {
|
|
|
wx.showToast({
|
|
|
title: '请输入相关内容',
|
|
|
icon: 'none',
|
|
@@ -230,6 +236,10 @@ Page({
|
|
|
let user = await Userquery.first();
|
|
|
user.set('sex', this.data.sex)
|
|
|
user.set('avatar', this.data.avatar)
|
|
|
+ let diyform = {
|
|
|
+ height:this.data.height
|
|
|
+ }
|
|
|
+ user.set('diyform', diyform)
|
|
|
user.set('nickname', this.data.nickname)
|
|
|
try {
|
|
|
user.save()
|