fix(支付): 数据库里有存用户openid的情况下不弹出“请先绑定微信再使用微信支付”的弹窗

Signed-off-by: 王佳星 <417783514@qq.com>
pull/155/head
王佳星 2025-07-10 13:43:33 +00:00 committed by Gitee
parent c17228b0d7
commit 817b2ec5ce
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ export default class SheepPay {
}; };
// 特殊逻辑:微信公众号、小程序支付时,必须传入 openid // 特殊逻辑:微信公众号、小程序支付时,必须传入 openid
if (['wx_pub', 'wx_lite'].includes(channel)) { if (['wx_pub', 'wx_lite'].includes(channel)) {
const openid = await sheep.$platform.useProvider('wechat').getOpenid(); const openid = await sheep.$platform.useProvider('wechat').getOpenid(true);
// 如果获取不到 openid微信无法发起支付此时需要引导 // 如果获取不到 openid微信无法发起支付此时需要引导
if (!openid) { if (!openid) {
this.bindWeixin(); this.bindWeixin();