From bdf1b41098d4aff21b59428de78f72e940a15427 Mon Sep 17 00:00:00 2001 From: chenghuan Date: Fri, 28 Nov 2025 18:03:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=EF=BC=9A=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/config.ts | 4 +- api/modules/order.ts | 33 +++---- components/order/ProductInfo.vue | 30 ++++-- locale/en.json | 6 +- locale/zh-Hans.json | 6 +- pages.json | 6 ++ pages/user/feedback/index.vue | 10 ++ pages/user/order/details.vue | 153 +++++++++++++++++++++++++++++++ pages/user/order/index.vue | 42 ++++----- stores/sys.ts | 5 + style/tailwind.css | 128 ++++++++++++++++++++++++++ types/order.d.ts | 22 +++++ utils/index.ts | 2 +- 13 files changed, 392 insertions(+), 55 deletions(-) create mode 100644 pages/user/order/details.vue diff --git a/api/config.ts b/api/config.ts index f437afb..741930c 100644 --- a/api/config.ts +++ b/api/config.ts @@ -7,8 +7,8 @@ export const ENV = process.env.NODE_ENV || 'development'; */ const BASE_URL_MAP = { development: { - // MAIN: 'http://192.168.110.100:9300/pb/', // 张川川 - MAIN: 'https://global.nuttyreading.com/', // 线上 + MAIN: 'http://192.168.110.100:9300/pb/', // 张川川 + // MAIN: 'https://global.nuttyreading.com/', // 线上 // PAYMENT: 'https://dev-pay.example.com', // 暂时用不到 // CDN: 'https://cdn-dev.example.com', // 暂时用不到 }, diff --git a/api/modules/order.ts b/api/modules/order.ts index e8f0bad..85d3562 100644 --- a/api/modules/order.ts +++ b/api/modules/order.ts @@ -9,7 +9,8 @@ import type { ICoupon, ICourseOrderCreateParams, IOrderInitData, - IGoodsDiscountParams + IGoodsDiscountParams, + IOrderDetail } from '@/types/order' import type { IUserInfo } from '@/types/user' @@ -30,19 +31,6 @@ export const orderApi = { return res }, - /** - * 验证 Google Pay 支付 - * @param params 支付验证参数 - */ - async verifyGooglePay(params: IGooglePayVerifyParams) { - const res = await mainClient.request({ - url: 'pay/googlepay/googleVerify', - method: 'POST', - data: params - }) - return res - }, - /** * 获取用户信息(包含虚拟币余额) */ @@ -106,7 +94,7 @@ export const orderApi = { }, /** - * 获取地区优惠金额 + * 获取活动优惠金额 * @param productList 商品列表 */ async getDistrictAmount(productList: IGoodsDiscountParams[]) { @@ -155,5 +143,18 @@ export const orderApi = { data }) return res - } + }, + + /** + * 获取订单详情 + * @param orderId 订单ID + */ + async getOrderDetail(orderId: string) { + const res = await mainClient.request>({ + url: 'common/buyOrder/commonOrderDetail', + method: 'POST', + data: { orderId } + }) + return res + }, } diff --git a/components/order/ProductInfo.vue b/components/order/ProductInfo.vue index 87677e1..673ef31 100644 --- a/components/order/ProductInfo.vue +++ b/components/order/ProductInfo.vue @@ -1,5 +1,5 @@