feat(config): 更新路由名称并添加新的收集码相关页面

- 在 app/config/index.js 中更新了 useAppHeaderRouteNames 数组,添加了新的路由名称
- 修改了 collectCode/mine/components/codeCard/index.vue 中的 QR 码生成逻辑
- 移除了不必要的 console.log 语句和未使用的变量- 优化了代码结构,提高了代码可读性
This commit is contained in:
xingyy 2025-02-20 11:43:05 +08:00
parent 43b1afb8f0
commit 7064c6b36d
2 changed files with 5 additions and 15 deletions

View File

@ -1,3 +1,2 @@
export const useAppFooterRouteNames = ['index', 'profile']
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']
export const useAppHeaderRouteNames= ['index', 'profile','login','collectCode-login','collectCode-mine','payment-result','collectCode-signature-personal-Info']

View File

@ -20,11 +20,10 @@ const props = defineProps({
const itemLabel=(data)=>{ const itemLabel=(data)=>{
return statusLabel.find(x=>x.value===data.payStatus) return statusLabel.find(x=>x.value===data.payStatus)
} }
const config = useRuntimeConfig()
const getQRBase64 = async () => { 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}&currency=${props.data.currency}`) const url=`${window.location.origin}/collectCode/signature/personal-Info?number=2&qrUid=${props.data.qrUid}}`
try { 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}&currency=${props.data.currency}`, { return await QRCode.toDataURL(url, {
width: 200, width: 200,
margin: 4, margin: 4,
errorCorrectionLevel: 'H' errorCorrectionLevel: 'H'
@ -34,15 +33,7 @@ const getQRBase64 = async () => {
return null return null
} }
} }
const openRo=ref({}) const openQrCode=async ()=>{
const openQrCode=async (data)=>{
const res=await offlineQrcode({
qrUid:data.qrUid
})
if (res.status===0){
openRo.value=res.data
}
console.log(res,'res')
const base64=await getQRBase64() const base64=await getQRBase64()
showImagePreview([base64]) showImagePreview([base64])
} }