Compare commits
9 Commits
9e6788dbb2
...
dee871759e
Author | SHA1 | Date | |
---|---|---|---|
|
dee871759e | ||
|
e23fed8c74 | ||
|
f3d5a3440c | ||
|
7a968f1fe6 | ||
|
1b996eafca | ||
|
bad45f8d82 | ||
|
efc47a27fd | ||
|
bda4666782 | ||
|
0f92a99b32 |
@ -14,3 +14,17 @@ export async function defaultDetail(data) {
|
||||
body: data,
|
||||
})
|
||||
}
|
||||
export async function artworkDetail(data) {
|
||||
const http = getHttp()
|
||||
return await http('/api/v1/m/artwork/detail', {
|
||||
method: 'POST',
|
||||
body: data,
|
||||
})
|
||||
}
|
||||
export async function userArtworks(data) {
|
||||
const http = getHttp()
|
||||
return await http('/api/v1/m/user/artworks', {
|
||||
method: 'POST',
|
||||
body: data,
|
||||
})
|
||||
}
|
@ -14,6 +14,7 @@ export function setupHttp() {
|
||||
const config = useRuntimeConfig()
|
||||
const baseURL = config.public.NUXT_PUBLIC_API_BASE
|
||||
const {token}= authStore()
|
||||
const router = useRouter()
|
||||
http = ofetch.create({
|
||||
baseURL,
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
@ -27,6 +28,9 @@ export function setupHttp() {
|
||||
if (response._data.status===1){
|
||||
message.error(response._data.msg)
|
||||
}
|
||||
if (response._data.status===401){
|
||||
router.replace('/login')
|
||||
}
|
||||
},
|
||||
async onResponseError({ response }) {
|
||||
const { message } = response._data
|
||||
|
@ -78,4 +78,7 @@ provide('slideDirection', slideDirection)
|
||||
.slide-right-leave-to {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
:root{
|
||||
--safe-area-inset-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
</style>
|
@ -11,13 +11,17 @@ const show = computed(() => {
|
||||
return false
|
||||
})
|
||||
const initData=()=>{
|
||||
active.value=route.path==='/'?0:1
|
||||
active.value=route.path==='/profile'?1:0
|
||||
}
|
||||
|
||||
onMounted(()=>{
|
||||
initData()
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="show">
|
||||
|
||||
<van-tabbar v-model="active" route placeholder fixed>
|
||||
<van-tabbar-item replace to="/">
|
||||
<span>{{ $t('tabbar.home') }}</span>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script setup>
|
||||
import { useAppHeaderRouteNames as routeWhiteList } from '~/config'
|
||||
import { homeStore } from "@/stores/goods/index.js";
|
||||
const { fullLive } = homeStore()
|
||||
import { goodStore } from "@/stores/goods/index.js";
|
||||
const { fullLive } = goodStore()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<script setup>
|
||||
|
||||
import error from '../images/error.png'
|
||||
import success from '../images/success.png'
|
||||
import warning from '../images/warning.png'
|
||||
|
@ -2,12 +2,14 @@
|
||||
<main class="flex flex-col min-h-svh">
|
||||
<AppHeader class="h-[var(--van-nav-bar-height)]" />
|
||||
<div class="flex-1 flex flex-col">
|
||||
<keep-alive>
|
||||
<slot />
|
||||
</keep-alive>
|
||||
</div>
|
||||
<AppFooter />
|
||||
</main>
|
||||
</template>
|
||||
<script setup >
|
||||
import { homeStore } from "@/stores/goods/index.js";
|
||||
const { fullLive } = homeStore()
|
||||
import { goodStore } from "@/stores/goods/index.js";
|
||||
const { fullLive } = goodStore()
|
||||
</script>
|
@ -11,7 +11,6 @@ const list = ref([
|
||||
}
|
||||
]);
|
||||
|
||||
// 记录定时器 ID
|
||||
let intervalId = null;
|
||||
|
||||
const addItem = () => {
|
||||
@ -32,7 +31,7 @@ const scrollToBottom = () => {
|
||||
if (container) {
|
||||
setTimeout(() => {
|
||||
container.scrollTop = container.scrollHeight;
|
||||
}, 100); // 延迟以确保动画开始
|
||||
}, 100);
|
||||
}
|
||||
};
|
||||
|
@ -2,12 +2,12 @@
|
||||
import {ref, onMounted, onBeforeUnmount} from 'vue'
|
||||
import Aliplayer from 'aliyun-aliplayer'
|
||||
import 'aliyun-aliplayer/build/skins/default/aliplayer-min.css'
|
||||
import sideButton from './components/sideButton/index.vue'
|
||||
import broadcast from './components/broadcast/index.vue'
|
||||
import sideButton from '~/pages/LiveRoom/components/SideButton/index.vue'
|
||||
import broadcast from '~/pages/LiveRoom/components/Broadcast/index.vue'
|
||||
import {liveStore} from "~/stores/live/index.js";
|
||||
import paymentResults from './components/paymentResults/index.vue'
|
||||
import paymentInput from './components/paymentInput/index.vue'
|
||||
import PressableButton from './components/sideButton/PressableButton.vue'
|
||||
import paymentResults from '~/pages/LiveRoom/components/PaymentResults/index.vue'
|
||||
import paymentInput from '~/pages/LiveRoom/components/PaymentInput/index.vue'
|
||||
import PressableButton from '~/pages/LiveRoom/components/SideButton/PressableButton.vue'
|
||||
|
||||
const player = ref(null)
|
||||
const {quoteStatus, changeStatus, show, playerId, show1} = liveStore()
|
||||
@ -59,7 +59,7 @@ const initializePlayer = () => {
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
initializePlayer()
|
||||
/* initializePlayer()*/
|
||||
})
|
||||
onBeforeUnmount(() => {
|
||||
if (player.value) {
|
||||
@ -74,11 +74,25 @@ const goPay = () => {
|
||||
|
||||
<template>
|
||||
<div class="relative h-full">
|
||||
<div :id="playerId" class="w-screen"
|
||||
:style="fullLive?'height: calc(100vh - var(--van-nav-bar-height))':'height:100%'"></div>
|
||||
<template v-if="fullLive">
|
||||
<div class="w-full h-full">
|
||||
<video
|
||||
class="h-full w-full"
|
||||
autoplay
|
||||
loop
|
||||
muted
|
||||
playsinline
|
||||
style=" object-fit: cover"
|
||||
>
|
||||
<source src="@/static/video/example.mp4" type="video/mp4" />
|
||||
您的浏览器不支持 HTML5 视频。
|
||||
</video>
|
||||
</div>
|
||||
<!-- <div :id="playerId" class="w-screen"
|
||||
:style="fullLive?'height: calc(100vh - var(--van-nav-bar-height))':'height:100%'"></div>-->
|
||||
<transition>
|
||||
<div v-if="fullLive">
|
||||
<sideButton class="absolute top-196px right-0 z-999"></sideButton>
|
||||
<div class="absolute top-505px left-1/2 transform -translate-x-1/2 flex flex-col items-center">
|
||||
<div class="absolute left-1/2 transform -translate-x-1/2 flex flex-col items-center" style="bottom:calc(var(--safe-area-inset-bottom) + 26px)">
|
||||
<div class="text-16px text-#FFB25F font-600">
|
||||
当前价:RMB
|
||||
<van-rolling-text class="my-rolling-text" :start-num="0" :target-num="3000" direction="up"/>
|
||||
@ -99,7 +113,9 @@ const goPay = () => {
|
||||
<div>
|
||||
</div>
|
||||
<paymentResults v-model:show="show1" type="error"/>
|
||||
</template>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
@ -109,7 +125,15 @@ const goPay = () => {
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.v-enter-active,
|
||||
.v-leave-active {
|
||||
transition: opacity 0.5s ease;
|
||||
}
|
||||
|
||||
.v-enter-from,
|
||||
.v-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
.my-rolling-text {
|
||||
--van-rolling-text-item-width: 10px;
|
||||
--van-rolling-text-font-size: 16px;
|
||||
|
@ -4,14 +4,13 @@
|
||||
v-for="(item, index) in items"
|
||||
:key="index"
|
||||
class="w-full"
|
||||
@click="openShow"
|
||||
@click="openShow(item,index)"
|
||||
>
|
||||
<div class="relative w-full">
|
||||
<van-image
|
||||
:src="item.image"
|
||||
:style="{ aspectRatio: item.ratio }"
|
||||
fit="cover"
|
||||
class="w-full"
|
||||
<img
|
||||
:src="item.artwork?.hdPic"
|
||||
class="w-full object-cover rounded-4px"
|
||||
|
||||
/>
|
||||
<div
|
||||
class="absolute left-[8px] top-[8px] h-[17px] w-[45px] flex items-center justify-center bg-[#2b53ac] text-[12px] text-[#fff]"
|
||||
@ -21,16 +20,16 @@
|
||||
</div>
|
||||
<div class="pt-[8px]">
|
||||
<div class="text-[14px] text-[#000000] leading-[20px]">
|
||||
{{ item.title }}
|
||||
{{ item.name }}
|
||||
</div>
|
||||
<div class="mt-[4px] text-[12px] text-[#575757]">
|
||||
起拍价:{{ item.startingPrice }}
|
||||
起拍价:{{ item?.startPrice??0 }}
|
||||
</div>
|
||||
<div
|
||||
v-if="item.transactionPrice"
|
||||
v-if="item.soldPrice"
|
||||
class="mt-[4px] text-[12px] text-[#b58047]"
|
||||
>
|
||||
成交价:{{ item.transactionPrice }}
|
||||
成交价:{{ item?.startPrice??0 }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -48,7 +47,7 @@ const props = defineProps({
|
||||
|
||||
const emit = defineEmits(['openShow']);
|
||||
|
||||
const openShow = () => {
|
||||
emit('openShow');
|
||||
const openShow = (item,index) => {
|
||||
emit('openShow', item,index);
|
||||
};
|
||||
</script>
|
@ -1,81 +1,78 @@
|
||||
<script setup>
|
||||
|
||||
import Column from "@/pages/home/components/Column/index.vue";
|
||||
import {artworkList} from "@/api/goods/index.js";
|
||||
import {homeStore} from "~/stores/goods/index.js";
|
||||
import Column from "~/pages/home/components/Column/index.vue";
|
||||
import {goodStore} from "~/stores/goods";
|
||||
import {artworkDetail, artworkList} from "~/api/goods";
|
||||
import {useRect} from "@vant/use";
|
||||
const {itemList, pageRef,auctionDetail,liveRef,artWorkDetail,currentItem} = goodStore();
|
||||
const loading = ref(false);
|
||||
const showHeight = ref('');
|
||||
const show = ref(false);
|
||||
const loading1 = ref(false);
|
||||
const finished = ref(false);
|
||||
const {fullLive,actionDetails,itemList} = homeStore();
|
||||
const list = ref([{
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/637d95b4-2ae9-4a74-bd60-a3a9d2ca2ca0.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: 'RMB 10,000',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/f7b65e23-ce21-41b4-8e58-9e6dc6950727.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: '',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/41eceb23-d168-4049-ae8e-48c5328b192f.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: '',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/25c3f03c-9e0b-456b-963f-79b3d812c89a.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: '',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/25c3f03c-9e0b-456b-963f-79b3d812c89a.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: '',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/25c3f03c-9e0b-456b-963f-79b3d812c89a.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: '',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/637d95b4-2ae9-4a74-bd60-a3a9d2ca2ca0.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: 'RMB 10,000',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/637d95b4-2ae9-4a74-bd60-a3a9d2ca2ca0.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: 'RMB 10,000',
|
||||
}])
|
||||
const getArtworkList=async ()=>{
|
||||
const res= await artworkList({auctionUuid: auctionDetail.value.uuid,...pageRef.value})
|
||||
if (res.status===0){
|
||||
itemList.value.push(...res.data.data)
|
||||
pageRef.value.itemCount=res.data.count
|
||||
}
|
||||
}
|
||||
const loadData = async () => {
|
||||
pageRef.value.page++
|
||||
await getArtworkList()
|
||||
loading.value = false;
|
||||
if (pageRef.value.itemCount <= itemList.value.length) {
|
||||
finished.value = true
|
||||
}
|
||||
};
|
||||
const columns = computed(() => {
|
||||
const result = [[], []];
|
||||
// 确保 itemList 有值
|
||||
if (itemList.value && itemList.value.length > 0) {
|
||||
itemList.value.forEach((item, index) => {
|
||||
result[index % 2].push(item);
|
||||
result[index % 2].push({...item, index});
|
||||
});
|
||||
}
|
||||
return result;
|
||||
});
|
||||
const loadData = async () => {
|
||||
// 加载数据逻辑...
|
||||
const refreshData = async () => {
|
||||
pageRef.value.page = 1
|
||||
finished.value=false
|
||||
const res= await artworkList({auctionUuid: auctionDetail.value.uuid,...pageRef.value})
|
||||
if (res.status===0){
|
||||
itemList.value=res.data.data
|
||||
pageRef.value.itemCount=res.data.count
|
||||
}
|
||||
loading1.value = false
|
||||
}
|
||||
|
||||
const getDetail=async ()=>{
|
||||
const res=await artworkDetail({uuid:currentItem.value.artworkUuid})
|
||||
if (res.status===0){
|
||||
artWorkDetail.value
|
||||
}
|
||||
}
|
||||
const openShow = (item,index) => {
|
||||
currentItem.value=item
|
||||
getDetail()
|
||||
const rect = useRect(liveRef.value.$el);
|
||||
showHeight.value = rect.height;
|
||||
nextTick(() => {
|
||||
show.value = true;
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="px-[16px] pt-[16px]">
|
||||
<van-pull-refresh>
|
||||
<van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="loadData">
|
||||
<van-pull-refresh v-model="loading1" success-text="刷新成功" @refresh="refreshData">
|
||||
<van-list :immediate-check="false" v-model:loading="loading" :finished="finished" finished-text="没有更多了"
|
||||
@load="loadData">
|
||||
<div class="w-full flex gap-[16px]">
|
||||
<Column v-for="(column, colIndex) in columns" :key="colIndex" :items="column" />
|
||||
<Column v-for="(column, colIndex) in columns" :key="colIndex" :colIndex="colIndex" :items="column" @openShow="openShow" />
|
||||
</div>
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
<van-action-sheet teleport="#__nuxt" :round="false" v-model:show="show" title="拍品详情">
|
||||
<div class="content bg-[#F0F0F0]" :style="`height: calc(100vh - ${showHeight + 85}px)`">
|
||||
<itemDetail/>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -1,50 +0,0 @@
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
items: Array
|
||||
});
|
||||
|
||||
const emit = defineEmits(['openShow']);
|
||||
|
||||
const openShow = () => {
|
||||
emit('openShow');
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<div class="flex flex-1 flex-col gap-[16px]">
|
||||
<div
|
||||
v-for="(item, index) in items"
|
||||
:key="index"
|
||||
class="w-full"
|
||||
@click="openShow"
|
||||
>
|
||||
<div class="relative w-full">
|
||||
<van-image
|
||||
:src="item.image"
|
||||
:style="{ aspectRatio: item.ratio }"
|
||||
fit="cover"
|
||||
class="w-full"
|
||||
/>
|
||||
<div
|
||||
class="absolute left-[8px] top-[8px] h-[17px] w-[45px] flex items-center justify-center bg-[#2b53ac] text-[12px] text-[#fff]"
|
||||
>
|
||||
LOT{{ item.index + 1 }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="pt-[8px]">
|
||||
<div class="text-[14px] text-[#000000] leading-[20px]">
|
||||
{{ item.title }}
|
||||
</div>
|
||||
<div class="mt-[4px] text-[12px] text-[#575757]">
|
||||
起拍价:{{ item.startingPrice }}
|
||||
</div>
|
||||
<div
|
||||
v-if="item.transactionPrice"
|
||||
class="mt-[4px] text-[12px] text-[#b58047]"
|
||||
>
|
||||
成交价:{{ item.transactionPrice }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -1,134 +1,44 @@
|
||||
<script setup>
|
||||
import {useRect} from '@vant/use';
|
||||
import LiveRoom from '@/pages/LiveRoom/index.client.vue';
|
||||
import itemDetail from '@/components/itemDetail/index.vue';
|
||||
import {homeStore} from "@/stores/goods/index.js";
|
||||
import Column from './components/Column/index.vue'
|
||||
|
||||
const {fullLive} = homeStore();
|
||||
import {goodStore} from "@/stores/goods/index.js";
|
||||
import ItemList from './components/ItemList/index.vue'
|
||||
import Cescribe from './components/Cescribe/index.vue'
|
||||
import {artworkList} from "~/api/goods/index.js";
|
||||
const {fullLive,getAuctionDetail,auctionDetail,itemList,pageRef,liveRef} = goodStore();
|
||||
definePageMeta({
|
||||
layout: 'default',
|
||||
i18n: 'menu.home',
|
||||
})
|
||||
const liveRef = ref(null);
|
||||
const loading = ref(false);
|
||||
const finished = ref(false);
|
||||
const refreshing = ref(false);
|
||||
const page = ref(1);
|
||||
const show = ref(false);
|
||||
const showHeight = ref('');
|
||||
const list = ref([{
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/637d95b4-2ae9-4a74-bd60-a3a9d2ca2ca0.png',
|
||||
title: '张天赐 | 日出而作,日落而息1',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: 'RMB 10,000',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/f7b65e23-ce21-41b4-8e58-9e6dc6950727.png',
|
||||
title: '张天赐 | 日出而作,日落而息2',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: '',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/41eceb23-d168-4049-ae8e-48c5328b192f.png',
|
||||
title: '张天赐 | 日出而作,日落而息3',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: '',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/25c3f03c-9e0b-456b-963f-79b3d812c89a.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: '',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/25c3f03c-9e0b-456b-963f-79b3d812c89a.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: '',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/25c3f03c-9e0b-456b-963f-79b3d812c89a.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: '',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/637d95b4-2ae9-4a74-bd60-a3a9d2ca2ca0.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: 'RMB 10,000',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/637d95b4-2ae9-4a74-bd60-a3a9d2ca2ca0.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: 'RMB 10,000',
|
||||
}])
|
||||
|
||||
const loadData = async () => {
|
||||
// 加载数据逻辑...
|
||||
};
|
||||
|
||||
const onRefresh = () => {
|
||||
finished.value = false;
|
||||
page.value = 1;
|
||||
refreshing.value = true;
|
||||
loadData();
|
||||
};
|
||||
|
||||
const columns = computed(() => {
|
||||
const result = [[], []];
|
||||
list.value.forEach((item, index) => {
|
||||
// 为每个项目添加一个 index 属性
|
||||
result[index % 2].push({ ...item, index });
|
||||
});
|
||||
return result;
|
||||
});
|
||||
|
||||
const openShow = () => {
|
||||
const rect = useRect(liveRef.value.$el);
|
||||
showHeight.value = rect.height;
|
||||
nextTick(() => {
|
||||
show.value = true;
|
||||
});
|
||||
};
|
||||
|
||||
const changeLive = () => {
|
||||
fullLive.value = true;
|
||||
};
|
||||
const initData=async ()=>{
|
||||
await getAuctionDetail()
|
||||
const res= await artworkList({auctionUuid: auctionDetail.value.uuid,...pageRef.value})
|
||||
if (res.status===0){
|
||||
itemList.value=res.data.data
|
||||
pageRef.value.itemCount=res.data.count
|
||||
}
|
||||
}
|
||||
initData()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex-grow-1">
|
||||
<div @click="changeLive" :class="['changeLive', fullLive ? 'expanded' : 'collapsed']">
|
||||
<client-only>
|
||||
<LiveRoom ref="liveRef" :fullLive="fullLive"/>
|
||||
<LiveRoom @click="changeLive" :class="['changeLive', fullLive ? 'expanded' : 'collapsed']" ref="liveRef" :fullLive="fullLive"/>
|
||||
</client-only>
|
||||
</div>
|
||||
<transition name="fade">
|
||||
<div v-show="!fullLive" class="bg-#fff">
|
||||
<van-tabs sticky animated>
|
||||
<van-tab title="拍品列表">
|
||||
<div class="px-[16px] pt-[16px]">
|
||||
<van-pull-refresh>
|
||||
<van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="loadData">
|
||||
<div class="w-full flex gap-[16px]">
|
||||
<Column v-for="(column, colIndex) in columns" :key="colIndex" :colIndex="colIndex" :items="column" @openShow="openShow"/>
|
||||
</div>
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
</div>
|
||||
<ItemList></ItemList>
|
||||
</van-tab>
|
||||
<van-tab title="拍卖说明">
|
||||
<div class="px-16px pt-14px">
|
||||
<div class="text-#575757 text-14px">
|
||||
这里是后台富文本配置的说明,啊即可打开三等奖撒度老师的湿答答是快乐的阿四大皆空
|
||||
</div>
|
||||
</div>
|
||||
<Cescribe></Cescribe>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
<van-back-top right="15vw" bottom="10vh"/>
|
||||
<van-action-sheet :round="false" v-model:show="show" title="拍品详情">
|
||||
<div class="content bg-[#F0F0F0]" :style="`height: calc(100vh - ${showHeight + 85}px)`">
|
||||
<itemDetail/>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
<style>
|
||||
|
@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n'
|
||||
import countryCode from '../countryRegion/data/index.js'
|
||||
import {senCode, userLogin} from "@/api/auth/index.js";
|
||||
import {authStore} from "~/stores/auth/index.js";
|
||||
import {message} from '@/components/x-message/useMessage.js'
|
||||
const {userInfo,token}= authStore()
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
@ -13,26 +14,31 @@ definePageMeta({
|
||||
i18n: 'login.title',
|
||||
})
|
||||
const loadingRef=ref({
|
||||
loading1:false
|
||||
loading1:false,
|
||||
loading2:false,
|
||||
})
|
||||
const isExist=ref(false)//帐号是否存在 true存在
|
||||
const isReal=ref(false) //isReal 是否实名过
|
||||
function goToPage() {
|
||||
router.push('/countryRegion');
|
||||
}
|
||||
const interval=ref(null)
|
||||
const startCountdown=()=> {
|
||||
if (interval.value){
|
||||
clearInterval(interval.value);
|
||||
}
|
||||
countdown.value = 60;
|
||||
const interval = setInterval(() => {
|
||||
interval.value = setInterval(() => {
|
||||
if (countdown.value > 0) {
|
||||
countdown.value--;
|
||||
} else {
|
||||
clearInterval(interval);
|
||||
clearInterval(interval.value);
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
const countdown = ref(0);
|
||||
const phoneNum = ref('17630920520')
|
||||
const code = ref('655119')
|
||||
const code = ref('123789')
|
||||
const pane = ref(0)
|
||||
const showKeyboard = ref(false);
|
||||
// 根据语言获取默认国家
|
||||
@ -79,31 +85,32 @@ watch(locale, () => {
|
||||
})
|
||||
const vanSwipeRef=ref(null)
|
||||
const getCode =async () => {
|
||||
// loadingRef.value.loading1=true
|
||||
// const res=await senCode({
|
||||
// telNum:phoneNum.value,
|
||||
// zone:selectedZone.value
|
||||
// })
|
||||
// loadingRef.value.loading1=false
|
||||
// if (res.status===0){
|
||||
// pane.value = 1
|
||||
// vanSwipeRef.value?.swipeTo(pane.value)
|
||||
// showKeyboard.value=true
|
||||
// startCountdown();
|
||||
//
|
||||
// }
|
||||
loadingRef.value.loading1=true
|
||||
const res=await senCode({
|
||||
telNum:phoneNum.value,
|
||||
zone:selectedZone.value
|
||||
})
|
||||
loadingRef.value.loading1=false
|
||||
if (res.status===0){
|
||||
pane.value = 1
|
||||
vanSwipeRef.value?.swipeTo(pane.value)
|
||||
showKeyboard.value=true
|
||||
startCountdown();
|
||||
|
||||
}
|
||||
/* pane.value = 1
|
||||
vanSwipeRef.value?.swipeTo(pane.value)
|
||||
showKeyboard.value=true
|
||||
startCountdown();*/
|
||||
|
||||
}
|
||||
const goBack = () => {
|
||||
code.value = ''
|
||||
pane.value = 0
|
||||
vanSwipeRef.value?.swipeTo(pane.value)
|
||||
}
|
||||
const goLogin =async () => {
|
||||
loadingRef.value.loading2=true
|
||||
const res=await userLogin({
|
||||
telNum:phoneNum.value,
|
||||
zone:selectedZone.value,
|
||||
@ -112,10 +119,14 @@ const goLogin =async () => {
|
||||
if (res.status===0){
|
||||
userInfo.value=res.data.accountInfo
|
||||
token.value=res.data.token
|
||||
|
||||
if (!res.data.isReal){
|
||||
router.push('/realAuth');
|
||||
await router.push('/realAuth');
|
||||
}else {
|
||||
await router.push('/');
|
||||
}
|
||||
}
|
||||
loadingRef.value.loading2=false
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -164,7 +175,7 @@ const goLogin =async () => {
|
||||
{{ $t('login.reSend') }}<span v-if="countdown>0">({{countdown}})</span>
|
||||
</div>
|
||||
<div class="mt-[17px]">
|
||||
<van-button v-if="code.length === 6" type="primary" block style="height: 48px" @click="goLogin">{{
|
||||
<van-button v-if="code.length === 6" type="primary" block :loading="loadingRef.loading2" :loading-text="$t('login.login')" style="height: 48px" @click="goLogin">{{
|
||||
$t('login.login')
|
||||
}}</van-button>
|
||||
<van-button v-else type="primary" color="#D3D3D3" block style="height: 48px">{{ $t('login.login') }}</van-button>
|
||||
|
@ -1,9 +1,20 @@
|
||||
<script setup>
|
||||
import {userArtworks} from "~/api/goods/index.js";
|
||||
import {authStore} from "~/stores/auth/index.js";
|
||||
|
||||
definePageMeta({
|
||||
layout: 'default',
|
||||
title: '我的',
|
||||
i18n: 'menu.profile',
|
||||
})
|
||||
const {userInfo}= authStore()
|
||||
const initData=async ()=>{
|
||||
const res=await userArtworks({})
|
||||
if (res.status===0){
|
||||
|
||||
}
|
||||
}
|
||||
initData()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -13,8 +24,8 @@ definePageMeta({
|
||||
<img class="w-57px h-57px" src="@/static/images/5514@2x.png" alt="">
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<div class="text-18px text-#181818">张三</div>
|
||||
<div class="text-#575757 text-14px">15834362333</div>
|
||||
<div class="text-18px text-#181818">{{userInfo.realName}}</div>
|
||||
<div class="text-#575757 text-14px">{{userInfo.telNum}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-grow-1">
|
||||
|
BIN
app/static/video/example.mp4
Normal file
BIN
app/static/video/example.mp4
Normal file
Binary file not shown.
@ -2,7 +2,7 @@ import { createGlobalState,useLocalStorage } from '@vueuse/core'
|
||||
export const authStore = createGlobalState(() => {
|
||||
const token=useLocalStorage('token','')
|
||||
const RefreshToken=useLocalStorage('RefreshToken','')
|
||||
const userInfo=useLocalStorage('userInfo','')
|
||||
const userInfo=useLocalStorage('userInfo',{})
|
||||
return{
|
||||
userInfo,
|
||||
RefreshToken,
|
||||
|
@ -1,50 +1,38 @@
|
||||
import {createGlobalState} from '@vueuse/core'
|
||||
export const homeStore = createGlobalState(() => {
|
||||
import {artworkList, defaultDetail} from "~/api/goods/index.js";
|
||||
|
||||
export const goodStore = createGlobalState(() => {
|
||||
const actionDetails = ref({})
|
||||
const fullLive = ref(false)
|
||||
const itemList = ref([{
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/637d95b4-2ae9-4a74-bd60-a3a9d2ca2ca0.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: 'RMB 10,000',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/f7b65e23-ce21-41b4-8e58-9e6dc6950727.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: '',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/41eceb23-d168-4049-ae8e-48c5328b192f.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: '',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/25c3f03c-9e0b-456b-963f-79b3d812c89a.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: '',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/25c3f03c-9e0b-456b-963f-79b3d812c89a.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: '',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/25c3f03c-9e0b-456b-963f-79b3d812c89a.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: '',
|
||||
},{
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/637d95b4-2ae9-4a74-bd60-a3a9d2ca2ca0.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: 'RMB 10,000',
|
||||
},{
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/637d95b4-2ae9-4a74-bd60-a3a9d2ca2ca0.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: 'RMB 10,000',
|
||||
}])
|
||||
|
||||
const liveRef = ref(null);
|
||||
const currentItem=ref({})
|
||||
const myArtWorks=ref([])
|
||||
const pageRef = ref({
|
||||
page: 1,
|
||||
pageSize: 5,
|
||||
itemCount: 0
|
||||
})
|
||||
const artWorkDetail=ref(null)
|
||||
const itemList = ref([])
|
||||
const auctionDetail = ref({})
|
||||
const getAuctionDetail = async () => {
|
||||
const res = await defaultDetail({})
|
||||
if (res.status === 0) {
|
||||
auctionDetail.value = res.data
|
||||
}
|
||||
}
|
||||
const getArtworkList = async (page = pageRef.value) => {
|
||||
return artworkList({auctionUuid: auctionDetail.value.uuid, ...page})
|
||||
}
|
||||
return {
|
||||
myArtWorks,
|
||||
currentItem,
|
||||
artWorkDetail,
|
||||
liveRef,
|
||||
pageRef,
|
||||
getArtworkList,
|
||||
auctionDetail,
|
||||
getAuctionDetail,
|
||||
actionDetails,
|
||||
itemList,
|
||||
fullLive
|
||||
|
2
env/.env.test
vendored
2
env/.env.test
vendored
@ -1,5 +1,5 @@
|
||||
# 测试环境配置
|
||||
NUXT_PUBLIC_API_BASE=http://192.168.88.139:9021
|
||||
NUXT_PUBLIC_API_BASE=http://172.16.100.99:8005
|
||||
NUXT_PUBLIC_WS_URL=ws://test-ws.example.com
|
||||
NUXT_API_SECRET=test-secret
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user