Compare commits
2 Commits
2cdcb1394c
...
3b015f3e9c
Author | SHA1 | Date | |
---|---|---|---|
|
3b015f3e9c | ||
|
0a3028e9f8 |
@ -8,9 +8,9 @@ definePageMeta({
|
|||||||
layout: 'default',
|
layout: 'default',
|
||||||
i18n: 'menu.profile',
|
i18n: 'menu.profile',
|
||||||
})
|
})
|
||||||
const {t}=useI18n();
|
const { t } = useI18n();
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const { userInfo,payment } = authStore()
|
const { userInfo, payment } = authStore()
|
||||||
const showMyList = ref([])
|
const showMyList = ref([])
|
||||||
const localState = ref({
|
const localState = ref({
|
||||||
finished: true,
|
finished: true,
|
||||||
@ -18,7 +18,7 @@ const localState = ref({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const groupByDate = (data) => {
|
const groupByDate = (data) => {
|
||||||
|
|
||||||
if (!Array.isArray(data)) return []
|
if (!Array.isArray(data)) return []
|
||||||
|
|
||||||
return Object.values(data.reduce((acc, curr) => {
|
return Object.values(data.reduce((acc, curr) => {
|
||||||
@ -38,7 +38,7 @@ const fetchData = async () => {
|
|||||||
showMyList.value = groupByDate(res.data.data)
|
showMyList.value = groupByDate(res.data.data)
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const onRefresh = async () => {
|
const onRefresh = async () => {
|
||||||
@ -48,23 +48,27 @@ const onRefresh = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const goPay = (item) => {
|
const goPay = (item) => {
|
||||||
payment.value.leftPrice=item.leftCnyPrice
|
payment.value.leftPrice = item.leftCnyPrice
|
||||||
payment.value.nickName=item.nickName
|
payment.value.nickName = item.nickName
|
||||||
payment.value.leftCurrency=item.leftCurrency
|
payment.value.leftCurrency = item.leftCurrency
|
||||||
payment.value.buyUid=item.uuid
|
payment.value.buyUid = item.uuid
|
||||||
payment.value.artworkTitle=item?.auctionArtworkInfo?.artworkTitle
|
payment.value.artworkTitle = item?.auctionArtworkInfo?.artworkTitle
|
||||||
payment.value.auctionArtworkUuid=item?.auctionArtworkUuid
|
payment.value.auctionArtworkUuid = item?.auctionArtworkUuid
|
||||||
if (item.status===1){
|
if (item.status === 1) {
|
||||||
router.push('/signature/protocol')
|
router.push('/signature/protocol')
|
||||||
}else if (item.status===4){
|
} else if (item.status === 4) {
|
||||||
router.push('/payment')
|
router.push('/payment')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const goDetail = (item) => router.push({ path: '/artDetail', query: { uuid: item.uuid } })
|
const goDetail = (item) => router.push({ path: '/artDetail', query: { uuid: item.uuid } })
|
||||||
const statusLabel={
|
const statusLabel = {
|
||||||
1:t('payment.text4'),
|
1: t('payment.text4'),
|
||||||
2:t('payment.text2'),
|
2: t('payment.text2'),
|
||||||
4:t('payment.text6'),
|
4: t('payment.text6'),
|
||||||
|
}
|
||||||
|
const backLogin=()=>{
|
||||||
|
localStorage.clear()
|
||||||
|
router.replace('/login')
|
||||||
}
|
}
|
||||||
fetchData()
|
fetchData()
|
||||||
</script>
|
</script>
|
||||||
@ -72,11 +76,16 @@ fetchData()
|
|||||||
<template>
|
<template>
|
||||||
<div class="w-[100vw] bg-[url('@/static/images/3532@2x.png')] bg-cover pt-43px flex-grow-1 flex flex-col">
|
<div class="w-[100vw] bg-[url('@/static/images/3532@2x.png')] bg-cover pt-43px flex-grow-1 flex flex-col">
|
||||||
<!-- 用户信息 -->
|
<!-- 用户信息 -->
|
||||||
<div class="flex items-center px-16px mb-43px">
|
<div class="flex items-center justify-between">
|
||||||
<img class="w-57px h-57px mr-23px" src="@/static/images/5514@2x.png" alt="">
|
<div class="flex items-center px-16px">
|
||||||
<div class="flex flex-col">
|
<img class="w-57px h-57px mr-23px" src="@/static/images/5514@2x.png" alt="">
|
||||||
<div class="text-18px text-#181818">{{ userInfo.realName }}</div>
|
<div class="flex flex-col">
|
||||||
<div class="text-#575757 text-14px">{{ userInfo.telNum }}</div>
|
<div class="text-18px text-#181818">{{ userInfo.realName }}</div>
|
||||||
|
<div class="text-#575757 text-14px">{{ userInfo.telNum }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class=" px-16px">
|
||||||
|
<van-button plain @click="backLogin" type="primary" size="small" class="w-50px !h-30px">退出</van-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -93,12 +102,8 @@ fetchData()
|
|||||||
<div class="text-#000 text-16px border-b-3 border-b-#2B53AC w-80px h-36px">{{ $t('home.my_lots') }}</div>
|
<div class="text-#000 text-16px border-b-3 border-b-#2B53AC w-80px h-36px">{{ $t('home.my_lots') }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<van-pull-refresh
|
<van-pull-refresh v-model="localState.refreshing" :success-duration="700" class="h-full grow-1"
|
||||||
v-model="localState.refreshing"
|
@refresh="onRefresh">
|
||||||
:success-duration="700"
|
|
||||||
class="h-full grow-1"
|
|
||||||
@refresh="onRefresh"
|
|
||||||
>
|
|
||||||
<template #success>
|
<template #success>
|
||||||
<van-icon name="success" /> <span>{{ $t('home.refresh_show') }}</span>
|
<van-icon name="success" /> <span>{{ $t('home.refresh_show') }}</span>
|
||||||
</template>
|
</template>
|
||||||
@ -106,32 +111,24 @@ fetchData()
|
|||||||
<!-- 空状态 -->
|
<!-- 空状态 -->
|
||||||
<div v-if="showMyList?.length < 1" class="flex flex-col items-center pt-100px">
|
<div v-if="showMyList?.length < 1" class="flex flex-col items-center pt-100px">
|
||||||
<img class="w-103px h-88px mb-19px" src="@/static/images/zu5512@2x.png" alt="">
|
<img class="w-103px h-88px mb-19px" src="@/static/images/zu5512@2x.png" alt="">
|
||||||
<div class="text-14px text-#575757">{{$t('profile.text1')}}</div>
|
<div class="text-14px text-#575757">{{ $t('profile.text1') }}</div>
|
||||||
<div class="text-14px text-#575757">{{$t('profile.text2')}}</div>
|
<div class="text-14px text-#575757">{{ $t('profile.text2') }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 列表内容 -->
|
<!-- 列表内容 -->
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div v-for="group in showMyList" :key="group.userCreatedAt" class="px-16px pt-14px">
|
<div v-for="group in showMyList" :key="group.userCreatedAt" class="px-16px pt-14px">
|
||||||
<div class="text-#575757 text-14px mb-3px">{{ group.userCreatedAt }}</div>
|
<div class="text-#575757 text-14px mb-3px">{{ group.userCreatedAt }}</div>
|
||||||
<div
|
<div v-for="item in group.list" :key="item.uuid" class="flex mb-22px" @click="goDetail(item)">
|
||||||
v-for="item in group.list"
|
<x-image class="w-80px h-80px flex-shrink-0 mr-10px rounded-4px overflow-hidden"
|
||||||
:key="item.uuid"
|
:src="item?.auctionArtworkInfo?.artwork?.hdPic" :preview="false" />
|
||||||
class="flex mb-22px"
|
|
||||||
@click="goDetail(item)"
|
|
||||||
>
|
|
||||||
<x-image
|
|
||||||
class="w-80px h-80px flex-shrink-0 mr-10px rounded-4px overflow-hidden"
|
|
||||||
:src="item?.auctionArtworkInfo?.artwork?.hdPic"
|
|
||||||
:preview="false"
|
|
||||||
/>
|
|
||||||
<div class="flex flex-col justify-between grow-1">
|
<div class="flex flex-col justify-between grow-1">
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
<div class="text-#000 text-16px ellipsis line-height-21px">
|
<div class="text-#000 text-16px ellipsis line-height-21px">
|
||||||
{{ item?.auctionArtworkInfo?.artworkTitle }}
|
{{ item?.auctionArtworkInfo?.artworkTitle }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-14px text-right text-#3C55B2 ">
|
<div class="text-14px text-right text-#3C55B2 ">
|
||||||
{{statusLabel[item.status]}}
|
{{ statusLabel[item.status] }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -139,18 +136,15 @@ fetchData()
|
|||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
<div>
|
<div>
|
||||||
<div class="text-#575757 text-14px line-height-none mb-5px">
|
<div class="text-#575757 text-14px line-height-none mb-5px">
|
||||||
{{ $t('home.start_price') }}:{{item.auctionArtworkInfo?.startPriceCurrency}} {{item.auctionArtworkInfo?.startPrice}}
|
{{ $t('home.start_price') }}:{{ item.auctionArtworkInfo?.startPriceCurrency }}
|
||||||
</div>
|
{{ item.auctionArtworkInfo?.startPrice }}
|
||||||
|
</div>
|
||||||
<div class="text-#B58047 text-14px line-height-none">
|
<div class="text-#B58047 text-14px line-height-none">
|
||||||
{{ $t('home.close_price') }}:{{item.baseCurrency}} {{item.baseMoney}}
|
{{ $t('home.close_price') }}:{{ item.baseCurrency }} {{ item.baseMoney }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<van-button
|
<van-button v-if="[1, 3, 4].includes(item.status)" class="w-73px !h-30px" type="primary"
|
||||||
v-if="[1,3,4].includes(item.status)"
|
@click.stop="goPay(item)">
|
||||||
class="w-73px !h-30px"
|
|
||||||
type="primary"
|
|
||||||
@click.stop="goPay(item)"
|
|
||||||
>
|
|
||||||
<span class="text-12px">{{ $t('art_detail_page.button') }}</span>
|
<span class="text-12px">{{ $t('art_detail_page.button') }}</span>
|
||||||
</van-button>
|
</van-button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -84,10 +84,10 @@ export default defineNuxtConfig({
|
|||||||
],
|
],
|
||||||
// stripe支付CDN引用
|
// stripe支付CDN引用
|
||||||
script: [
|
script: [
|
||||||
{
|
// {
|
||||||
src: 'https://js.stripe.com/v3/',
|
// src: 'https://js.stripe.com/v3/',
|
||||||
defer: true // 可选,建议添加 defer
|
// defer: true // 可选,建议添加 defer
|
||||||
}
|
// }
|
||||||
],
|
],
|
||||||
meta: [
|
meta: [
|
||||||
{ name: 'viewport', content: 'width=device-width, initial-scale=1, viewport-fit=cover,user-scalable=no' },
|
{ name: 'viewport', content: 'width=device-width, initial-scale=1, viewport-fit=cover,user-scalable=no' },
|
||||||
|
Loading…
Reference in New Issue
Block a user