mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 04:16:45 +08:00
首页最近学习
This commit is contained in:
@@ -744,7 +744,7 @@
|
|||||||
.personal-box{
|
.personal-box{
|
||||||
// margin-left: 16px;
|
// margin-left: 16px;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
margin-bottom: 28px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.xindex-course{
|
.xindex-course{
|
||||||
@@ -1014,7 +1014,7 @@
|
|||||||
padding: 30px 45px;
|
padding: 30px 45px;
|
||||||
.personal-box{
|
.personal-box{
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
margin-bottom: 28px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.xindex-course{
|
.xindex-course{
|
||||||
@@ -1259,7 +1259,7 @@
|
|||||||
padding: 30px 45px;
|
padding: 30px 45px;
|
||||||
.personal-box{
|
.personal-box{
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
margin-bottom: 28px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.medal-index{ // 勋章规则控制
|
.medal-index{ // 勋章规则控制
|
||||||
|
|||||||
@@ -51,6 +51,14 @@
|
|||||||
<!-- <img class="personal-box-img" :src="`${webBaseUrl}/images/homeWu/agency.png`" alt="" srcset=""> -->
|
<!-- <img class="personal-box-img" :src="`${webBaseUrl}/images/homeWu/agency.png`" alt="" srcset=""> -->
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
<div class="last-study-info">
|
||||||
|
<div class="one-line-ellipsis">
|
||||||
|
<router-link :to="'/course/detail?id='+lastStudy.courseId" >最近学习:{{lastStudy.courseName}} </router-link>
|
||||||
|
</div>
|
||||||
|
<div class="tobe-icon">
|
||||||
|
<img :src="`${webBaseUrl}/images/homeWu/Pending.png`" alt="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<ul class="personal-ul">
|
<ul class="personal-ul">
|
||||||
<li>
|
<li>
|
||||||
<router-link to="/user/ranking">
|
<router-link to="/user/ranking">
|
||||||
@@ -421,6 +429,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
import apicourseStudy from "@/api/modules/courseStudy.js"
|
||||||
import portalHeader from '@/components/PortalHeader.vue';
|
import portalHeader from '@/components/PortalHeader.vue';
|
||||||
import portalFooter from '@/components/PortalFooter.vue';
|
import portalFooter from '@/components/PortalFooter.vue';
|
||||||
import portalFloatTools from '@/components/PortalFloatTools.vue';
|
import portalFloatTools from '@/components/PortalFloatTools.vue';
|
||||||
@@ -473,6 +482,8 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
lastStudy:{},
|
||||||
|
overlayShow:false,
|
||||||
userData: { uvalue:0, totalStudyHour:0 },
|
userData: { uvalue:0, totalStudyHour:0 },
|
||||||
userHobby:{
|
userHobby:{
|
||||||
needShow:false,
|
needShow:false,
|
||||||
@@ -553,12 +564,12 @@
|
|||||||
this.getAnkingData();
|
this.getAnkingData();
|
||||||
this.getLevel();
|
this.getLevel();
|
||||||
this.getQaAnswers();
|
this.getQaAnswers();
|
||||||
|
this.getLastStudy();
|
||||||
|
|
||||||
//检查兴趣爱好是否已填报,
|
//检查兴趣爱好是否已填报,
|
||||||
//先检查本地session和 local 15天, 这两个值是在组件中设置的
|
//先检查本地session和 local 15天, 这两个值是在组件中设置的
|
||||||
let sessionHobby=sessionStorage.getItem('user-hobby-'+this.userInfo.aid);
|
let sessionHobby=sessionStorage.getItem('user-hobby-'+this.userInfo.aid);
|
||||||
let localHobbyTime=localStorage.getItem('notYet'+this.userInfo.aid);
|
let localHobbyTime=localStorage.getItem('notYet'+this.userInfo.aid);
|
||||||
console.log("sessionHobby:"+sessionHobby);
|
|
||||||
if(!sessionHobby){ //只有session中不存在,才会验证
|
if(!sessionHobby){ //只有session中不存在,才会验证
|
||||||
//本地15天验证,localHobby,后续完善
|
//本地15天验证,localHobby,后续完善
|
||||||
let flag=true;//请求检查
|
let flag=true;//请求检查
|
||||||
@@ -597,6 +608,20 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 上次学习记录
|
||||||
|
getLastStudy() {
|
||||||
|
apicourseStudy.lastStudy().then(res => {
|
||||||
|
if (res.status === 200) {
|
||||||
|
this.lastStudy = res.result;
|
||||||
|
console.log(this.lastStudy,'this.lastStudy');
|
||||||
|
if (res.result != '' && res.result.courseId) {
|
||||||
|
this.overlayShow = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
//检查并弹出引导页
|
//检查并弹出引导页
|
||||||
checkAndShowGuide(){
|
checkAndShowGuide(){
|
||||||
//引导页弹框是否显示
|
//引导页弹框是否显示
|
||||||
@@ -1112,7 +1137,12 @@
|
|||||||
color: #000000;
|
color: #000000;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
.last-study-info{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0 10px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
.personal-box {
|
.personal-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 47px;
|
height: 47px;
|
||||||
|
|||||||
Reference in New Issue
Block a user