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