mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
增加登录勋章的代码
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
<!-- <div class="swiper-button-prev" slot="button-prev"></div> -->
|
||||
</swiper>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="personal-panel">
|
||||
<div class="personal-img">
|
||||
<author-img width="68px" height="68px" :avatar="userInfo.avatar" :aid="userInfo.aid" :noJump="false" :sex="userInfo.sex"></author-img>
|
||||
@@ -51,7 +51,7 @@
|
||||
<!-- <img class="personal-box-img" :src="`${webBaseUrl}/images/homeWu/agency.png`" alt="" srcset=""> -->
|
||||
</div>
|
||||
</a>
|
||||
<div class="last-study-info">
|
||||
<div class="last-study-info">
|
||||
<div class="one-line-ellipsis">
|
||||
<router-link :to="'/course/detail?id='+lastStudy.courseId" >最近学习:{{lastStudy.courseName}} </router-link>
|
||||
</div>
|
||||
@@ -144,7 +144,7 @@
|
||||
<div class="course-author">
|
||||
<div class="course-author-left">
|
||||
{{ course.authorInfo.name }}
|
||||
|
||||
|
||||
<span class="study-num" >{{formatNum(course.studys)}}人学习</span>
|
||||
</div>
|
||||
<div style="display: flex;">
|
||||
@@ -230,7 +230,7 @@
|
||||
<div class="case-inter-box">
|
||||
<div class="case-inter-left ">
|
||||
<div style="float:left"> <authorInfo :avatar="ca.authorInfo.avatar" :name="ca.authorInfo.name" :sex="ca.authorInfo.sex" :aid="userInfo.aid"></authorInfo></div>
|
||||
<div class="case-inter-orgin index-one-line-ellipsis">{{ ca.authorInfo.orgInfo }}</div>
|
||||
<div class="case-inter-orgin index-one-line-ellipsis">{{ ca.authorInfo.orgInfo }}</div>
|
||||
</div>
|
||||
<div v-if="caseList.orderType==2" class="interact-bar-index"
|
||||
style="font-size: 12px;color: #6E7B84;display: flex;line-height: 30px;">
|
||||
@@ -425,6 +425,12 @@
|
||||
<portalFloatTools></portalFloatTools>
|
||||
<interest-Collection ref="userCollection"></interest-Collection> <!-- 兴趣偏好 -->
|
||||
<guide-box ref="guide" @close="closeGuide"></guide-box> <!-- 引导页 -->
|
||||
<!--登录勋章-->
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="showLoginMedal" :append-to-body="true" >
|
||||
<div>
|
||||
登录勋章显示,根据UI显示修改
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -448,19 +454,11 @@
|
||||
import articleImage from '@/components/Article/articleImage.vue';
|
||||
import InterestCollection from '@/components/Portal/interestCollection.vue'
|
||||
import GuideBox from '@/components/Portal/guideBox.vue'
|
||||
import {
|
||||
toScore,
|
||||
cutFullName,
|
||||
formatUserNumber,
|
||||
cutOrgNamePath
|
||||
} from '@/utils/tools.js';
|
||||
import {
|
||||
swiper,
|
||||
swiperSlide,
|
||||
} from 'vue-awesome-swiper';
|
||||
import { toScore,formatUserNumber,cutOrgNamePath} from '@/utils/tools.js';
|
||||
import {swiper,swiperSlide} from 'vue-awesome-swiper';
|
||||
import apiPlace from "@/api/phase2/place.js"
|
||||
import authorImg from '@/components/Portal/authorImg.vue';
|
||||
import apiStart from '@/api/phase2/stat.js'
|
||||
import apiStat from '@/api/phase2/stat.js'
|
||||
import apiIndex from '@/api/phase2/index.js'
|
||||
import apiUserhobby from "@/api/phase2/userhobby.js"
|
||||
export default {
|
||||
@@ -480,9 +478,25 @@
|
||||
},
|
||||
created() {
|
||||
this.$store.dispatch('refrashStudyTaskCount');
|
||||
//判断是否弹出登录勋章,设置截止日期
|
||||
var nowDate = new Date();
|
||||
var endDate = new Date('2022-11-18');//先设置时间是11月18日
|
||||
if(nowDate<endDate){
|
||||
let $this=this;
|
||||
apiStat.getUserLoginMedal().then(rs=>{
|
||||
if(rs.status==200){
|
||||
if(rs.result.show){
|
||||
//弹出勋章
|
||||
$this.showLoginMedal=true;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showLoginMedal:false,//是否显示登录勋章
|
||||
lastStudy:{},
|
||||
overlayShow:false,
|
||||
userData: { uvalue:0, totalStudyHour:0 },
|
||||
@@ -504,10 +518,10 @@
|
||||
// noSwiping: true,
|
||||
},
|
||||
swiperOption: {
|
||||
autoplay:{
|
||||
autoplay:{
|
||||
delay:2000,
|
||||
disableOnInteraction:false, //解决滑动后不能轮播的问题
|
||||
},
|
||||
},
|
||||
speed: 3000, //切换速度,即slider自动滑动开始到结束的时间(单位ms)
|
||||
loop: true, //循环切换
|
||||
peed: 300, //循环速度
|
||||
@@ -522,7 +536,7 @@
|
||||
prevEl: '.swiper-button-prev',
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
couname: '',
|
||||
isNext: true,
|
||||
pageIndex: 1,
|
||||
@@ -667,7 +681,7 @@
|
||||
return this.webBaseUrl+'/images/listblue0'+(index+1)+'.png';
|
||||
},
|
||||
getLevel() { //获取经验值和等级
|
||||
apiStart.getUserStatTotalInfo(this.userInfo.aid).then(res => {
|
||||
apiStat.getUserStatTotalInfo(this.userInfo.aid).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.userData = res.result;
|
||||
//console.log(this.userData,'this.userData')
|
||||
@@ -855,7 +869,7 @@
|
||||
list.forEach((item, index) => {
|
||||
res.result.some(author => {
|
||||
if (author.aid == item.authorId) {
|
||||
author.orgInfo = cutFullName(author.orgInfo, 1);
|
||||
author.orgInfo = cutOrgNamePath(author.orgInfo, 1);
|
||||
item.authorInfo = author;
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user