From 1582ca6f2fde88a1bf3109d6c67b499611be0cd6 Mon Sep 17 00:00:00 2001 From: dzq Date: Sat, 12 Apr 2025 11:32:01 +0800 Subject: [PATCH] =?UTF-8?q?feat(router):=20=E6=B7=BB=E5=8A=A0=E4=BC=81?= =?UTF-8?q?=E4=B8=9A=E5=BE=AE=E4=BF=A1=E7=99=BB=E5=BD=95=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在全局前置守卫中添加企业微信登录校验,当URL中包含corpid参数时,直接放行。同时,在订单提交逻辑中,根据用户类型(企业微信用户、汇邦云用户、外部用户)设置isInternal字段,并完善订单提交数据的字段。 --- src/common/apis/shop/type.ts | 11 +++++++++++ src/pages/product/components/checkout.vue | 16 ++++++++++++++-- src/router/guard.ts | 8 ++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/common/apis/shop/type.ts b/src/common/apis/shop/type.ts index 9f3314d..41c9525 100644 --- a/src/common/apis/shop/type.ts +++ b/src/common/apis/shop/type.ts @@ -16,10 +16,21 @@ export type category = { } export interface SubmitOrderRequestData { + /** 微信用户唯一标识 */ openid: string; + /** 系统用户ID */ userid: string; + /** 企业ID */ corpid: string; + /** 支付类型 wechat:微信 balance:余额 */ paymentType: 'wechat' | 'balance'; + /** 联系电话 */ + mobile: string; + /** 企业微信用户ID或汇邦云用户ID */ + qyUserid: string; + /** 是否内部订单 0否 1汇邦云用户 2企业微信用户 */ + isInternal: number; + /** 订单商品明细列表 */ goodsList: Array<{ goodsId: number quantity: number diff --git a/src/pages/product/components/checkout.vue b/src/pages/product/components/checkout.vue index b393938..c36a50a 100644 --- a/src/pages/product/components/checkout.vue +++ b/src/pages/product/components/checkout.vue @@ -1,6 +1,7 @@