1`212
This commit is contained in:
parent
eb6dd2c781
commit
a71357c6b1
@ -36,3 +36,11 @@ export const competitionWorks = (data) => {
|
||||
data,
|
||||
})
|
||||
}
|
||||
export const workInfo = (data) => {
|
||||
return request({
|
||||
isFormData:true,
|
||||
url: '/api/children/competition/get/work/info',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
BIN
src/assets/image/imagebackground.png
Normal file
BIN
src/assets/image/imagebackground.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 365 KiB |
BIN
src/assets/image/zu3318@2x.png
Normal file
BIN
src/assets/image/zu3318@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
@ -19,6 +19,14 @@ const routes = [
|
||||
name: 'signup',
|
||||
component: () => import('@/views/signup/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/vote',
|
||||
name: 'vote',
|
||||
meta: {
|
||||
title: '儿童美术征集活动'
|
||||
},
|
||||
component: () => import('@/views/vote/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/result',
|
||||
name: 'result',
|
||||
@ -41,6 +49,11 @@ const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes
|
||||
});
|
||||
router.beforeEach((to, from) => {
|
||||
})
|
||||
router.beforeEach((to, from, next) => {
|
||||
// 检查路由是否有meta.title
|
||||
if (to.meta?.title) {
|
||||
document.title = to.meta.title; // 设置页面标题
|
||||
}
|
||||
next(); // 继续导航
|
||||
});
|
||||
export default router;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {ref,computed} from 'vue'
|
||||
import {createGlobalState,useStorage} from '@vueuse/core'
|
||||
import {competitionApply, competitionWorks, loginRegister, sendCode, uploadFile} from '@/api/auth/index.js'
|
||||
import {competitionApply, competitionWorks, loginRegister, sendCode, uploadFile, workInfo} from '@/api/auth/index.js'
|
||||
import {message} from "@/utils/message.js"
|
||||
import { useRouter } from 'vue-router';
|
||||
import { showImagePreview } from 'vant';
|
||||
@ -9,13 +9,22 @@ export const useAuth=createGlobalState(()=>{
|
||||
|
||||
const router = useRouter();
|
||||
const token = useStorage('token', '', localStorage)
|
||||
const workUid = useStorage('workUid', '', localStorage)
|
||||
const telNum =useStorage('telNum', '', localStorage)
|
||||
const code=ref('')
|
||||
const workData=useStorage('workData', {}, localStorage)
|
||||
const countdown = ref(0)
|
||||
const isCountingDown = ref(false)
|
||||
const showTextCode=computed(()=>{
|
||||
return isCountingDown.value ? `${countdown.value}s` : '获取验证码'
|
||||
})
|
||||
const getWorkInfo=async ()=>{
|
||||
const res=await workInfo({workUid:workUid.value})
|
||||
if (res.static===0){
|
||||
workData.value=res.data
|
||||
}
|
||||
|
||||
}
|
||||
const genderOptions=ref([
|
||||
{text:'男',value:'男'},
|
||||
{text:'女',value:'女'}
|
||||
@ -74,7 +83,6 @@ export const useAuth=createGlobalState(()=>{
|
||||
formData.value.works.splice(index,1)
|
||||
}
|
||||
const afterRead=async (file,item,e)=>{
|
||||
console.log('执行了afterRead')
|
||||
const formData1 = new FormData()
|
||||
formData1.append("file", file.file)
|
||||
formData1.append("type", 'image')
|
||||
@ -190,6 +198,8 @@ export const useAuth=createGlobalState(()=>{
|
||||
})*/
|
||||
}
|
||||
return {
|
||||
workUid,
|
||||
getWorkInfo,
|
||||
viewDetails,
|
||||
goBack,
|
||||
openMask1,
|
||||
|
27
src/views/vote/index.vue
Normal file
27
src/views/vote/index.vue
Normal file
@ -0,0 +1,27 @@
|
||||
<script setup>
|
||||
import {useAuth} from "@/store/auth/index.js";
|
||||
const {detailData} =useAuth()
|
||||
import { showImagePreview } from 'vant';
|
||||
const openMask=(src)=>{
|
||||
showImagePreview({
|
||||
images:[src],
|
||||
closeable: true,
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<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="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 ">
|
||||
<img src="@/assets/image/imagebackground.png" @click="openMask()" class="w-1362px h-1362px mt-404px" alt="">
|
||||
<div class="text-primary text-72px mt-51px">作品名称XXXX</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>
|
||||
<div class="absolute top-0 left-0 w-[671px] h-[728px] bg-cover">
|
||||
<img src="@/assets/image/gdz27.png" alt="" />
|
||||
</div>
|
||||
<div class="absolute bottom-[200px] w-[1270px] h-[145px]">
|
||||
<img src="@/assets/image/zu733@2x.png" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
Loading…
Reference in New Issue
Block a user