diff --git a/api/phase2/yearMedal.js b/api/phase2/yearMedal.js new file mode 100644 index 0000000..e5e280d --- /dev/null +++ b/api/phase2/yearMedal.js @@ -0,0 +1,20 @@ +/**文章模块的相关处理*/ +// import ajax from '@/utils/xajax.js' +import config from '@/config/index.js' +import ajax from '../ajax' +const baseURL = config.statApiBaseUrl; + +const has2023 = function() { + return ajax.get(baseURL,'/xboe/m/stat/year/medal/has'); +} + +const save2023 = function() { + return ajax.get(baseURL,'/xboe/m/stat/year/medal/save'); +} + + + +export default { + has2023, + save2023 +} diff --git a/components/recommend-index/recommend-index.vue b/components/recommend-index/recommend-index.vue index 0d46fa6..4662f7a 100644 --- a/components/recommend-index/recommend-index.vue +++ b/components/recommend-index/recommend-index.vue @@ -263,8 +263,6 @@ apiIndex.scorelist(10,1).then(res=>{ if(res.status == 200){ this.courseRankingList = res.result; - console.log(res,'qqq') - console.log(this.courseRankingList) } }) }, diff --git a/pages/index/index.vue b/pages/index/index.vue index 4787333..4c6808b 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -11,14 +11,7 @@ --> - - + @@ -164,8 +157,11 @@ - - + + + + + @@ -183,6 +179,7 @@ import apiMessage from '@/api/system/message.js' import {toScore} from '@/utils/tools.js' import apiBoeCourse from '@/api/boe/course.js' + import apiYearMedal from '@/api/phase2/yearMedal.js' import { mapGetters,mapActions} from 'vuex'; export default { data(){ @@ -258,49 +255,27 @@ this.countNoReadMsg(); }, components:{ - 'mapelement': { - render: function(createElement) { - - var pElem1 = createElement('area', { - attrs:{ - shape: "circle", - coords: "280,30,30", - href:"javascript:;", - }, - on: { - click: function() { - //$this.signInShow=false; - }, - } - }); - var pElem2 = createElement('area', { - attrs:{ - shape: "rectangle", - coords: "30,300,400,400", - href:"https://boehrsurvey.wjx.cn/vm/PmreuFN.aspx", - } - }); - return createElement('map', {attrs: { - name: "HotMap", - id: "HotMap" - }},[ - pElem2 //想要添加更多area,可在数组中继续添加。如[pElem1,pElem2,…] - ]) - }, - }, + }, mounted() { //控制弹出窗口的代码 let now = new Date() //当前时间 - let end = new Date('2022/12/29 00:00:00') //对比时间 + let end = new Date('2023/01/15 00:00:00') //对比时间 if(now.getTime() < end.getTime()){ - let times = uni.getStorageSync(this.signLocalTimesKey); - if(!times){ - this.signInShow = true;//显示 - uni.setStorageSync(this.signLocalTimesKey,1); - - } - + apiYearMedal.has2023().then(rs=>{ + if(rs.status==200){ + if(!rs.result){ + this.signInShow=true; + apiYearMedal.save2023(); + } + } + }) + // let times = uni.getStorageSync(this.signLocalTimesKey); + // if(!times){ + // this.signInShow = true;//显示 + // uni.setStorageSync(this.signLocalTimesKey,1); + // } + //this.signInShow = true;//显示 } this.getSysTypeTree(); this.findCourseData(); diff --git a/pages/my/myMedal.vue b/pages/my/myMedal.vue index a714ac7..3fb700f 100644 --- a/pages/my/myMedal.vue +++ b/pages/my/myMedal.vue @@ -35,6 +35,15 @@ 上线纪念章 + + + + 元旦勋章 + + + + 元旦勋章 + @@ -78,12 +87,14 @@