diff --git a/api/modules/order.ts b/api/modules/order.ts index 2b66a02..b933e21 100644 --- a/api/modules/order.ts +++ b/api/modules/order.ts @@ -8,7 +8,8 @@ import type { IOrderGoods, ICoupon, ICourseOrderCreateParams, - IOrderInitData + IOrderInitData, + IGoodsDiscountParams } from '@/types/order' import type { IUserInfo } from '@/types/user' @@ -108,7 +109,7 @@ export const orderApi = { * 获取地区优惠金额 * @param productList 商品列表 */ - async getDistrictAmount(productList: Array<{ productId: number; quantity: number }>) { + async getDistrictAmount(productList: IGoodsDiscountParams[]) { const res = await mainClient.request>({ url: 'book/buyOrder/getDistrictAmount', method: 'POST', diff --git a/components/order/Confirm.vue b/components/order/Confirm.vue index 68fb531..cfb1f0a 100644 --- a/components/order/Confirm.vue +++ b/components/order/Confirm.vue @@ -26,53 +26,47 @@ {{ $t('order.totalPrice') }} - {{ totalPrice.toFixed(2) }} 天医币 + {{ totalAmount.toFixed(2) }} {{ t('global.coin') }} - - {{ $t('order.activityDiscount') }} - -¥{{ activityDiscountAmount.toFixed(2) }} + + {{ $t('order.promotionDiscounted') }} + -{{ promotionDiscounted.toFixed(2) }} {{ t('global.coin') }} - + VIP {{ $t('order.vipDiscount') }} - -¥{{ vipPrice.toFixed(2) }} - - - - - {{ $t('order.districtDiscount') }} - -¥{{ districtAmount.toFixed(2) }} + -{{ vipDiscounted.toFixed(2) }} {{ t('global.coin') }} - + {{ $t('order.points') }} - ({{ $t('order.allPoints') }}:{{ userInfo.jf }}) + ({{ $t('order.allPoints') }}:{{ userInfo?.jf || 0 }}) - -{{ jfNumber.toFixed(2) }} + -{{ pointsDiscounted.toFixed(2) }} - + - {{ $t('order.maxPoints', { max: jfNumberMax }) }} + {{ $t('order.maxPoints', { max: pointsUsableMax }) }} {{ $t('order.total') }}: - {{ actualPayment.toFixed(2) }} 天医币 + {{ finalAmount }} {{ t('global.coin') }} {{ $t('order.submit') }} @@ -120,7 +114,7 @@ - {{ $t('global.ok') }} + {{ $t('global.ok') }} @@ -128,93 +122,66 @@ + + \ No newline at end of file diff --git a/components/order/GoodsSelector.vue b/components/order/GoodsSelector.vue index 1e82068..c5ace12 100644 --- a/components/order/GoodsSelector.vue +++ b/components/order/GoodsSelector.vue @@ -2,18 +2,14 @@ {{ goods[selectedIndex].productName }} - - {{ selectedGoodsPrice.lowestPrice }} 天医币 - {{ selectedGoodsPrice.priceLabel }} - {{ goods[selectedIndex].price }} 天医币 - + + @@ -32,11 +28,8 @@ {{ item.productName }} - - {{ calculatePrice(item).lowestPrice }} 天医币 - {{ calculatePrice(item).priceLabel }} - {{ item.price }} 天医币 - + + @@ -52,12 +45,10 @@