From 43b1afb8f0bb11ea81a07e635d245cb1f72287b6 Mon Sep 17 00:00:00 2001 From: xingyy <64720302+Concur-max@users.noreply.github.com> Date: Thu, 20 Feb 2025 11:35:23 +0800 Subject: [PATCH] =?UTF-8?q?feat(collect-code):=20=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?=E7=BA=BF=E4=B8=8B=E6=89=AB=E7=A0=81=E6=94=AF=E4=BB=98=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 offlineQrcode 和 createOrder 接口 - 实现个人资讯页面的数据获取和处理 - 添加支付页面,支持全款和部分款项支付 - 优化签名协议页面,使用新接口获取数据 - 新增支付结果页面,展示支付状态和金额 --- app/api-collect-code/goods/index.js | 16 ++++ app/components/x-van-select/index.vue | 9 +- .../mine/components/codeCard/index.vue | 17 +++- app/pages/collectCode/payment/index.vue | 96 ++++++++++++++----- .../collectCode/payment/result/index.vue | 44 +++++++++ .../signature/personal-Info/index.vue | 40 +++++--- .../collectCode/signature/protocol/index.vue | 6 +- app/stores-collect-code/auth/index.js | 9 ++ app/stores/auth/index.js | 1 + 9 files changed, 189 insertions(+), 49 deletions(-) create mode 100644 app/pages/collectCode/payment/result/index.vue diff --git a/app/api-collect-code/goods/index.js b/app/api-collect-code/goods/index.js index d5f0348..60a5206 100644 --- a/app/api-collect-code/goods/index.js +++ b/app/api-collect-code/goods/index.js @@ -44,4 +44,20 @@ export async function sessionUserNoCreate(data) { method: 'POST', data }) +} +export async function offlineQrcode(data) { + + return await request( { + url:'/api/v1/offlineQrcode/info', + method: 'POST', + data + }) +} +export async function createOrder(data) { + + return await request( { + url:'/api/v1/offlineQrcode/createOrder', + method: 'POST', + data + }) } \ No newline at end of file diff --git a/app/components/x-van-select/index.vue b/app/components/x-van-select/index.vue index 42706d0..db990b8 100644 --- a/app/components/x-van-select/index.vue +++ b/app/components/x-van-select/index.vue @@ -44,13 +44,16 @@ const displayText = computed(() => { const selected = props.columns.find(x => x.value === props.modelValue) return selected?.text || '' }) +const openPopup=()=>{ + show.value=true +} - - - - - - - + +
下一步 diff --git a/app/pages/collectCode/signature/protocol/index.vue b/app/pages/collectCode/signature/protocol/index.vue index 56272ea..00f1e35 100644 --- a/app/pages/collectCode/signature/protocol/index.vue +++ b/app/pages/collectCode/signature/protocol/index.vue @@ -7,13 +7,13 @@ definePageMeta({ title:'签署' }) const activeNames = ref(['1']); -const {formData,number,lotNo,price}=codeAuthStore() +const {formData,number,auctionArtworkUuid,qrData}=codeAuthStore() + const confirm=async ()=>{ if (formData.value.countryCode==='86'&&formData.value.cardType===1){ const res=await signOffline({ userInfo:formData.value, - bidNum:lotNo.value, - bidPrice:price.value, + auctionArtworkUuid:qrData.value.auctionArtworkUuid, signOrder:Number(number.value), }) if (res.status===0){ diff --git a/app/stores-collect-code/auth/index.js b/app/stores-collect-code/auth/index.js index 07ea5bb..cad4d3f 100644 --- a/app/stores-collect-code/auth/index.js +++ b/app/stores-collect-code/auth/index.js @@ -20,7 +20,16 @@ export const codeAuthStore = createGlobalState(() => { const price=useLocalStorage('price',undefined) const auctionArtworkUuid=useLocalStorage('auctionArtworkUuid',undefined) const number=useLocalStorage('number',undefined) + const qrUid=useLocalStorage('qrUid',undefined) + const cpayment=useLocalStorage('cpayment',{ + price:'', + currency:'' + }) + const qrData=useLocalStorage('qrData',{}) return{ + qrData, + qrUid, + cpayment, lotNo, price, auctionArtworkUuid, diff --git a/app/stores/auth/index.js b/app/stores/auth/index.js index a4123d2..b9cbec5 100644 --- a/app/stores/auth/index.js +++ b/app/stores/auth/index.js @@ -10,6 +10,7 @@ export const authStore = createGlobalState(() => { leftCurrency:'', buyUid:'' }) + return{ payment, checkoutSessionUrl,