Merge branch 'master' of codeup.aliyun.com:6265f483e4166464dc2f9c14/boeu/mobile

This commit is contained in:
dongruihua
2022-12-31 22:14:55 +08:00
5 changed files with 59 additions and 50 deletions

20
api/phase2/yearMedal.js Normal file
View File

@@ -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
}

View File

@@ -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)
}
})
},

View File

@@ -11,14 +11,7 @@
<u-icon class="top-bar-icon" :size="26" name="bell"></u-icon>
</view> -->
<view class="top-bar-center">
<u-search
placeholder="搜索"
:clearabled="true"
:showAction="false"
:height="36"
@focus="toSearch()"
bgColor="#F7F7F7">
</u-search>
<u-search placeholder="搜索" :clearabled="true" :showAction="false" :height="36" @focus="toSearch()" bgColor="#F7F7F7"></u-search>
<!-- <view class="top-bar-tab" @click="clicktab(1)" :class="{'active':tabIndex==1}">最热</view>
<view class="top-bar-tab" @click="clicktab(0)" :class="{'active':tabIndex==0}">最新</view> -->
</view>
@@ -164,8 +157,11 @@
</view>
<u-overlay :show="signInShow">
<view style="padding-top: 180upx;">
<view style="margin-top: 180upx;width:624upx;margin: 0px auto;position: relative;">
<img @click="signInShow=false" :src="`${context}/static/images/dlg202212.png`" style="width:624upx;height: 684upx;">
<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;">
<view style="padding-top: 20px;">
<img @click="signInShow=false" :src="`${context}/static/images/close.png`">
</view>
</view>
</view>
</u-overlay>
@@ -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();

View File

@@ -35,6 +35,15 @@
<view class="medal-name">上线纪念章 <text style="font-size: 24upx;color:#387DF7;margin-left: 6upx;"></text></view>
</view>
<view class="medal-list-index" v-if="year2023" >
<view class="medal-img-index">
<image style="width:136upx;height:152upx" src="/static/images/medal//medal2023.png" mode=""></image>
<text class="img-name">元旦勋章 </text>
<text class="img-level"></text>
</view>
<view class="medal-name">元旦勋章 <text style="font-size: 24upx;color:#387DF7;margin-left: 6upx;"></text></view>
</view>
</view>
</view>
@@ -78,12 +87,14 @@
<script>
import { mapGetters,mapActions} from 'vuex';
import apiStat from '@/api/phase2/stat.js';
import apiYearMedal from '@/api/phase2/yearMedal.js';
export default {
data(){
return {
webBaseUrl:this.$config.context,
showLevel:1,
show:false,
year2023:false,
fileBaseUrl:this.$config.fileUrl,
medalList:[],
medalData:{},
@@ -97,6 +108,11 @@
...mapGetters(['userInfo'])
},
mounted() {
apiYearMedal.has2023().then(rs=>{
if(rs.status==200 && rs.result){
this.year2023=true;
}
});
this.getMedal();
this.getConfig();
},

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB