!155 fix(支付): 1. 数据库里有存用户openid的情况下不弹出“请先绑定微信再使用微信支付”的弹窗 2. 修复微信小程序支付后支付状态显示不正确的bug

Merge pull request !155 from 王佳星/develop
develop
芋道源码 2025-08-09 02:30:26 +00:00 committed by Gitee
commit 4314bdc8c6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@
<view class="tip-text ss-m-b-30" v-if="payResult === 'success'"></view>
<view class="tip-text ss-m-b-30" v-if="payResult === 'failed'"></view>
<view class="tip-text ss-m-b-30" v-if="payResult === 'closed'"></view>
<view class="tip-text ss-m-b-30" v-if="payResult === 'waiting'">...</view>
<view class="tip-text ss-m-b-30" v-if="payResult === 'waiting'">...</view>
<view class="pay-total-num ss-flex" v-if="payResult === 'success'">
<view>{{ fen2yuan(state.orderInfo.price) }}</view>
</view>
@ -101,7 +101,7 @@
async function getOrderInfo(id) {
state.counter++;
// 1.
const { data, code } = await PayOrderApi.getOrder(id);
const { data, code } = await PayOrderApi.getOrder(id, true);
if (code === 0) {
state.orderInfo = data;
if (!state.orderInfo || state.orderInfo.status === 30) {

View File

@ -93,7 +93,7 @@ export default class SheepPay {
};
// 特殊逻辑:微信公众号、小程序支付时,必须传入 openid
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微信无法发起支付此时需要引导
if (!openid) {
this.bindWeixin();