Commit 677803018ba5d2cf9807b93251822db1573e4662
1 parent
3d296470
Exists in
dev
update
Showing
2 changed files
with
10 additions
and
4 deletions
Show diff stats
frontend/app-user/pages/home/placeOrder.vue
... | ... | @@ -252,15 +252,20 @@ export default { |
252 | 252 | this.$modal.confirm('确认提交订单?', '提示').then(async () => { |
253 | 253 | console.log('支付---------》') |
254 | 254 | let rData = {}; |
255 | + | |
256 | + let openid= uni.getStorageSync('openId'); | |
257 | + if (!openid){ | |
258 | + uni.$u.toast('APP暂不支持在线下单,请前往微信公众号进行在线下单。'); | |
259 | + return false | |
260 | + } | |
261 | + | |
255 | 262 | // 判断环境 |
256 | - //#ifdef H5 | |
257 | 263 | this.orderBody.zffs = dd_zffs.WX_PAY.code; |
258 | 264 | this.orderBody.zflx = dd_zflx.JSAPI.code; |
259 | 265 | this.orderBody.openId = uni.getStorageSync('openId'); |
260 | 266 | // this.orderBody.openId = "oH7LG54_Y49mVunw2FLXzUCxHWlM"; |
261 | 267 | console.log('H5环境---------》') |
262 | 268 | console.log('H5环境rData---------》', this.orderBody) |
263 | - //#endif | |
264 | 269 | |
265 | 270 | //#ifdef APP-PLUS |
266 | 271 | this.orderBody.zffs = dd_zffs.WX_PAY.code; | ... | ... |
frontend/app-user/pages/jump/weChatOffAcc.vue
... | ... | @@ -25,8 +25,9 @@ export default { |
25 | 25 | let that = this; |
26 | 26 | this.$api.loginApi.getWechatOpenId(code).then(res => { |
27 | 27 | console.log("res", res); |
28 | - if (res.openid) { | |
29 | - that.openId = res.openid; | |
28 | + that.openId = res.openid; | |
29 | + uni.setStorageSync('openId', res.openid) | |
30 | + if (!res.token) { | |
30 | 31 | //首次登录未绑定账号去登录页登录后触发绑定 |
31 | 32 | console.log("获取openId", that.openId); |
32 | 33 | uni.setStorageSync('openId', this.openId) | ... | ... |