!155 fix(支付): 1. 数据库里有存用户openid的情况下不弹出“请先绑定微信再使用微信支付”的弹窗 2. 修复微信小程序支付后支付状态显示不正确的bug
Merge pull request !155 from 王佳星/developdevelop
commit
4314bdc8c6
|
@ -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 === '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 === '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 === '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 class="pay-total-num ss-flex" v-if="payResult === 'success'">
|
||||||
<view>¥{{ fen2yuan(state.orderInfo.price) }}</view>
|
<view>¥{{ fen2yuan(state.orderInfo.price) }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
async function getOrderInfo(id) {
|
async function getOrderInfo(id) {
|
||||||
state.counter++;
|
state.counter++;
|
||||||
// 1. 加载订单信息
|
// 1. 加载订单信息
|
||||||
const { data, code } = await PayOrderApi.getOrder(id);
|
const { data, code } = await PayOrderApi.getOrder(id, true);
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
state.orderInfo = data;
|
state.orderInfo = data;
|
||||||
if (!state.orderInfo || state.orderInfo.status === 30) {
|
if (!state.orderInfo || state.orderInfo.status === 30) {
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue