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; |
-
Please register or login to post a comment