功能完善
This commit is contained in:
@@ -94,14 +94,14 @@
|
||||
<view class='payment-way c-flex-row' @click.stop='changePayment'>
|
||||
<text>支付方式</text>
|
||||
<view>{{ paymentType === 0 ? '微信支付' : '余额' }}
|
||||
<image :src='assetsUrl("ic_arrow_right_gray.png")' />
|
||||
<image style='display: none' :src='assetsUrl("ic_arrow_right_gray.png")' />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class='bottom-view c-flex-row'>
|
||||
<text>合计</text>
|
||||
<text>¥{{ orderBean?.totalPrice || 0 }}</text>
|
||||
<sqb-pay @bindnavigateTo='navigateTo'
|
||||
<sqb-pay @navigateTo='navigateTo'
|
||||
:return_url='buildSqbParams.return_url'
|
||||
:total_amount='buildSqbParams.total_amount'
|
||||
:terminal_sn='buildSqbParams.terminal_sn'
|
||||
@@ -130,6 +130,7 @@ import { getPaymentList, orderCreate, overPayment } from '@/api/order';
|
||||
import { CouponBean } from '@/api/user/types';
|
||||
import { OrderBean } from '@/api/order/types';
|
||||
import { useUserStore } from '@/store';
|
||||
import { handlePayResult } from '@/utils/order';
|
||||
|
||||
const userStore = useUserStore();
|
||||
const { terminalInfo, deliveryAddress } = storeToRefs(userStore);
|
||||
@@ -176,15 +177,14 @@ const showCouponDialog = () => {
|
||||
const confirmCoupon = (item: CouponBean) => {
|
||||
checkedCoupon.value = item;
|
||||
};
|
||||
|
||||
const navigateTo = (e: any) => {
|
||||
console.log('----------->>>>>navigateTo ', e);
|
||||
uni.redirectTo({
|
||||
url: e.detail.url,
|
||||
fail(e) {
|
||||
uni.showToast({
|
||||
title: '支付失败'
|
||||
});
|
||||
console.log('--------------_>>>>>>navigateTo ', e);
|
||||
handlePayResult(orderBean.value?.id, e, {
|
||||
onSuccess: () => {
|
||||
// pay({
|
||||
// 'orderId': orderBean.value?.order.id,
|
||||
// 'result': 'xxx'
|
||||
// });
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -237,7 +237,6 @@ const payment = async () => {
|
||||
}]
|
||||
};
|
||||
await overPayment(paymentParams);
|
||||
uni.navigateBack();
|
||||
uni.hideLoading();
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user