From 6a3841dd7272d7e66039baa4b3e3e7d8ed89f130 Mon Sep 17 00:00:00 2001 From: dzq Date: Tue, 15 Apr 2025 16:54:40 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=AE=A2=E5=8D=95=E9=A1=B5=E9=9D=A2):=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=93=E5=BC=80=E6=9F=9C=E5=AD=90=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=B9=B6=E4=BC=98=E5=8C=96=E6=94=AF=E4=BB=98=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=E9=80=89=E6=8B=A9=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在订单页面添加打开柜子的功能,支持状态为1和5的订单商品 - 优化支付方式选择界面,使用更直观的单元格布局 - 在提交订单时添加手机号格式验证 --- .env | 2 +- src/pages/order/index.vue | 72 ++++++++---- src/pages/product/components/checkout.vue | 127 +++++++++++++++++----- src/pinia/stores/order.ts | 10 +- types/auto/components.d.ts | 2 - 5 files changed, 160 insertions(+), 53 deletions(-) diff --git a/.env b/.env index db4e7e9..389397f 100644 --- a/.env +++ b/.env @@ -7,4 +7,4 @@ VITE_APP_TITLE = 借还柜 VITE_ROUTER_HISTORY = hash ## 是否开启 console 调试工具 -VITE_CONSOLE = true +VITE_CONSOLE = false diff --git a/src/pages/order/index.vue b/src/pages/order/index.vue index aace50f..d55a2b7 100644 --- a/src/pages/order/index.vue +++ b/src/pages/order/index.vue @@ -1,7 +1,10 @@ - diff --git a/src/pinia/stores/order.ts b/src/pinia/stores/order.ts index 9c9a222..67506e5 100644 --- a/src/pinia/stores/order.ts +++ b/src/pinia/stores/order.ts @@ -3,10 +3,12 @@ import { getOrdersByOpenIdApi } from "@@/apis/shop" import type { ShopOrderEntity, ShopOrderGoodsEntity, Goods } from "@@/apis/shop/type" export interface Order extends ShopOrderEntity { - goodsList: Array<{ - goodsInfo: Goods - orderGoods: ShopOrderGoodsEntity - }> + goodsList: Array +} + +export interface OrderGoods { + goodsInfo: Goods + orderGoods: ShopOrderGoodsEntity } export const useOrderStore = defineStore("order", () => { diff --git a/types/auto/components.d.ts b/types/auto/components.d.ts index 436f172..39a8321 100644 --- a/types/auto/components.d.ts +++ b/types/auto/components.d.ts @@ -27,8 +27,6 @@ declare module 'vue' { VanNavBar: typeof import('vant/es')['NavBar'] VanPicker: typeof import('vant/es')['Picker'] VanPopup: typeof import('vant/es')['Popup'] - VanRadio: typeof import('vant/es')['Radio'] - VanRadioGroup: typeof import('vant/es')['RadioGroup'] VanSidebar: typeof import('vant/es')['Sidebar'] VanSidebarItem: typeof import('vant/es')['SidebarItem'] VanTabbar: typeof import('vant/es')['Tabbar']