refactor(payment): 优化支付相关页面和功能
- 修改支付页面中的价格显示,使用 leftCnyPrice 替代 leftPrice - 添加用户编号查询功能,在签名前检查用户是否已存在 - 优化直播室侧边按钮的支付逻辑,使用 leftCnyPrice 替代 leftPrice - 统一支付结果页面的展示逻辑,根据支付状态显示不同图片 - 修复艺术详情页面中的价格显示问题,使用 leftCnyPrice 替代 leftPrice - 优化个人资料页面中的支付逻辑,使用 leftCnyPrice 替代 leftPrice
This commit is contained in:
parent
b87e8d3346
commit
fae3728f5a
@ -21,3 +21,10 @@ export async function mobileLogin(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export async function sessionUserNo(data) {
|
||||||
|
return await request( {
|
||||||
|
url:'/api/v1/auction/sessionUserNo/check',
|
||||||
|
method: 'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
@ -16,13 +16,12 @@ const initData = async () => {
|
|||||||
if (res.status === 0) {
|
if (res.status === 0) {
|
||||||
detail.value = res.data
|
detail.value = res.data
|
||||||
detail.value.auctionArtworkInfo.userId=detail.value.userID
|
detail.value.auctionArtworkInfo.userId=detail.value.userID
|
||||||
console.log('detail.value',detail.value)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const goPay=()=>{
|
const goPay=()=>{
|
||||||
payment.value.leftPrice=detail.value.leftPrice
|
payment.value.leftPrice=detail.value.leftCnyPrice
|
||||||
payment.value.leftCurrency=detail.value.leftCurrency
|
payment.value.leftCurrency=detail.value.leftCurrency
|
||||||
payment.value.buyUid=detail.value.uuid
|
payment.value.buyUid=detail.value.uuid
|
||||||
payment.value.auctionArtworkUuid=detail.value?.auctionArtworkUuid
|
payment.value.auctionArtworkUuid=detail.value?.auctionArtworkUuid
|
||||||
|
@ -27,7 +27,8 @@ const goHome=()=>{
|
|||||||
<template>
|
<template>
|
||||||
<div class="w-[100vw] h-screen-nav bg-[url('@/static/images/3532@2x.png')] bg-cover grow-1 flex flex-col items-center px-30px">
|
<div class="w-[100vw] h-screen-nav bg-[url('@/static/images/3532@2x.png')] bg-cover grow-1 flex flex-col items-center px-30px">
|
||||||
<div class="flex flex-col items-center mt-150px">
|
<div class="flex flex-col items-center mt-150px">
|
||||||
<img class="w-119px h-120px mb-36px" src="@/static/images/5554@2x1.png" alt="">
|
<img v-if="resData.status===1" class="w-119px h-120px mb-36px" src="@/static/images/5554@2x1.png" alt="">
|
||||||
|
<img v-else class="w-119px h-120px mb-36px" src="@/static/images/zu6021@2x.png" alt="">
|
||||||
<div class="text-#000 text-16px mb-25px">{{statusLabel[resData.status]}}!</div>
|
<div class="text-#000 text-16px mb-25px">{{statusLabel[resData.status]}}!</div>
|
||||||
<div class="text-#999 text-16px">{{resData.currency}}{{resData.money}}</div>
|
<div class="text-#999 text-16px">{{resData.currency}}{{resData.money}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,6 +6,7 @@ import {codeAuthStore} from "@/stores-collect-code/auth/index.js";
|
|||||||
import {message} from "@/components/x-message/useMessage.js";
|
import {message} from "@/components/x-message/useMessage.js";
|
||||||
import countryCode from '@/pages/countryRegion/data/index.js'
|
import countryCode from '@/pages/countryRegion/data/index.js'
|
||||||
import {fddInfo, offlineQrcode} from "~/api-collect-code/goods/index.js";
|
import {fddInfo, offlineQrcode} from "~/api-collect-code/goods/index.js";
|
||||||
|
import {sessionUserNo} from "@/api-collect-code/auth/index.js";
|
||||||
import {signOffline} from "~/api/goods/index.js";
|
import {signOffline} from "~/api/goods/index.js";
|
||||||
const {formData,number,auctionArtworkUuid,qrUid,qrData}=codeAuthStore()
|
const {formData,number,auctionArtworkUuid,qrUid,qrData}=codeAuthStore()
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
@ -93,9 +94,7 @@ const initData= async ()=>{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!formData.value.countryCode){
|
if(!formData.value.countryCode){
|
||||||
console.log('formData.value.countryCode',!!formData.value.countryCode)
|
|
||||||
const defaultCountry = getDefaultCountry()
|
const defaultCountry = getDefaultCountry()
|
||||||
console.log('defaultCountry',defaultCountry)
|
|
||||||
formData.value.countryCode= defaultCountry.zone
|
formData.value.countryCode= defaultCountry.zone
|
||||||
}
|
}
|
||||||
if (route.query.zone){
|
if (route.query.zone){
|
||||||
@ -109,6 +108,15 @@ const nextClick=async ()=>{
|
|||||||
message.warning(t('signature.error.incompleteForm'))
|
message.warning(t('signature.error.incompleteForm'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
const res2=await sessionUserNo({
|
||||||
|
phone:formData.value.phone
|
||||||
|
})
|
||||||
|
if (res2.status===0){
|
||||||
|
if(res2.data.exist){
|
||||||
|
message.warning(`您的号牌是${res2.data.userInfo.auction_user_no}`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
//国内签署要用法大大
|
//国内签署要用法大大
|
||||||
if (formData.value.countryCode==='86'&&formData.value.cardType===1){
|
if (formData.value.countryCode==='86'&&formData.value.cardType===1){
|
||||||
const res=await fddInfo({
|
const res=await fddInfo({
|
||||||
|
@ -56,7 +56,7 @@ const paySide = computed(() => {
|
|||||||
|
|
||||||
const goPay = () => {
|
const goPay = () => {
|
||||||
payment.value.leftCurrency=auctionData.value.needPayBuys?.[0]?.leftCurrency
|
payment.value.leftCurrency=auctionData.value.needPayBuys?.[0]?.leftCurrency
|
||||||
payment.value.leftPrice=auctionData.value.needPayBuys?.[0]?.leftPrice
|
payment.value.leftPrice=auctionData.value.needPayBuys?.[0]?.leftCnyPrice
|
||||||
payment.value.buyUid=auctionData.value.needPayBuys?.[0]?.uuid
|
payment.value.buyUid=auctionData.value.needPayBuys?.[0]?.uuid
|
||||||
payment.value.auctionArtworkUuid=auctionData.value.needPayBuys?.[0]?.auctionArtworkUuid
|
payment.value.auctionArtworkUuid=auctionData.value.needPayBuys?.[0]?.auctionArtworkUuid
|
||||||
handleCapture()
|
handleCapture()
|
||||||
|
@ -7,6 +7,7 @@ import {liveStore} from "~/stores/live/index.js";
|
|||||||
import {ref} from "vue";
|
import {ref} from "vue";
|
||||||
const {pageRef,itemList,getArtworkList, loading: storeLoading,} = goodStore();
|
const {pageRef,itemList,getArtworkList, loading: storeLoading,} = goodStore();
|
||||||
const {auctionData} = liveStore()
|
const {auctionData} = liveStore()
|
||||||
|
const {t:$t} = useI18n()
|
||||||
const showDetail=ref(false)
|
const showDetail=ref(false)
|
||||||
const localState = ref({
|
const localState = ref({
|
||||||
finished: false,
|
finished: false,
|
||||||
@ -71,19 +72,23 @@ watch(()=>{
|
|||||||
watch(()=>props.show,async (newValue)=>{
|
watch(()=>props.show,async (newValue)=>{
|
||||||
if (newValue){
|
if (newValue){
|
||||||
if(auctionData.value?.artwork?.index>itemList.value?.length+1){
|
if(auctionData.value?.artwork?.index>itemList.value?.length+1){
|
||||||
const toast = showLoadingToast({
|
pageRef.value.pageSize = 5;
|
||||||
message: '加载中...',
|
const targetIndex = auctionData.value?.artwork?.index;
|
||||||
forbidClick: true,
|
const currentLength = itemList.value?.length || 0;
|
||||||
});
|
const needLoadTimes = Math.ceil((targetIndex - currentLength) / pageRef.value.pageSize);
|
||||||
pageRef.value.pageSize=auctionData.value?.artwork?.index-itemList.value?.length
|
|
||||||
await loadMore()
|
|
||||||
|
|
||||||
pageRef.value.pageSize=5
|
for(let i = 0; i < needLoadTimes; i++) {
|
||||||
|
pageRef.value.page++;
|
||||||
|
await getArtworkList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await nextTick();
|
||||||
|
scrollToCurrentItem();
|
||||||
|
} else {
|
||||||
nextTick(()=>{
|
nextTick(()=>{
|
||||||
scrollToCurrentItem()
|
scrollToCurrentItem();
|
||||||
toast.close()
|
});
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
@ -78,7 +78,8 @@ const goHome = () => {
|
|||||||
<div
|
<div
|
||||||
class="w-[100vw] h-screen-nav bg-[url('@/static/images/3532@2x.png')] bg-cover grow-1 flex flex-col items-center px-30px">
|
class="w-[100vw] h-screen-nav bg-[url('@/static/images/3532@2x.png')] bg-cover grow-1 flex flex-col items-center px-30px">
|
||||||
<div class="flex flex-col items-center mt-150px">
|
<div class="flex flex-col items-center mt-150px">
|
||||||
<img class="w-119px h-120px mb-36px" src="@/static/images/5554@2x1.png" alt="">
|
<img v-if="resData.status===1" class="w-119px h-120px mb-36px" src="@/static/images/5554@2x1.png" alt="">
|
||||||
|
<img v-else class="w-119px h-120px mb-36px" src="@/static/images/zu6021@2x.png" alt="">
|
||||||
<div class="text-#000 text-16px mb-25px">{{ statusLabel[resData.status] }}!</div>
|
<div class="text-#000 text-16px mb-25px">{{ statusLabel[resData.status] }}!</div>
|
||||||
<div class="text-#999 text-16px">{{ resData.currency }}{{ resData.money }}</div>
|
<div class="text-#999 text-16px">{{ resData.currency }}{{ resData.money }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -47,7 +47,7 @@ const onRefresh = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const goPay = (item) => {
|
const goPay = (item) => {
|
||||||
payment.value.leftPrice=item.leftPrice
|
payment.value.leftPrice=item.leftCnyPrice
|
||||||
payment.value.leftCurrency=item.leftCurrency
|
payment.value.leftCurrency=item.leftCurrency
|
||||||
payment.value.buyUid=item.uuid
|
payment.value.buyUid=item.uuid
|
||||||
payment.value.auctionArtworkUuid=item?.auctionArtworkUuid
|
payment.value.auctionArtworkUuid=item?.auctionArtworkUuid
|
||||||
|
BIN
app/static/images/zu6021@2x.png
Normal file
BIN
app/static/images/zu6021@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Loading…
Reference in New Issue
Block a user