var page = 'getUserList.php',
data = {
uId: app.globalData.userInfo.id
}
app.post(page, data).then((success_data) => {
var users = success_data.data;
that.setData({
users: users
})
}).catch((fail_message) => {
});
var page = 'getUserList.php',
data = {
uId: app.globalData.userInfo.id
}
app.post(page, data).then((success_data) => {
var users = success_data.data, myInfo = app.globalData.userInfo;
myInfo.id = 0;
users.unshift(myInfo);
that.setData({
users: users
})
}).catch((fail_message) => {
});
myInfo是引用 你修改了里面的id值为0了,自然globalData里面的userInfo也为0了