8***@qq.com
8***@qq.com
  • 发布:2024-02-18 14:30
  • 更新:2024-03-10 22:37
  • 阅读:98

getCache()这个函数在哪儿定义的。各位大佬谁能指导一下

分类:uni-app

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;  
                  }  
                });  

        },
2024-02-18 14:30 负责人:无 分享
已邀请:
JXWang

JXWang

$core里定义的,$core是挂载到组件实例的一个对象,需要看一下$core是在何处被挂载的,$core应该是一个通用的对象,可能是在main.js中被挂载的

8***@qq.com

8***@qq.com (作者)

明白了谢谢,非常非常感谢,

要回复问题请先登录注册