asdf1
This commit is contained in:
parent
4fda1cf904
commit
20cbe6588b
@ -50,3 +50,18 @@ export const voteAPI = (data) => {
|
||||
data,
|
||||
})
|
||||
}
|
||||
export const deadlineAPI = (data) => {
|
||||
return request({
|
||||
url: '/api/children/competition/get/registration/deadline',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export const voteStatus = (data) => {
|
||||
return request({
|
||||
url: '/api/children/competition/get/vote/status',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
BIN
src/assets/image/ddf3227@2x.png
Normal file
BIN
src/assets/image/ddf3227@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 70 KiB |
BIN
src/assets/image/zdf3228@2x.png
Normal file
BIN
src/assets/image/zdf3228@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 95 KiB |
@ -1,5 +1,6 @@
|
||||
// router/index.js
|
||||
import { createRouter, createWebHistory } from 'vue-router';
|
||||
import {deadlineAPI} from "@/api/auth/index.js";
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
@ -10,6 +11,7 @@ const routes = [
|
||||
name: 'login',
|
||||
component: () => import('@/views/login/index.vue'),
|
||||
beforeEnter: (to, from, next) => {
|
||||
|
||||
localStorage.clear()
|
||||
next()
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import {ref,computed} from 'vue'
|
||||
import {createGlobalState,useStorage} from '@vueuse/core'
|
||||
import {
|
||||
competitionApply,
|
||||
competitionWorks,
|
||||
competitionWorks, deadlineAPI,
|
||||
loginRegister,
|
||||
sendCode,
|
||||
uploadFile,
|
||||
@ -26,6 +26,7 @@ export const useAuth=createGlobalState(()=>{
|
||||
const showTextCode=computed(()=>{
|
||||
return isCountingDown.value ? `${countdown.value}s` : '获取验证码'
|
||||
})
|
||||
const resultType=useStorage('resultType', '', localStorage)
|
||||
const sendVote=async ()=>{
|
||||
|
||||
const res= await voteAPI({workUid:workUid.value})
|
||||
@ -40,6 +41,15 @@ export const useAuth=createGlobalState(()=>{
|
||||
}
|
||||
|
||||
}
|
||||
const showText=computed(()=>{
|
||||
if (['success'].includes(resultType.value)){
|
||||
return '提交成功'
|
||||
}else if (['end'].includes(resultType.value)){
|
||||
return '报名已结束'
|
||||
}else if (['hasVoted'].includes(resultType.value)){
|
||||
return '您已投过票'
|
||||
}
|
||||
})
|
||||
const genderOptions=ref([
|
||||
{text:'男',value:'男'},
|
||||
{text:'女',value:'女'}
|
||||
@ -133,8 +143,12 @@ export const useAuth=createGlobalState(()=>{
|
||||
const res=await competitionApply(data)
|
||||
if(res.status===0){
|
||||
message.success('报名成功')
|
||||
|
||||
router.push('/result')
|
||||
router.push({
|
||||
path: '/result',
|
||||
query: {
|
||||
type: 'success'
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
let timer = null;
|
||||
@ -213,6 +227,8 @@ export const useAuth=createGlobalState(()=>{
|
||||
})*/
|
||||
}
|
||||
return {
|
||||
showText,
|
||||
resultType,
|
||||
sendVote,
|
||||
workData,
|
||||
workUid,
|
||||
|
@ -9,12 +9,16 @@ const {clickApply,formData,openMask1,goBack} =useAuth()
|
||||
<template>
|
||||
<div class="box-border relative w-screen min-h-920px bg-center bg-no-repeat bg-cover bg-[url('@/assets/image/zu3346@2x.png')] flex items-center flex-col">
|
||||
|
||||
<div class="mb-[33px] mt-[176px]">
|
||||
<img class="w-[280px] h-[46px]" src="@/assets/image/zu3314@2x.png" alt="">
|
||||
<div class="mb-[25px] mt-[132px]">
|
||||
<img class="w-[210px] h-[35px]" src="@/assets/image/zu3314@2x.png" alt="">
|
||||
</div>
|
||||
<div class="absolute top-0 left-[385px]">
|
||||
<img class="w-[235px] h-[293px]" src="@/assets/image/gdz47@2x.png" alt="">
|
||||
</div>
|
||||
<div class="absolute bottom-20px left-50% translate-x-[-50%]">
|
||||
<img src="@/assets/image/zu733@2x.png" class="w-248px h-28px" alt="">
|
||||
</div>
|
||||
|
||||
<div class="bg-[url('@/assets/image/zue3250@2x.png')] w-[908px] h-[595px] bg-no-repeat bg-contain pt-[39px] px-103px pb-23px z-10">
|
||||
<div class="flex">
|
||||
<div class="text-primary text-[14px] w-[62px] font-bold pl-15px">*姓名</div>
|
||||
@ -58,7 +62,7 @@ const {clickApply,formData,openMask1,goBack} =useAuth()
|
||||
<div class="bg-[url('@/assets/image/asdf3255@2x1.png')] cursor-pointer w-240px h-39px bg-contain ml-29px text-#fff flex-center text-16px z-999" @click="clickApply">确定</div>
|
||||
</div>
|
||||
<div class="absolute bottom-0 right-0 ">
|
||||
<img class="w-876px h-385px" src="@/assets/image/dfdc46@2x.png" alt="">
|
||||
<img class="w-781px h-289px" src="@/assets/image/dfdc46@2x.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script setup>
|
||||
import {useAuth} from "@/store/auth/index.js";
|
||||
|
||||
const {clickApply,formData} =useAuth()
|
||||
const {clickApply,formData,goBack} =useAuth()
|
||||
import { showImagePreview } from 'vant';
|
||||
const openMask=(src)=>{
|
||||
showImagePreview({
|
||||
@ -33,7 +33,7 @@ const openMask=(src)=>{
|
||||
{{formData.gender}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="package1">
|
||||
<div class="package1 overflow-y-auto">
|
||||
<div class="package1_1" v-for="(item,index) in formData.works">
|
||||
<div class="package1_1_1">*作品{{index+1}}</div>
|
||||
<div class="package1_1_2">
|
||||
@ -56,7 +56,7 @@ const openMask=(src)=>{
|
||||
</div>
|
||||
</div>
|
||||
<div class="package2">
|
||||
<div class="package2_1">取消</div>
|
||||
<div class="package2_1" @click="goBack">取消</div>
|
||||
<div class="package2_2" @click="clickApply">提交报名</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -7,9 +7,11 @@ const {clickApply,detailData,openMask1,goBack} =useAuth()
|
||||
|
||||
<template>
|
||||
<div class="box-border relative w-screen min-h-920px bg-center bg-no-repeat bg-cover bg-[url('@/assets/image/zu3346@2x.png')] flex items-center flex-col">
|
||||
|
||||
<div class="absolute bottom-20px left-50% translate-x-[-50%]">
|
||||
<img src="@/assets/image/zu733@2x.png" class="w-248px h-28px" alt="">
|
||||
</div>
|
||||
<div class="mb-[33px] mt-[176px]">
|
||||
<img class="w-[280px] h-[46px]" src="@/assets/image/zu3316@2x.png" alt="">
|
||||
<img class="w-[210px] h-[35px]" src="@/assets/image/zu3316@2x.png" alt="">
|
||||
</div>
|
||||
<div class="absolute top-0 left-[385px]">
|
||||
<img class="w-[235px] h-[293px]" src="@/assets/image/gdz47@2x.png" alt="">
|
||||
@ -62,7 +64,7 @@ const {clickApply,detailData,openMask1,goBack} =useAuth()
|
||||
</n-scrollbar>
|
||||
</div>
|
||||
<div class="absolute bottom-0 right-0 ">
|
||||
<img class="w-876px h-385px" src="@/assets/image/dfdc46@2x.png" alt="">
|
||||
<img class="w-781px h-289px" src="@/assets/image/dfdc46@2x.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -6,7 +6,11 @@ import size375 from '@/views/login/size375/index.vue';
|
||||
import size768 from '@/views/login/size768/index.vue';
|
||||
import size1440 from '@/views/login/size1440/index.vue';
|
||||
import size1920 from '@/views/login/size1920/index.vue';
|
||||
import {deadlineAPI} from "@/api/auth/index.js";
|
||||
import {useRouter} from "vue-router";
|
||||
const { clickSendCode } = useAuth();
|
||||
|
||||
const router = useRouter()
|
||||
const { width } = useWindowSize();
|
||||
const viewComponent = computed(() => {
|
||||
const viewWidth = width.value;
|
||||
@ -20,7 +24,16 @@ const viewComponent = computed(() => {
|
||||
return size1920;
|
||||
}
|
||||
})
|
||||
|
||||
deadlineAPI().then((res)=>{
|
||||
if(res.data.status===2){
|
||||
router.push({
|
||||
path: '/result',
|
||||
query: {
|
||||
type: 'end'
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -6,7 +6,8 @@ import size375 from '@/views/result/size375/index.vue';
|
||||
import size768 from '@/views/result/size768/index.vue';
|
||||
import size1440 from '@/views/result/size1440/index.vue';
|
||||
import size1920 from '@/views/result/size1920/index.vue';
|
||||
const { clickSendCode } = useAuth();
|
||||
import {useRoute} from "vue-router";
|
||||
const { clickSendCode,resultType } = useAuth();
|
||||
const { width } = useWindowSize();
|
||||
const viewComponent = computed(() => {
|
||||
const viewWidth = width.value;
|
||||
@ -20,6 +21,9 @@ const viewComponent = computed(() => {
|
||||
return size1920;
|
||||
}
|
||||
})
|
||||
const route = useRoute()
|
||||
console.log(route,'route')
|
||||
resultType.value=route.query.type??''
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -1,14 +1,15 @@
|
||||
<script setup>
|
||||
import {useAuth} from "@/store/auth/index.js";
|
||||
|
||||
const {viewDetails} =useAuth()
|
||||
const {viewDetails,showText,resultType} =useAuth()
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="box-border relative w-screen min-h-screen bg-center bg-no-repeat bg-cover bg-[url('@/assets/image/dfa45@2x.png')] flex items-center flex-col">
|
||||
<div class="mt-176px mb-33px">
|
||||
<img src="@/assets/image/zu3311@2x.png" class="w-280px h-46px" alt="">
|
||||
<img v-if="['success','end'].includes(resultType)" src="@/assets/image/zu3311@2x.png" class="w-280px h-46px" alt="">
|
||||
<img v-if="['hasVoted'].includes(resultType)" src="@/assets/image/zu3318@2x.png" class="w-280px h-46px" alt="">
|
||||
</div>
|
||||
<div class="top-0 absolute left-193px">
|
||||
<img src="@/assets/image/gdz47@2x.png" class="w-315px h-391px" alt="">
|
||||
@ -19,12 +20,14 @@ const {viewDetails} =useAuth()
|
||||
|
||||
<div class="bg-[url('@/assets/image/zue3250@2x.png')] w-[1211px] h-[794px] bg-no-repeat bg-contain flex flex-col items-center">
|
||||
<div class="mt-180px">
|
||||
<img src="@/assets/image/gdzd57@2x.png" class="w-216px h-272px" alt="">
|
||||
<img v-if="['success'].includes(resultType)" src="@/assets/image/gdzd57@2x.png" class="w-216px h-272px" alt="">
|
||||
<img v-if="['end'].includes(resultType)" src="@/assets/image/ddf3227@2x.png" class="w-216px h-272px" alt="">
|
||||
<img v-if="['hasVoted'].includes(resultType)" src="@/assets/image/zdf3228@2x.png" class="w-216px h-272px" alt="">
|
||||
</div>
|
||||
<div class="text-primary text-19px mt-13px">
|
||||
提交成功
|
||||
{{showText}}
|
||||
</div>
|
||||
<div class="w-320px h-52px bg-contain bg-no-repeat bg-[url('@/assets/image/dfdf1.png')] flex-center text-white text-21px shrink-0 mt-[71px]" @click="viewDetails">查看详情</div>
|
||||
<div v-if="['success'].includes(resultType)" class="w-320px h-52px bg-contain bg-no-repeat bg-[url('@/assets/image/dfdf1.png')] flex-center text-white text-21px shrink-0 mt-[71px]" @click="viewDetails">查看详情</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -1,14 +1,15 @@
|
||||
<script setup>
|
||||
import {useAuth} from "@/store/auth/index.js";
|
||||
|
||||
const {viewDetails} =useAuth()
|
||||
const {viewDetails,resultType,showText} =useAuth()
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="box-border relative w-screen min-h-920px bg-center bg-no-repeat bg-cover bg-[url('@/assets/image/zu3346@2x.png')] flex items-center flex-col">
|
||||
<div class="mt-123px mb-25px">
|
||||
<img src="@/assets/image/zu3311@2x.png" class="w-210px h-35px" alt="">
|
||||
<img v-if="['success','end'].includes(resultType)" src="@/assets/image/zu3311@2x.png" class="w-210px h-35px" alt="">
|
||||
<img v-if="['hasVoted'].includes(resultType)" src="@/assets/image/zu3318@2x.png" class="w-210px h-35px" alt="">
|
||||
</div>
|
||||
<div class="top-0 absolute left-385px">
|
||||
<img src="@/assets/image/gdz47@2x.png" class="w-235px h-293px" alt="">
|
||||
@ -19,12 +20,14 @@ const {viewDetails} =useAuth()
|
||||
|
||||
<div class="bg-[url('@/assets/image/zue3250@2x.png')] w-[908px] h-[595px] bg-no-repeat bg-contain flex flex-col items-center">
|
||||
<div class="mt-135px">
|
||||
<img src="@/assets/image/gdzd57@2x.png" class="w-162px h-204px" alt="">
|
||||
<img v-if="['success'].includes(resultType)" src="@/assets/image/gdzd57@2x.png" class="w-162px h-204px" alt="">
|
||||
<img v-if="['end'].includes(resultType)" src="@/assets/image/ddf3227@2x.png" class="w-162px h-204px" alt="">
|
||||
<img v-if="['hasVoted'].includes(resultType)" src="@/assets/image/zdf3228@2x.png" class="w-162px h-204px" alt="">
|
||||
</div>
|
||||
<div class="text-primary text-14px mt-10px">
|
||||
提交成功
|
||||
{{showText}}
|
||||
</div>
|
||||
<div class="w-240px h-39px bg-contain bg-no-repeat bg-[url('@/assets/image/dfdf1.png')] flex-center text-white text-16px shrink-0 mt-[53px] cursor-pointer" @click="viewDetails">查看详情</div>
|
||||
<div v-if="['success'].includes(resultType)" class="w-240px h-39px bg-contain bg-no-repeat bg-[url('@/assets/image/dfdf1.png')] flex-center text-white text-16px shrink-0 mt-[53px] cursor-pointer" @click="viewDetails">查看详情</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -1,14 +1,15 @@
|
||||
<script setup>
|
||||
import {useAuth} from "@/store/auth/index.js";
|
||||
|
||||
const {viewDetails} =useAuth()
|
||||
const {viewDetails,resultType,showText} =useAuth()
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="box-border relative w-screen min-h-screen bg-center bg-no-repeat bg-cover bg-[url('@/assets/image/gdz53@2x.png')] flex items-center flex-col">
|
||||
<div class="mt-143px">
|
||||
<img src="@/assets/image/zu3311@2x.png" class="w-1074px h-178px" alt="">
|
||||
<img v-if="['success','end'].includes(resultType)" src="@/assets/image/zu3311@2x.png" class="w-1074px h-178px" alt="">
|
||||
<img v-if="['hasVoted'].includes(resultType)" src="@/assets/image/zu3318@2x.png" class="w-1074px h-178px" alt="">
|
||||
</div>
|
||||
<div class="top-0 absolute left-0px">
|
||||
<img src="@/assets/image/gdz27.png" class="w-671px h-728px" alt="">
|
||||
@ -21,12 +22,14 @@ const {viewDetails} =useAuth()
|
||||
</div>
|
||||
<div class="mt-[123px] w-[1608px] h-[2678px] bg-[url('@/assets/image/zu3186@2x.png')] bg-cover bg-no-repeat flex flex-col items-center">
|
||||
<div class="mt-394px">
|
||||
<img src="@/assets/image/gdzd57@2x.png" class="w-829px h-1044px" alt="">
|
||||
<img v-if="['success'].includes(resultType)" src="@/assets/image/gdzd57@2x.png" class="w-829px h-1044px" alt="">
|
||||
<img v-if="['end'].includes(resultType)" src="@/assets/image/ddf3227@2x.png" class="w-829px h-1044px" alt="">
|
||||
<img v-if="['hasVoted'].includes(resultType)" src="@/assets/image/zdf3228@2x.png" class="w-829px h-1044px" alt="">
|
||||
</div>
|
||||
<div class="text-primary text-72px mt-51px">
|
||||
提交成功
|
||||
{{showText}}
|
||||
</div>
|
||||
<div class="w-866px h-200px bg-contain bg-no-repeat bg-[url('@/assets/image/zu3189@2x1.png')] flex-center text-white text-82px shrink-0 mt-[236px]" @click="viewDetails">查看详情</div>
|
||||
<div v-if="['success'].includes(resultType)" class="w-866px h-200px bg-contain bg-no-repeat bg-[url('@/assets/image/zu3189@2x1.png')] flex-center text-white text-82px shrink-0 mt-[236px]" @click="viewDetails">查看详情</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -1,14 +1,15 @@
|
||||
<script setup>
|
||||
import {useAuth} from "@/store/auth/index.js";
|
||||
|
||||
const {viewDetails} =useAuth()
|
||||
const {viewDetails,resultType,showText} =useAuth()
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="box-border relative w-screen min-h-screen bg-center bg-no-repeat bg-cover bg-[url('@/assets/image/gdz53@2x.png')] flex items-center flex-col">
|
||||
<div class="mt-303px">
|
||||
<img src="@/assets/image/zu3311@2x.png" class="w-525px h-87px" alt="">
|
||||
<img v-if="['success','end'].includes(resultType)" src="@/assets/image/zu3311@2x.png" class="w-525px h-87px" alt="">
|
||||
<img v-if="['hasVoted'].includes(resultType)" src="@/assets/image/zu3318@2x.png" class="w-525px h-87px" alt="">
|
||||
</div>
|
||||
<div class="top-0 absolute left-40px">
|
||||
<img src="@/assets/image/gdz47@2x.png" class="w-610px h-668px" alt="">
|
||||
@ -21,12 +22,14 @@ const {viewDetails} =useAuth()
|
||||
</div>
|
||||
<div class="mt-[90px] w-[1173px] h-[1489px] bg-[url('@/assets/image/zu3327@2x.png')] bg-cover bg-no-repeat flex flex-col items-center">
|
||||
<div class="mt-333px">
|
||||
<img src="@/assets/image/gdzd57@2x.png" class="w-405px h-510px" alt="">
|
||||
<img v-if="['success'].includes(resultType)" src="@/assets/image/gdzd57@2x.png" class="w-405px h-510px" alt="">
|
||||
<img v-if="['end'].includes(resultType)" src="@/assets/image/ddf3227@2x.png" class="w-405px h-510px" alt="">
|
||||
<img v-if="['hasVoted'].includes(resultType)" src="@/assets/image/zdf3228@2x.png" class="w-405px h-510px" alt="">
|
||||
</div>
|
||||
<div class="text-primary text-35px mt-25px">
|
||||
提交成功
|
||||
{{ showText }}
|
||||
</div>
|
||||
<div class="w-600px h-98px bg-contain bg-no-repeat bg-[url('@/assets/image/dfdf1.png')] flex-center text-white text-40px shrink-0 mt-[333px]" @click="viewDetails">查看详情</div>
|
||||
<div v-if="['success'].includes(resultType)" class="w-600px h-98px bg-contain bg-no-repeat bg-[url('@/assets/image/dfdf1.png')] flex-center text-white text-40px shrink-0 mt-[333px]" @click="viewDetails">查看详情</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -1,12 +1,25 @@
|
||||
<script setup>
|
||||
import {useAuth} from "@/store/auth/index.js";
|
||||
import { useRoute } from 'vue-router';
|
||||
import {useRoute, useRouter} from 'vue-router';
|
||||
import {voteStatus} from "@/api/auth/index.js";
|
||||
const {detailData,workUid,getWorkInfo,workData,openMask,sendVote} =useAuth()
|
||||
const route = useRoute()
|
||||
|
||||
const router = useRouter()
|
||||
if (route.query.uid){
|
||||
workUid.value = route.query.uid;
|
||||
getWorkInfo()
|
||||
}
|
||||
voteStatus().then((res)=>{
|
||||
if(res.data.status===2){
|
||||
router.push({
|
||||
path: '/result',
|
||||
query: {
|
||||
type: 'hasVoted'
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<template>
|
||||
<div class="box-border relative w-[1920px] min-h-screen bg-no-repeat bg-cover bg-[url('@/assets/image/zu3237.png')] flex items-center flex-col">
|
||||
@ -22,5 +35,8 @@ if (route.query.uid){
|
||||
<div class="absolute bottom-[200px] w-[1270px] h-[145px]">
|
||||
<img src="@/assets/image/zu733@2x.png" alt="" />
|
||||
</div>
|
||||
<div>
|
||||
<img src="@/assets/image/gdz12@2x.png" class="w-855px h-829px fixed right-0 bottom-0" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
Loading…
Reference in New Issue
Block a user