1`212
This commit is contained in:
parent
a71357c6b1
commit
07ac978fef
@ -38,7 +38,6 @@ export const competitionWorks = (data) => {
|
|||||||
}
|
}
|
||||||
export const workInfo = (data) => {
|
export const workInfo = (data) => {
|
||||||
return request({
|
return request({
|
||||||
isFormData:true,
|
|
||||||
url: '/api/children/competition/get/work/info',
|
url: '/api/children/competition/get/work/info',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data,
|
data,
|
||||||
|
@ -54,6 +54,6 @@ router.beforeEach((to, from, next) => {
|
|||||||
if (to.meta?.title) {
|
if (to.meta?.title) {
|
||||||
document.title = to.meta.title; // 设置页面标题
|
document.title = to.meta.title; // 设置页面标题
|
||||||
}
|
}
|
||||||
next(); // 继续导航
|
next()
|
||||||
});
|
});
|
||||||
export default router;
|
export default router;
|
||||||
|
@ -7,7 +7,7 @@ import { showImagePreview } from 'vant';
|
|||||||
import useImgModalPopup from "@/components/imgModal/imgModal.js";
|
import useImgModalPopup from "@/components/imgModal/imgModal.js";
|
||||||
export const useAuth=createGlobalState(()=>{
|
export const useAuth=createGlobalState(()=>{
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter()
|
||||||
const token = useStorage('token', '', localStorage)
|
const token = useStorage('token', '', localStorage)
|
||||||
const workUid = useStorage('workUid', '', localStorage)
|
const workUid = useStorage('workUid', '', localStorage)
|
||||||
const telNum =useStorage('telNum', '', localStorage)
|
const telNum =useStorage('telNum', '', localStorage)
|
||||||
@ -20,7 +20,7 @@ export const useAuth=createGlobalState(()=>{
|
|||||||
})
|
})
|
||||||
const getWorkInfo=async ()=>{
|
const getWorkInfo=async ()=>{
|
||||||
const res=await workInfo({workUid:workUid.value})
|
const res=await workInfo({workUid:workUid.value})
|
||||||
if (res.static===0){
|
if (res.status===0){
|
||||||
workData.value=res.data
|
workData.value=res.data
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,6 +198,7 @@ export const useAuth=createGlobalState(()=>{
|
|||||||
})*/
|
})*/
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
workData,
|
||||||
workUid,
|
workUid,
|
||||||
getWorkInfo,
|
getWorkInfo,
|
||||||
viewDetails,
|
viewDetails,
|
||||||
|
@ -1,21 +1,20 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import {useAuth} from "@/store/auth/index.js";
|
import {useAuth} from "@/store/auth/index.js";
|
||||||
const {detailData} =useAuth()
|
import { useRoute } from 'vue-router';
|
||||||
import { showImagePreview } from 'vant';
|
const {detailData,workUid,getWorkInfo,workData,openMask} =useAuth()
|
||||||
const openMask=(src)=>{
|
const route = useRoute()
|
||||||
showImagePreview({
|
if (route.query.uid){
|
||||||
images:[src],
|
workUid.value = route.query.uid;
|
||||||
closeable: true,
|
getWorkInfo()
|
||||||
})
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="box-border relative w-[1920px] h-screen bg-no-repeat bg-cover bg-[url('@/assets/image/zu3237.png')] flex items-center flex-col">
|
<div class="box-border relative w-[1920px] h-screen bg-no-repeat bg-cover bg-[url('@/assets/image/zu3237.png')] flex items-center flex-col">
|
||||||
<div class="mt-[143px] w-[1074px] h-[178px] bg-[url('@/assets/image/zu3318@2x.png')] bg-cover bg-no-repeat"></div>
|
<div class="mt-[143px] w-[1074px] h-[178px] bg-[url('@/assets/image/zu3318@2x.png')] bg-cover bg-no-repeat"></div>
|
||||||
<div class="mt-[123px] w-[1654px] h-[2729px] bg-[url('@/assets/image/zu3186@2x.png')] bg-cover bg-no-repeat flex flex-col items-center ">
|
<div class="mt-[123px] w-[1654px] h-[2729px] bg-[url('@/assets/image/zu3186@2x.png')] bg-cover bg-no-repeat flex flex-col items-center ">
|
||||||
<img src="@/assets/image/imagebackground.png" @click="openMask()" class="w-1362px h-1362px mt-404px" alt="">
|
<img :src="workData?.picUrl" @click="openMask(workData?.picUrl)" class="max-w-1362px max-h-1362px mt-404px rounded-20px object-contain" alt="">
|
||||||
<div class="text-primary text-72px mt-51px">作品名称XXXX</div>
|
<div class="text-primary text-72px mt-51px">{{workData?.workName}}</div>
|
||||||
<div class="bg-[url('@/assets/image/fbbb@4x.png')] w-866px h-200px bg-no-repeat bg-cover text-white text-82px flex-center mt-[205px]">投票</div>
|
<div class="bg-[url('@/assets/image/fbbb@4x.png')] w-866px h-200px bg-no-repeat bg-cover text-white text-82px flex-center mt-[205px] font-bold">投票</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="absolute top-0 left-0 w-[671px] h-[728px] bg-cover">
|
<div class="absolute top-0 left-0 w-[671px] h-[728px] bg-cover">
|
||||||
<img src="@/assets/image/gdz27.png" alt="" />
|
<img src="@/assets/image/gdz27.png" alt="" />
|
||||||
|
Loading…
Reference in New Issue
Block a user