|
...
|
...
|
@@ -38,7 +38,7 @@ App({ |
|
|
|
console.log('this.openid',this.openid,mta);
|
|
|
|
},
|
|
|
|
onShow:async function(){
|
|
|
|
this._getOpenid();
|
|
|
|
//this._getOpenid();
|
|
|
|
if (wx.canIUse('getUpdateManager')) {
|
|
|
|
const updateManager = wx.getUpdateManager();
|
|
|
|
updateManager.onCheckForUpdate(function (res) {
|
|
...
|
...
|
@@ -105,6 +105,7 @@ App({ |
|
|
|
return new Promise((success,fail)=>{
|
|
|
|
wx.login({
|
|
|
|
success: (login_res)=>{
|
|
|
|
console.log('wx.login',login_res)
|
|
|
|
success(login_res);
|
|
|
|
},
|
|
|
|
fail:(res)=>{
|
|
...
|
...
|
@@ -126,6 +127,7 @@ App({ |
|
|
|
try{
|
|
|
|
let openid=res.data.data.openid;
|
|
|
|
wx.setStorage({key:'customer_openid',data:openid});
|
|
|
|
wx.setStorage({key:'customer_session_key',data:res.data.data.session_key});
|
|
|
|
success(openid);
|
|
|
|
}catch(e){
|
|
|
|
console.log(res);
|
|
...
|
...
|
@@ -143,8 +145,9 @@ App({ |
|
|
|
try{
|
|
|
|
let login_res=await this._login();
|
|
|
|
let openid=await this._getLiteOpenidByCode(login_res.code)
|
|
|
|
return openid;
|
|
|
|
return openid
|
|
|
|
}catch(e){
|
|
|
|
console.log('_getOpenid.catch',e)
|
|
|
|
return this._getOpenid();
|
|
|
|
}
|
|
|
|
},
|
...
|
...
|
|