春节勋章

This commit is contained in:
daihh
2023-01-20 09:42:16 +08:00
parent 1ca6f653bf
commit a7e541cac2
2 changed files with 16 additions and 7 deletions

View File

@@ -158,7 +158,7 @@
<u-overlay :show="signInShow">
<view style="padding-top: 180upx;">
<view style="margin-top: 180upx;width:586upx;margin: 0px auto;position: relative;text-align: center;">
<img @click="signInShow=false" :src="`${context}/static/images/medal/medal2023.png`" style="width:586upx;height: 632upx;">
<img @click="signInShow=false" :src="`${context}/static/images/medal/china2023.png`" style="width:586upx;height: 670upx;">
<view style="padding-top: 20px;">
<img @click="signInShow=false" :src="`${context}/static/images/close.png`">
</view>
@@ -180,7 +180,7 @@
import {toScore} from '@/utils/tools.js'
import apiBoeCourse from '@/api/boe/course.js'
import apiUserGroup from "@/api/modules/usergroup.js";
import apiYearMedal from '@/api/phase2/yearMedal.js'
import apiOnceMedal from '@/api/phase2/onceMedal.js'
import { mapGetters,mapActions} from 'vuex';
export default {
data(){
@@ -262,13 +262,14 @@
mounted() {
//控制弹出窗口的代码
let now = new Date() //当前时间
let end = new Date('2023/01/15 00:00:00') //对比时间
if(now.getTime() < end.getTime()){
apiYearMedal.has2023().then(rs=>{
let start=new Date('2023/01/20 00:00:00') //对比时间
let end = new Date('2023/02/05 00:00:00') //对比时间
if(now.getTime()>start.getTime() && now.getTime() < end.getTime()){
apiOnceMedal.has('china2023').then(rs=>{
if(rs.status==200){
if(!rs.result){
this.signInShow=true;
apiYearMedal.save2023();
apiOnceMedal.save('china2023');
}
}
})