diff --git a/components/order/Confirm.vue b/components/order/Confirm.vue
new file mode 100644
index 0000000..e5148db
--- /dev/null
+++ b/components/order/Confirm.vue
@@ -0,0 +1,795 @@
+
+
+
+
+ {{ $t('order.goodsInfo') }}
+
+
+
+
+
+
+
+
+ {{ $t('order.priceDetail') }}
+
+
+
+ {{ $t('order.totalPrice') }}
+ {{ totalPrice.toFixed(2) }} 天医币
+
+
+
+
+
+
+
+ {{ $t('order.activityDiscount') }}
+ -¥{{ activityDiscountAmount.toFixed(2) }}
+
+
+
+
+
+ VIP
+ {{ $t('order.vipDiscount') }}
+
+ -¥{{ vipPrice.toFixed(2) }}
+
+
+
+
+ {{ $t('order.districtDiscount') }}
+ -¥{{ districtAmount.toFixed(2) }}
+
+
+
+
+
+
+ {{ $t('order.points') }}
+
+ ({{ $t('order.allPoints') }}:{{ userInfo.jf }})
+
+
+ -{{ jfNumber.toFixed(2) }}
+
+
+
+
+
+ {{ $t('order.maxPoints', { max: jfNumberMax }) }}
+
+
+
+
+
+
+
+
+
+ {{ $t('order.paymentMethod') }}
+
+
+
+
+
+
+ {{ $t('order.total') }}:
+ {{ actualPayment.toFixed(2) }} 天医币
+
+
+ {{ $t('order.submit') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/order/Coupon.vue b/components/order/Coupon.vue
new file mode 100644
index 0000000..1a4b9f4
--- /dev/null
+++ b/components/order/Coupon.vue
@@ -0,0 +1,328 @@
+
+
+
+
+ {{ $t('order.coupon') }}
+
+
+
+
+ {{ $t('order.couponCount', { count: availableCouponCount }) }}
+
+
+ {{ $t('order.noCoupon') }}
+
+
+ {{ $t('order.unavailable') }}
+
+
+
+ -¥{{ selectedCoupon.couponEntity.couponAmount }}
+ {{ $t('order.reselect') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/order/PayWay.vue b/components/order/PayWay.vue
new file mode 100644
index 0000000..f18969e
--- /dev/null
+++ b/components/order/PayWay.vue
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+ {{ $t('order.virtualCoin') }}
+
+ ({{ $t('order.balance') }}:{{ peanutCoin || 0 }})
+
+
+
+
+
+
+
+
+
+ {{ $t('order.paymentTipTitle') }}
+ {{ $t('order.paymentTip1') }}
+
+ {{ $t('order.paymentTip2') }}
+ 022-24142321
+
+
+ {{ $t('order.paymentTip3') }}
+
+ publisher@tmrjournals.com
+
+ {{ $t('order.paymentTip3_1') }}
+
+ yilujiankangkefu
+
+ {{ $t('order.paymentTip3_2') }}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/order/Payment.vue b/components/order/Payment.vue
deleted file mode 100644
index e69de29..0000000
diff --git a/components/order/Price.vue b/components/order/Price.vue
deleted file mode 100644
index 44f183b..0000000
--- a/components/order/Price.vue
+++ /dev/null
@@ -1,229 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- {{ $t('order.activityDiscount') }}
- -¥{{ activityDiscountAmount.toFixed(2) }}
-
-
-
-
-
- VIP
- {{ $t('order.vipDiscount') }}
-
- -¥{{ vipPrice.toFixed(2) }}
-
-
-
-
- {{ $t('order.districtDiscount') }}
- -¥{{ districtAmount.toFixed(2) }}
-
-
-
-
-
-
- {{ $t('order.points') }}
-
- ({{ $t('order.allPoints') }}:{{ initData.user.jf }})
-
-
- -¥{{ jfNumberShow }}
-
-
-
-
-
- {{ $t('order.maxPoints', { max: jfNumberMax }) }}
-
-
-
-
-
-
-
-
-
-
- VIP专项立减
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/locale/en.json b/locale/en.json
index 5e6ce41..46aff49 100644
--- a/locale/en.json
+++ b/locale/en.json
@@ -463,7 +463,6 @@
"activityLabel": "Activity Price",
"vipPriceLabel": "VIP Price",
"quantity": "Quantity",
- "couponAmount": "¥",
"couponUseLevel": "Min. {level} CNY",
"couponExpiry": "Valid until",
"couponForever": "Permanent",
diff --git a/locale/zh-Hans.json b/locale/zh-Hans.json
index 20a81de..636e3ff 100644
--- a/locale/zh-Hans.json
+++ b/locale/zh-Hans.json
@@ -464,7 +464,6 @@
"activityLabel": "活动价",
"vipPriceLabel": "VIP到手价",
"quantity": "数量",
- "couponAmount": "¥",
"couponUseLevel": "满{level}元可用",
"couponExpiry": "有效期至",
"couponForever": "永久有效",
diff --git a/pages.json b/pages.json
index a563e23..76a77e8 100644
--- a/pages.json
+++ b/pages.json
@@ -152,7 +152,7 @@
"navigationBarTitleText": "%courseDetails.chapter%"
}
}, {
- "path": "pages/order/confirmOrder",
+ "path": "pages/order/goodsConfirm",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "%order.confirmTitle%"
diff --git a/pages/book/detail.vue b/pages/book/detail.vue
index affc6d1..41909a8 100644
--- a/pages/book/detail.vue
+++ b/pages/book/detail.vue
@@ -307,7 +307,7 @@ function closePurchasePopup() {
// 处理购买
function handlePurchase() {
uni.navigateTo({
- url: `/pages/book/order?id=${bookId.value}`
+ url: `/pages/order/goodsConfirm?goods=${bookId.value}`
})
}
diff --git a/pages/course/details/course.vue b/pages/course/details/course.vue
index daff58a..3e78bc3 100644
--- a/pages/course/details/course.vue
+++ b/pages/course/details/course.vue
@@ -454,18 +454,8 @@ const confirmPurchase = () => {
showProtocol.value = false
// 跳转到确认订单页
- const orderData = {
- goods: [{ ...selectedGoods.value, productAmount: 1 }],
- // typeId: 0,
- // navTitle: courseDetail.value?.title,
- // title: courseDetail.value?.title,
- // isFudu: isFudu.value,
- // fuduId: isFudu.value ? fuduCatalogueId.value : undefined
- }
-
uni.navigateTo({
- // url: `/pages/order/confirmOrder?data=${encodeURIComponent(JSON.stringify(orderData))}`
- url: `/pages/order/confirmOrder?goods=${selectedGoods.value.productId}`
+ url: `/pages/order/goodsConfirm?goods=${selectedGoods.value.productId}`
})
}
diff --git a/pages/course/order.vue b/pages/course/order.vue
deleted file mode 100644
index 0cd5ebb..0000000
--- a/pages/course/order.vue
+++ /dev/null
@@ -1,672 +0,0 @@
-
-
-
-
-
-
-
-
-
- 商品信息
-
-
-
-
- VIP优惠
-
-
-
-
-
- {{ item.productName }}
-
-
-
-
-
- ¥{{ item.vipPrice.toFixed(2) }}
- VIP到手价
- ¥{{ item.price.toFixed(2) }}
-
-
-
-
- ¥{{ item.activityPrice.toFixed(2) }}
- 活动价
- ¥{{ item.price.toFixed(2) }}
-
-
-
-
- ¥{{ item.price.toFixed(2) }}
-
-
-
-
-
- 数量:{{ item.productAmount || 1 }}
-
-
-
-
-
-
-
- 收货地址
-
-
- {{ selectedAddress.name }}
- {{ selectedAddress.phone }}
-
-
- {{ selectedAddress.province }} {{ selectedAddress.city }} {{ selectedAddress.district }} {{ selectedAddress.detail }}
-
-
-
-
- 添加收货地址
-
-
-
-
-
-
- 商品金额
- ¥{{ goodsAmount.toFixed(2) }}
-
-
- 运费
- ¥{{ freight.toFixed(2) }}
-
-
- 可用积分
- {{ availablePoints }} 分(可抵扣 ¥{{ pointsDiscount.toFixed(2) }})
-
-
-
-
-
-
- 订单总价
- ¥{{ totalAmount.toFixed(2) }}
-
-
-
-
-
-
-
- 合计:
- ¥{{ totalAmount.toFixed(2) }}
-
-
- 提交订单
-
-
-
-
-
-
-
-
diff --git a/pages/order/confirmOrder.vue b/pages/order/confirmOrder.vue
deleted file mode 100644
index 056eb52..0000000
--- a/pages/order/confirmOrder.vue
+++ /dev/null
@@ -1,1419 +0,0 @@
-
-
-
-
-
-
-
- {{ $t('order.goodsInfo') }}
-
-
- {{ $t('order.vipLabel') }}
-
-
-
-
-
-
-
-
- {{ item.productName }}
-
-
-
-
-
-
-
-
-
-
-
- {{ item.price.toFixed(2) }} 天医币
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('order.priceDetail') }}
-
-
-
- {{ $t('order.totalPrice') }}
- {{ totalPrice.toFixed(2) }} 天医币
-
-
-
-
-
-
-
- {{ $t('order.activityDiscount') }}
- -¥{{ activityDiscountAmount.toFixed(2) }}
-
-
-
-
-
- VIP
- {{ $t('order.vipDiscount') }}
-
- -¥{{ vipPrice.toFixed(2) }}
-
-
-
-
- {{ $t('order.districtDiscount') }}
- -¥{{ districtAmount.toFixed(2) }}
-
-
-
-
-
-
- {{ $t('order.points') }}
-
- ({{ $t('order.allPoints') }}:{{ userInfo.jf }})
-
-
- -{{ jfNumber.toFixed(2) }}
-
-
-
-
-
- {{ $t('order.maxPoints', { max: jfNumberMax }) }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('order.paymentMethod') }}
-
-
-
-
-
- {{ $t('order.virtualCoin') }}
-
- ({{ $t('order.balance') }}:{{ userInfo?.peanutCoin || 0 }})
-
-
-
-
-
-
-
-
-
-
- {{ $t('order.paymentTipTitle') }}
- {{ $t('order.paymentTip1') }}
-
- {{ $t('order.paymentTip2') }}
- 022-24142321
-
-
- {{ $t('order.paymentTip3') }}
-
- publisher@tmrjournals.com
-
- {{ $t('order.paymentTip3_1') }}
-
- yilujiankangkefu
-
- {{ $t('order.paymentTip3_2') }}
-
-
-
-
-
-
-
-
-
- {{ $t('order.total') }}:
- {{ actualPayment.toFixed(2) }} 天医币
-
-
- {{ $t('order.submit') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/order/goodsConfirm.vue b/pages/order/goodsConfirm.vue
new file mode 100644
index 0000000..d605cc0
--- /dev/null
+++ b/pages/order/goodsConfirm.vue
@@ -0,0 +1,239 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('order.vipLabel') }}
+
+
+
+
+
+
+
+
+ {{ item.productName }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.price.toFixed(2) }} 天医币
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/types/order.d.ts b/types/order.d.ts
index 9dfe4b3..053df6e 100644
--- a/types/order.d.ts
+++ b/types/order.d.ts
@@ -90,30 +90,6 @@ export interface ICourseOrderCreateParams {
come: number // 2
}
-/**
- * 订单初始化数据
- */
-export interface IOrderInitData {
- user: {
- id: number
- jf: number // 积分
- peanutCoin: number // 天医币余额
- vip?: number // VIP状态
- }
- is_course: boolean
-}
-
-/**
- * 订单路由参数
- */
-export interface IOrderRouteParams {
- goods: IOrderGoods[]
- typeId: number
- sourceType?: string
- navTitle?: string
- title?: string
-}
-
/**
* 价格明细项
*/
@@ -128,9 +104,7 @@ export interface IPriceBreakdownItem {
* 订单状态
*/
export interface IOrderState {
- orderData: IOrderRouteParams
goodsList: IOrderGoods[]
- initData: IOrderInitData | null
totalPrice: number
vipPrice: number
districtAmount: number