逻辑
参考节点:96abaef5907e7c481e7029af7e21b312fe3d16f0
upSet.vue:
- 没有调用接口修改
- 重写:
type: {name: '昵称', type: 0}, //type 0 昵称 1性别 2 生日
set() {
let userData = null;
userData = this.userInfo;
if (this.userInfo) {
this.nikeName = this.userInfo.nickname;
this.sex_index = this.userInfo.sex;
this.birthDay = this.userInfo.birthday;
this.phone = this.userInfo.phone;
this.imgUrl = this.userInfo.pic;
}
console.log(this.upSet);
if (this.upSet) {
let obj = JSON.parse(this.upSet);
if (obj.type === 0) {
this.nikeName = obj.name;
userData.nickname = obj.name;
this.setUserInfoData(userData)
}
if (obj.type === 1) {
this.sex = obj.name;
userData.sex = obj.name;
this.setUserInfoData(userData)
}
if (obj.type === 2) {
this.birthDay = obj.name;
userData.birthday = obj.name;
this.setUserInfoData(userData)
}
if (obj.imgurl) {
let imgUrl = obj.imgurl;
this.pic = imgUrl;
userData.pic = imgUrl;
this.setUserInfoData(userData)
}
}
}
可以优化
this.$store.commit('setAddressType','onload');
return uni.navigateBack({
delta: 1
})
pages/managementAddress/managementAddress.vue 见视屏
测试-产品问题
只验证有无,不验证逻辑?
a7d4d3a7629365ccd06efb9768bb447b2a61bfa0
- 活动图片写死,永远是国庆特惠
- 2/1 没有这种用法
- 36写死