截图连接https://mmbiz.qpic.cn/mmbiz_png/WcgUoX8D9LDmSFfShONYG0tBjKYhlODRPGVqJSibhzsou3cvlNSFROCsWKPK4QJKDFBWTY0XicZn5kGicLEGCSkuA/0?wx_fmt=png
为什么app.globalData.systemUserInfo.wechatNumber发生变化
wxml:
输入框:
js:
inputEdit:function(e){
console.log(app.globalData.systemUserInfo.wechatNumber);
var that = this;
var dataset= e.currentTarget.dataset;
var value = e.detail.value;
var name = dataset.name;
that.data[name]=value;
this.setData({
[name]: value
});
console.log('input双向绑定:'+ that.data[name]);
console.log(that.data.userCardInfo.wechatNumber);
console.log(app.globalData.systemUserInfo.wechatNumber);
},
建议自查是否在某个时间点设置了 app.globalData.systemUserInfo = this.data.userCardInfo 导致建立了双向绑定
userCardInfo: app.globalData.systemUserInfo
})
this.setData({
userCardInfo: Object.assign({}, app.globalData.systemUserInfo)
})
求大佬们帮忙解答解答!非常感谢