From 677803018ba5d2cf9807b93251822db1573e4662 Mon Sep 17 00:00:00 2001 From: chenwei Date: Sat, 14 Sep 2024 15:31:12 +0800 Subject: [PATCH] update --- frontend/app-user/pages/home/placeOrder.vue | 9 +++++++-- frontend/app-user/pages/jump/weChatOffAcc.vue | 5 +++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/frontend/app-user/pages/home/placeOrder.vue b/frontend/app-user/pages/home/placeOrder.vue index 7e97cff..fca7b80 100644 --- a/frontend/app-user/pages/home/placeOrder.vue +++ b/frontend/app-user/pages/home/placeOrder.vue @@ -252,15 +252,20 @@ export default { this.$modal.confirm('确认提交订单?', '提示').then(async () => { console.log('支付---------》') let rData = {}; + + let openid= uni.getStorageSync('openId'); + if (!openid){ + uni.$u.toast('APP暂不支持在线下单,请前往微信公众号进行在线下单。'); + return false + } + // 判断环境 - //#ifdef H5 this.orderBody.zffs = dd_zffs.WX_PAY.code; this.orderBody.zflx = dd_zflx.JSAPI.code; this.orderBody.openId = uni.getStorageSync('openId'); // this.orderBody.openId = "oH7LG54_Y49mVunw2FLXzUCxHWlM"; console.log('H5环境---------》') console.log('H5环境rData---------》', this.orderBody) - //#endif //#ifdef APP-PLUS this.orderBody.zffs = dd_zffs.WX_PAY.code; diff --git a/frontend/app-user/pages/jump/weChatOffAcc.vue b/frontend/app-user/pages/jump/weChatOffAcc.vue index e8d4222..a6a6887 100644 --- a/frontend/app-user/pages/jump/weChatOffAcc.vue +++ b/frontend/app-user/pages/jump/weChatOffAcc.vue @@ -25,8 +25,9 @@ export default { let that = this; this.$api.loginApi.getWechatOpenId(code).then(res => { console.log("res", res); - if (res.openid) { - that.openId = res.openid; + that.openId = res.openid; + uni.setStorageSync('openId', res.openid) + if (!res.token) { //首次登录未绑定账号去登录页登录后触发绑定 console.log("获取openId", that.openId); uni.setStorageSync('openId', this.openId) -- libgit2 0.21.2