mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-16 14:26:43 +08:00
Merge branch 'stat' of https://codeup.aliyun.com/6265f483e4166464dc2f9c14/boeu/portal into stat
This commit is contained in:
@@ -22,11 +22,12 @@
|
||||
<div style="padding-top:10px;">
|
||||
<p class="ach-title">{{self?'我':'TA'}}的成就</p>
|
||||
<ul class="ach-ul">
|
||||
<li class="ach-box" v-for="ach in medalList" :key="ach.id" @click="jumach(ach)">
|
||||
<!-- <img src="/images/medal.png" alt=""> -->
|
||||
<medal-img style="width:52px;height:58px" :item="ach"></medal-img>
|
||||
<p>{{ach.medalName}}</p>
|
||||
<p>LV.{{ach.medalLevel}}</p>
|
||||
<li v-for="ach in medalList" :key="ach.id" @click="jumach(ach)">
|
||||
<div class="ach-box" v-if="ach.medalId != 5">
|
||||
<medal-img style="width:52px;height:58px" :item="ach"></medal-img>
|
||||
<p>{{ach.medalName}}</p>
|
||||
<p>LV.{{ach.medalLevel}}</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -15,8 +15,13 @@
|
||||
<p class="index-text">您已超过{{item.exceed}}人</p>
|
||||
<el-button class="btn" type="primary" @click="goView(item)">查看详情</el-button>
|
||||
</div>
|
||||
<div class="medal-index" v-else>
|
||||
<img style="width:143px;height:161px" :src="`${webBaseUrl}/images/login_medal.png`" alt="">
|
||||
<p class="index-title">{{item.medalName}}</p>
|
||||
<!-- <p class="index-text">您已超过{{item.exceed}}人</p> -->
|
||||
<el-button class="btn" style="margin-top:30px" type="primary" @click="showLoginMedal = true">查看详情</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-else class="home-no-list">
|
||||
<img class="img" style="width:360px;height:226px" :src="`${webBaseUrl}/images/homeWu/no-madel.png`" alt="" srcset="">
|
||||
@@ -57,6 +62,20 @@
|
||||
</el-table>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog width="540px" class="medalbox" :visible.sync="showLoginMedal" :append-to-body="true" >
|
||||
<div class="jinian-medal-img" :style="`background: url(${webBaseUrl}/images/jinian_medal.png) no-repeat;`">
|
||||
<!--登录勋章显示,根据UI显示修改-->
|
||||
<span style="position: absolute; right:60px;top:60px;cursor: pointer;">
|
||||
<img @click="showLoginMedal = false" :src="`${webBaseUrl}/images/close.png`" width="26px" height="26px" alt="">
|
||||
</span>
|
||||
<div style="text-align: center;"><img :src="`${webBaseUrl}/images/login_medal.png`" width="206px" height="269px" alt=""></div>
|
||||
<div style="text-align: left;padding:20px 60px 100px 60px">
|
||||
<div class="jntext1">感谢有你 一路相办</div>
|
||||
<div class="jntext2">勋章领取条件:</div>
|
||||
<div class="jntext3">2022年10月31日-11月15日登录过平台学习的校友</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -99,6 +118,7 @@
|
||||
return item.medalId == 3;
|
||||
})
|
||||
}
|
||||
console.log(data,'data');
|
||||
return data;
|
||||
}
|
||||
},
|
||||
@@ -107,6 +127,7 @@
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
showLoginMedal:false,
|
||||
baseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
||||
activeName:'first',
|
||||
dialogVisible:false,
|
||||
@@ -122,7 +143,7 @@
|
||||
this.getConfig();
|
||||
},
|
||||
methods:{
|
||||
|
||||
|
||||
getConfig() {// 获取勋章配置
|
||||
apiStat.userMedalConfig().then(res=>{
|
||||
if(res.status == 200) {
|
||||
@@ -168,6 +189,51 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.medalbox {
|
||||
background: transparent !important;
|
||||
::v-deep .el-dialog{
|
||||
background: transparent !important;
|
||||
box-shadow:none !important;
|
||||
.el-dialog__header{
|
||||
display: none !important;
|
||||
}
|
||||
.el-dialog__body{
|
||||
// width: 320px !important;
|
||||
// height: 420px !important;
|
||||
background: transparent !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.jinian-medal-img{
|
||||
text-align: center;
|
||||
padding-top: 10px;
|
||||
.jntext1{
|
||||
height: 56px;
|
||||
font-size: 40px;
|
||||
font-family: PingFangSC-Semibold, PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #924504;
|
||||
line-height: 56px;
|
||||
}
|
||||
.jntext2{
|
||||
margin-top: 30px;
|
||||
height: 30px;
|
||||
font-size: 22px;
|
||||
font-family: PingFangSC-Semibold, PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #924504;
|
||||
line-height: 30px;
|
||||
}
|
||||
.jntext3{
|
||||
margin-top: 10px;
|
||||
height: 50px;
|
||||
font-size: 18px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #924504;
|
||||
line-height: 25px;
|
||||
}
|
||||
}
|
||||
::v-deep .el-dialog__body{
|
||||
border-radius: 27px !important;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,15 @@
|
||||
<h6>{{ item.sysUpdateTime }}</h6>
|
||||
</div>
|
||||
<div class="all-content" style="word-break:break-all;">
|
||||
<span v-if="item.contentType != 3">{{ item.content }}</span>
|
||||
<span v-if="item.type == 1">{{item.content}}</span>
|
||||
|
||||
<span v-if="item.contentType != 3 && item.type == 2">
|
||||
<!-- {{ item.content }} -->
|
||||
{{displayAll(item)}}
|
||||
<span style="color:#588afc;cursor:pointer;" v-if="item.content && item.content.length>150" @click.stop="changeIsAll(item)">
|
||||
{{item.isAll?'收起':'全文展开'}}
|
||||
</span>
|
||||
</span>
|
||||
<div v-else>
|
||||
<template v-for="img in item.content">
|
||||
<img @click="showBigImg(fileBaseUrl + img)" :src="fileBaseUrl + img" alt="" style="max-width: 400px;"/>
|
||||
@@ -266,6 +274,15 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
displayAll(item) {
|
||||
if (!item.isAll && item.content && item.content.length > 180) {
|
||||
return item.content.slice(0, 150) + "...";
|
||||
}
|
||||
return item.content;
|
||||
},
|
||||
changeIsAll(item) {
|
||||
item.isAll = !item.isAll;
|
||||
},
|
||||
// 笔记图片放大
|
||||
showBigImg(path){
|
||||
this.currentImagePath = path;
|
||||
@@ -535,6 +552,9 @@ export default {
|
||||
apiNote.query(data).then(res=>{
|
||||
if(res.status == 200) {
|
||||
res.result.list.forEach((item,index)=>{
|
||||
if(item.type == 2 && item.contentType !== 3) {
|
||||
item.isAll = false;
|
||||
}
|
||||
if(item.contentType == 3) {
|
||||
item.content = item.content.split(',');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user