mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-20 16:26:43 +08:00
我的勋章
This commit is contained in:
@@ -38,13 +38,17 @@
|
||||
// this.userAvatar=require("@/assets/images/user/default.png");
|
||||
apiUserhobby.has().then(res=>{
|
||||
if(res.status == 200) {
|
||||
this.interestCollection = true;
|
||||
} else {
|
||||
let time = localStorage.getItem('notYet');
|
||||
let day = (new Date() - new Date(time))/(1000*60*60*24);
|
||||
if(day > 15){
|
||||
this.interestCollection = true;
|
||||
}
|
||||
let time = localStorage.getItem('notYet');
|
||||
if(time == '') {
|
||||
this.interestCollection = true;
|
||||
} else {
|
||||
let time = localStorage.getItem('notYet');
|
||||
let day = (new Date() - new Date(time))/(1000*60*60*24);
|
||||
if(day > 15){
|
||||
this.interestCollection = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
66
src/components/Portal/medalImg.vue
Normal file
66
src/components/Portal/medalImg.vue
Normal file
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<div class="medal-icon">
|
||||
<img :src="baseUrl+item.medalIcon" alt="" srcset="">
|
||||
<span class="medal-text medal-level">LV.{{item.medalLevel}}</span>
|
||||
<span class="medal-text medal-name">{{item.medalName}}</span>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props:{
|
||||
item:{
|
||||
type:Object,
|
||||
default:()=>{}
|
||||
}
|
||||
},
|
||||
|
||||
data(){
|
||||
return {
|
||||
baseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// this.userAvatar=require("@/assets/images/user/default.png");
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods:{
|
||||
|
||||
},
|
||||
watch:{
|
||||
|
||||
},
|
||||
computed:{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.medal-icon{
|
||||
position: relative;
|
||||
width: 143px;
|
||||
height: 161px;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.medal-text{
|
||||
position: absolute;
|
||||
font-size: 14px;
|
||||
color: #e7d9cc;
|
||||
font-weight: 600;
|
||||
left:50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
.medal-level{
|
||||
top:22%;
|
||||
font-style: italic;
|
||||
}
|
||||
.medal-name{
|
||||
bottom: 10%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user