phoneNumber(that,data){
let wxAccount = that.$core.getCache('wx_account');
data['third_id'] = wxAccount.third_id;
console.log(wxAccount);
console.log(wxAccount.third_id);
let puser_id = uni.getStorageSync('puser_id') || 0;
data['puser_id'] = puser_id;
that.$core.post({
url: 'xilumarket.user/get_mobile',
data: data,
success: (ret, response) => {
wxAccount['bindind'] = 1;
let userinfo = ret.data.userinfo;
that.$core.setCache('wx_account', wxAccount);
that.$core.setUserinfo(userinfo);
getApp().globalData.userinfo = userinfo;
chatIM.connectSocket();
uni.navigateBack({});
uni.$emit("user_update",{});
uni.showToast({
title: '登录成功',
});
},fail: (ret, response) => {
//失败,重试
uni.showToast({'title':"获取失败",icon:"none"})
return false;
}
});
},
2 个回复
JXWang
$core里定义的,$core是挂载到组件实例的一个对象,需要看一下$core是在何处被挂载的,$core应该是一个通用的对象,可能是在main.js中被挂载的
8***@qq.com (作者)
明白了谢谢,非常非常感谢,