From 64ace657acf6442c743e33a63964abc866f6cbd9 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 21 Nov 2023 00:00:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98=E6=94=B6=E9=93=B6=E5=8F=B0?= =?UTF-8?q?=EF=BC=8Copenid=20=E5=8A=A8=E6=80=81=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/goods/cashier/index.vue | 7 +++++-- store/modules/app.js | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pages/goods/cashier/index.vue b/pages/goods/cashier/index.vue index 262c2ef2..2f811a9a 100644 --- a/pages/goods/cashier/index.vue +++ b/pages/goods/cashier/index.vue @@ -42,8 +42,10 @@ import * as PayChannelApi from '@/api/pay/channel.js'; import * as WalletApi from '@/api/pay/wallet.js'; import {fen2yuan} from "../../../utils/util"; + import { mapGetters } from "vuex"; export default { - components: { + computed: mapGetters([ 'openid' ]), + components: { CountDown, numberScroll }, @@ -165,7 +167,8 @@ returnUrl: this.getPayReturnUrl(), channelExtras: { // TODO 芋艿:等登录接入完成,需要改成动态读取 // openid: "ockUAwIZ-0OeMZl9ogcZ4ILrGba0" // wx_pub 微信公众号支付的 openid - openid: "oLefc4g5GjKWHJjLjMSXB3wX0fD0" // wx_lite 微信小程序支付的 openid + // openid: "oLefc4g5GjKWHJjLjMSXB3wX0fD0" // wx_lite 微信小程序支付的 openid + openid: this.openid } }).then(res => { this.handleSubmitOrderResult(res.data); diff --git a/store/modules/app.js b/store/modules/app.js index 190d6f49..ee228ec2 100644 --- a/store/modules/app.js +++ b/store/modules/app.js @@ -15,7 +15,7 @@ const state = { backgroundColor: "#fff", userInfo: Cache.get(USER_INFO)?JSON.parse(Cache.get(USER_INFO)):null, uid: Cache.get(UID) || null, - openid: Cache.get(OPENID) || null, + openid: Cache.get(OPENID) || null, homeActive: false, chatUrl: Cache.get('chatUrl') || '', systemPlatform: Cache.get(PLATFORM)?Cache.get(PLATFORM):'',