Commit fbe314e8f5f5a9ca7e6a9c0d75d207d7c1f4b71b

Authored by vking
1 parent 7c9e9aec

welcome

Showing 1 changed file with 7 additions and 2 deletions
@@ -167,9 +167,14 @@ App({ @@ -167,9 +167,14 @@ App({
167 } 167 }
168 }, 168 },
169 async getOpenid(app_unionid=''){ 169 async getOpenid(app_unionid=''){
170 - let openid=wx.getStorageSync('customer_openid');  
171 - if(!openid){ 170 + let openid=''
  171 + if(app_unionid){
  172 + openid= await this._getOpenid(app_unionid);
  173 + }else{
  174 + openid=wx.getStorageSync('customer_openid');
  175 + if(!openid){
172 openid= await this._getOpenid(app_unionid); 176 openid= await this._getOpenid(app_unionid);
  177 + }
173 } 178 }
174 this.openid=openid 179 this.openid=openid
175 return openid; 180 return openid;