显示元旦勋章

This commit is contained in:
daihh
2022-12-31 17:21:21 +08:00
parent 7885c20f4e
commit 5c1aebc240

View File

@@ -7,7 +7,7 @@
<el-tab-pane label="社交勋章" name="third"></el-tab-pane> <el-tab-pane label="社交勋章" name="third"></el-tab-pane>
<el-tab-pane label="成就勋章" name="fourth"></el-tab-pane> <el-tab-pane label="成就勋章" name="fourth"></el-tab-pane>
</el-tabs> </el-tabs>
<div class="medal-list" v-if="medalData.length > 0"> <div class="medal-list" v-if="medalData.length > 0 || year2023">
<div v-for="item in medalData" :key="item.id"> <div v-for="item in medalData" :key="item.id">
<div class="medal-index" v-if="item.medalId != 5"> <div class="medal-index" v-if="item.medalId != 5">
<medal-img :item="item"></medal-img> <medal-img :item="item"></medal-img>
@@ -22,6 +22,11 @@
<!-- <p class="index-text">您已超过{{item.exceed}}</p> --> <!-- <p class="index-text">您已超过{{item.exceed}}</p> -->
<el-button class="btn" style="margin-top:48px" type="primary" @click="showLoginMedal = true">查看详情</el-button> <el-button class="btn" style="margin-top:48px" type="primary" @click="showLoginMedal = true">查看详情</el-button>
</div> </div>
<div v-if="activeName=='first' && year2023" class="medal-index">
<img style="width:122px;height:161px" :src="`${webBaseUrl}/images/medal/20230101.png`" alt="">
<p class="index-title">元旦勋章</p>
<!-- <p class="index-text">您已超过{{item.exceed}}</p> -->
</div>
</div> </div>
<div v-else class="home-no-list"> <div v-else class="home-no-list">
<img class="img" style="width:360px;height:226px" :src="`${webBaseUrl}/images/homeWu/no-madel.png`" alt="" srcset=""> <img class="img" style="width:360px;height:226px" :src="`${webBaseUrl}/images/homeWu/no-madel.png`" alt="" srcset="">
@@ -82,6 +87,7 @@
<script> <script>
import apiStat from '@/api/phase2/stat.js'; import apiStat from '@/api/phase2/stat.js';
import MedalImg from '@/components/Portal/medalImg.vue'; import MedalImg from '@/components/Portal/medalImg.vue';
import apiYearMedal from '@/api/phase2/yearMedal.js';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
export default{ export default{
computed: { computed: {
@@ -135,9 +141,15 @@
tableData:[], tableData:[],
medalConfig:[], medalConfig:[],
rules:[], rules:[],
year2023:false,
} }
}, },
mounted() { mounted() {
apiYearMedal.has2023().then(rs=>{
if(rs.status==200 && rs.result){
this.year2023=true;
}
});
this.getMedal(); this.getMedal();
this.getConfig(); this.getConfig();
}, },