feat: 支付完成
This commit is contained in:
parent
f7f14e59cb
commit
ca7506f903
@ -923,7 +923,7 @@
|
||||
if (that.amountType === 0) {
|
||||
return n.toFixed(2);
|
||||
} else {
|
||||
return (n / 100).toFixed(2);
|
||||
return (n).toFixed(2);
|
||||
}
|
||||
},
|
||||
pushGoodsCache(goodsInfo) {
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
<!-- 订单信息 -->
|
||||
<view class="order-info">
|
||||
<!-- 支付剩余时间 -->
|
||||
<view v-if="order.showExpiration" class="order-countdown">
|
||||
<!-- <view v-if="order.showExpiration" class="order-countdown">
|
||||
<text class="m-r-6">剩余时间</text>
|
||||
<count-down :date="order.expirationTime" separator="zh" theme="text" textColor="#666666" customNumColor="#666666" />
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- 付款金额 -->
|
||||
<view class="order-amount">
|
||||
<text class="unit">¥</text>
|
||||
|
||||
@ -361,8 +361,16 @@ import storage from '@/utils/storage'
|
||||
app.showToast(result.message, 1500)
|
||||
setTimeout(() => app.$goPageByToken('pages/order/index', {}, 'redirectTo'), 1500)
|
||||
} else {
|
||||
// 订单未支付: 跳转到订单支付页
|
||||
setTimeout(() => app.$goPageByToken('pages/checkout/cashier/index', res.data, 'redirectTo'), 100)
|
||||
uni.requestPayment({
|
||||
...res.data,
|
||||
success: (res) => {
|
||||
setTimeout(() => app.$goPageByToken('pages/order/index', {}, 'redirectTo'), 1500)
|
||||
resolve(res);
|
||||
},
|
||||
fail: (err) => {
|
||||
reject(err);
|
||||
},
|
||||
});
|
||||
}
|
||||
}).finally(() => setTimeout(() => app.disabled = false, 1600))
|
||||
},
|
||||
|
||||
@ -80,7 +80,7 @@
|
||||
goods_id: id,
|
||||
goods_name: title,
|
||||
image: item.imageUrl ? item.imageUrl : mainImageUrl,
|
||||
price: item.promotionPrice * 100,
|
||||
price: item.promotionPrice,
|
||||
stock: item.stock,
|
||||
spec_value_ids: item.vvSkuPropertyValueList.map(item => item.id).join('_'),
|
||||
sku_name_arr: item.vvSkuPropertyValueList.map(item => item.productPropertyValue)
|
||||
|
||||
@ -47,7 +47,7 @@ export default {
|
||||
app.items = await this.handleGetHomeData().finally(() => callback && callback());
|
||||
},
|
||||
async handleGetHomeData() {
|
||||
const res = await apiGetCommodityList({});
|
||||
const res = await apiGetCommodityList({ page: 1, pageSize: 1000 });
|
||||
return mockData.map(item => {
|
||||
if (item.type === 'goods') {
|
||||
item.data = res.data.rows
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user