From 7064c6b36dd880e5d0780b6786412dc092a33043 Mon Sep 17 00:00:00 2001 From: xingyy <64720302+Concur-max@users.noreply.github.com> Date: Thu, 20 Feb 2025 11:43:05 +0800 Subject: [PATCH] =?UTF-8?q?feat(config):=20=E6=9B=B4=E6=96=B0=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E5=90=8D=E7=A7=B0=E5=B9=B6=E6=B7=BB=E5=8A=A0=E6=96=B0?= =?UTF-8?q?=E7=9A=84=E6=94=B6=E9=9B=86=E7=A0=81=E7=9B=B8=E5=85=B3=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 app/config/index.js 中更新了 useAppHeaderRouteNames 数组,添加了新的路由名称 - 修改了 collectCode/mine/components/codeCard/index.vue 中的 QR 码生成逻辑 - 移除了不必要的 console.log 语句和未使用的变量- 优化了代码结构,提高了代码可读性 --- app/config/index.js | 5 ++--- .../mine/components/codeCard/index.vue | 15 +++------------ 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/app/config/index.js b/app/config/index.js index a7a8a50..13dc536 100644 --- a/app/config/index.js +++ b/app/config/index.js @@ -1,3 +1,2 @@ - -export const useAppFooterRouteNames= ['index', 'profile'] -export const useAppHeaderRouteNames= ['index', 'profile','login','collectCode-login','collectCode-mine','payment-result','collectCode-signature-personal-Info'] +export const useAppFooterRouteNames = ['index', 'profile'] +export const useAppHeaderRouteNames = ['index', 'profile', 'login', 'collectCode-login', 'collectCode-mine', 'payment-result', 'collectCode-signature-personal-Info', 'collectCode-signature-result','collectCode-payment-result'] diff --git a/app/pages/collectCode/mine/components/codeCard/index.vue b/app/pages/collectCode/mine/components/codeCard/index.vue index a38db14..ff7a58a 100644 --- a/app/pages/collectCode/mine/components/codeCard/index.vue +++ b/app/pages/collectCode/mine/components/codeCard/index.vue @@ -20,11 +20,10 @@ const props = defineProps({ const itemLabel=(data)=>{ return statusLabel.find(x=>x.value===data.payStatus) } -const config = useRuntimeConfig() const getQRBase64 = async () => { - console.log(`http://192.168.88.25:3000/collectCode/signature/personal-Info?number=2&auctionArtworkUuid=${openRo.value.auctionArtworkUuid}&qrUid=${props.data.qrUid}&price=${props.data.price}¤cy=${props.data.currency}`) + const url=`${window.location.origin}/collectCode/signature/personal-Info?number=2&qrUid=${props.data.qrUid}}` try { - return await QRCode.toDataURL(`http://192.168.88.25:3000/collectCode/signature/personal-Info?number=2&auctionArtworkUuid=${openRo.value.auctionArtworkUuid}&qrUid=${props.data.qrUid}&price=${props.data.price}¤cy=${props.data.currency}`, { + return await QRCode.toDataURL(url, { width: 200, margin: 4, errorCorrectionLevel: 'H' @@ -34,15 +33,7 @@ const getQRBase64 = async () => { return null } } -const openRo=ref({}) -const openQrCode=async (data)=>{ -const res=await offlineQrcode({ - qrUid:data.qrUid - }) - if (res.status===0){ - openRo.value=res.data - } - console.log(res,'res') +const openQrCode=async ()=>{ const base64=await getQRBase64() showImagePreview([base64]) }