From 627d9b557c996d921ed9f88ce1c218041dc560fd Mon Sep 17 00:00:00 2001 From: dzq Date: Tue, 22 Apr 2025 15:39:13 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=BB=93=E8=B4=A6=E7=BB=84=E4=BB=B6):=20?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E7=94=A8=E6=88=B7=E7=B1=BB=E5=9E=8B=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E8=AE=BE=E7=BD=AE=E5=A7=93=E5=90=8D=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在结账组件中,根据用户类型(内部用户或普通用户)动态设置姓名字段。当用户为内部用户时,使用企业微信的用户姓名,否则使用普通用户的姓名。这样可以确保在结账时显示正确的用户姓名。 --- src/pages/product/components/checkout.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/product/components/checkout.vue b/src/pages/product/components/checkout.vue index afcf693..b1206a0 100644 --- a/src/pages/product/components/checkout.vue +++ b/src/pages/product/components/checkout.vue @@ -14,7 +14,7 @@ const cartStore = useCartStore() const { cartItems, totalPrice } = storeToRefs(cartStore) const wxStore = useWxStore() -const { openid, balance, corpidLogin, userid: qyUserid } = storeToRefs(wxStore) +const { openid, balance, corpidLogin, userid: qyUserid, name: qyName } = storeToRefs(wxStore) const ab98UserStore = useAb98UserStore() const { tel, userid: ab98Userid, name } = storeToRefs(ab98UserStore) @@ -102,7 +102,7 @@ async function handleSubmit() { })), paymentType: selectedPayment.value, mobile: tel.value, - name: name.value, + name: isInternal === 2 ? qyName.value : name.value, qyUserid: isInternal === 2 ? qyUserid.value : ab98Userid.value, isInternal: isInternal }