mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 02:46:44 +08:00
Compare commits
12 Commits
250321-bug
...
250422-dem
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ffbc4ef808 | ||
|
|
5936183912 | ||
|
|
702881c100 | ||
|
|
b0229f6cde | ||
|
|
9c6c1708fc | ||
|
|
b67d7f4311 | ||
|
|
c5e54f0170 | ||
|
|
5c5a71ec55 | ||
|
|
b6a3a32412 | ||
|
|
d6fd44830b | ||
|
|
d01fd6f07b | ||
|
|
f9e332ab7c |
@@ -242,17 +242,20 @@
|
|||||||
<svg-icon :icon-class="activeMenu == '/user/medal'?'myxunzhang-active':'myxunzhang'"></svg-icon>
|
<svg-icon :icon-class="activeMenu == '/user/medal'?'myxunzhang-active':'myxunzhang'"></svg-icon>
|
||||||
<span slot="title">我的勋章</span>
|
<span slot="title">我的勋章</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-submenu index="myGrowth" v-show="curIdentity == 1">
|
<template v-if="showGrowthNav">
|
||||||
<template slot="title">
|
<el-submenu index="myGrowth" v-show="curIdentity == 1">
|
||||||
<!-- <i class="el-icon-s-grid"></i> -->
|
<template slot="title">
|
||||||
<img src="../../assets/images/myGrowth.jpg" style="width: 1em;height: 1em;margin-right: 8px;"></img>
|
<!-- <i class="el-icon-s-grid"></i> -->
|
||||||
<span>我的必修</span>
|
<img src="../../assets/images/myGrowth.jpg" style="width: 1em;height: 1em;margin-right: 8px;"></img>
|
||||||
</template>
|
<span>我的必修</span>
|
||||||
<el-menu-item index="/growth/growthPage">
|
</template>
|
||||||
<!-- <i class="el-icon-menu"></i> -->
|
<el-menu-item index="/growth/growthPage">
|
||||||
<span slot="title" class="study textl">专业力必修</span>
|
<!-- <i class="el-icon-menu"></i> -->
|
||||||
</el-menu-item>
|
<span slot="title" class="study textl">专业力必修</span>
|
||||||
</el-submenu>
|
</el-menu-item>
|
||||||
|
</el-submenu>
|
||||||
|
</template>
|
||||||
|
|
||||||
<el-submenu index="mystudy" v-show="curIdentity == 1">
|
<el-submenu index="mystudy" v-show="curIdentity == 1">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<!-- <i class="el-icon-s-grid"></i> -->
|
<!-- <i class="el-icon-s-grid"></i> -->
|
||||||
@@ -396,6 +399,7 @@ import { mapGetters } from 'vuex';
|
|||||||
import apicourseStudy from "../../api/modules/courseStudy.js"
|
import apicourseStudy from "../../api/modules/courseStudy.js"
|
||||||
import {pageList} from "@/api/modules/lecturer"
|
import {pageList} from "@/api/modules/lecturer"
|
||||||
import courseImage from "@/components/Course/courseImage.vue"
|
import courseImage from "@/components/Course/courseImage.vue"
|
||||||
|
import { listData } from "@/api/growth/growthpath"
|
||||||
import testUser from '@/utils/testUsers.js'
|
import testUser from '@/utils/testUsers.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'UcMenu',
|
name: 'UcMenu',
|
||||||
@@ -424,7 +428,8 @@ export default {
|
|||||||
isCollapse: false,
|
isCollapse: false,
|
||||||
lastStudy:{},
|
lastStudy:{},
|
||||||
overlayShow: false,
|
overlayShow: false,
|
||||||
instructor:0
|
instructor:0,
|
||||||
|
showGrowthNav: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -434,6 +439,10 @@ export default {
|
|||||||
//获取讲师认证中条数
|
//获取讲师认证中条数
|
||||||
this.instructorCertification()
|
this.instructorCertification()
|
||||||
console.log(this.userInfo,'userInfouserInfo')
|
console.log(this.userInfo,'userInfouserInfo')
|
||||||
|
//如果专业力必修没有学习任务则隐藏“我的必修按钮”
|
||||||
|
listData().then(res => {
|
||||||
|
this.showGrowthNav = !!res.data.length
|
||||||
|
})
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
//console.log(this.userInfo.loginName,'this.userInfo.loginName');
|
//console.log(this.userInfo.loginName,'this.userInfo.loginName');
|
||||||
|
|||||||
@@ -506,6 +506,13 @@ export default {
|
|||||||
updateProgressBySetTime(newCurrentTime) {
|
updateProgressBySetTime(newCurrentTime) {
|
||||||
this.currentProgress = newCurrentTime / this.videoDom.duration;
|
this.currentProgress = newCurrentTime / this.videoDom.duration;
|
||||||
},
|
},
|
||||||
|
/* 点击进度条更新视频播放进度2
|
||||||
|
*/
|
||||||
|
updateProgressByClickBar2(newCurrentTime,progressVideo) {
|
||||||
|
this.currentProgress = progressVideo;
|
||||||
|
this.barrageTimelineStart = newCurrentTime;
|
||||||
|
this.videoDom.currentTime = newCurrentTime;
|
||||||
|
},
|
||||||
/* 提高视频音量
|
/* 提高视频音量
|
||||||
*/
|
*/
|
||||||
increaseVolume() {
|
increaseVolume() {
|
||||||
@@ -619,7 +626,7 @@ export default {
|
|||||||
handleFullscreenChange() {
|
handleFullscreenChange() {
|
||||||
console.log("handleFullscreenChange gx this.isFullScreen()",this.isFullScreen())
|
console.log("handleFullscreenChange gx this.isFullScreen()",this.isFullScreen())
|
||||||
console.log("handleFullscreenChange gx this.isFullscreen",this.isFullscreen)
|
console.log("handleFullscreenChange gx this.isFullscreen",this.isFullscreen)
|
||||||
|
|
||||||
if(this.isFullscreen){
|
if(this.isFullscreen){
|
||||||
this.isFullscreen = !!document.fullscreenElement;
|
this.isFullscreen = !!document.fullscreenElement;
|
||||||
if (!this.isFullscreen) {
|
if (!this.isFullscreen) {
|
||||||
@@ -629,7 +636,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@@ -341,6 +341,13 @@ export const constantRoutes = [{
|
|||||||
name: 'hotforum',
|
name: 'hotforum',
|
||||||
meta: {title: '热点论坛', icon: 'dashboard', noCache: true, affix: true},
|
meta: {title: '热点论坛', icon: 'dashboard', noCache: true, affix: true},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/lexiang',
|
||||||
|
hidden: true,
|
||||||
|
component: (resolve) => require(['@/views/sso/lexiang'], resolve),
|
||||||
|
name: 'lexiang',
|
||||||
|
meta: {title: '单点登录', icon: 'dashboard', noCache: true, affix: true},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/404',
|
path: '/404',
|
||||||
component: (resolve) => require(['@/views/error/404'], resolve),
|
component: (resolve) => require(['@/views/error/404'], resolve),
|
||||||
|
|||||||
53
src/views/sso/lexiang.vue
Normal file
53
src/views/sso/lexiang.vue
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<p v-if="loading">正在跳转,请稍候...</p>
|
||||||
|
<p v-if="error" class="error">{{ errorMessage }}</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import axios from 'axios'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: true,
|
||||||
|
error: false,
|
||||||
|
errorMessage: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.fetchCode()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async fetchCode() {
|
||||||
|
try {
|
||||||
|
// 替换为你的实际API地址
|
||||||
|
const response = await axios.post('/userbasic/sso/getCode', {})
|
||||||
|
const code = response.data.result
|
||||||
|
if (code) {
|
||||||
|
// 替换为你的目标外部链接,并确保参数名称正确
|
||||||
|
const redirectUrl = `https://lexiangla.com?company_from=d1f3b156e9ed11ef9dc9720f77c5afa9&login_way=sso&sso_auth_code=${encodeURIComponent(code)}`
|
||||||
|
window.location.href = redirectUrl
|
||||||
|
} else {
|
||||||
|
this.handleError('未获取到有效code')
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
this.handleError(`请求失败: ${error.message}`)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleError(message) {
|
||||||
|
this.loading = false
|
||||||
|
this.error = true
|
||||||
|
this.errorMessage = message
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.error {
|
||||||
|
color: red;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -802,6 +802,11 @@
|
|||||||
|
|
||||||
|
|
||||||
this.$nextTick(function(){
|
this.$nextTick(function(){
|
||||||
|
if(this.contentData.progressVideo){
|
||||||
|
this.$refs.myVideoPlayer.updateProgressByClickBar2(this.contentData.lastStudyTime,this.contentData.progressVideo);
|
||||||
|
// $this.notePlay = this.contentData.lastStudyTime;
|
||||||
|
}
|
||||||
|
|
||||||
//let h0=document.getElementById('id_course_player').offsetHeight;
|
//let h0=document.getElementById('id_course_player').offsetHeight;
|
||||||
let h=$this.$refs.coursePlayer.offsetHeight;
|
let h=$this.$refs.coursePlayer.offsetHeight;
|
||||||
//let h1=$this.$refs.coursePlayer.clientHeight;
|
//let h1=$this.$refs.coursePlayer.clientHeight;
|
||||||
@@ -1448,6 +1453,7 @@
|
|||||||
}
|
}
|
||||||
//console.log(scon.contentId,con.id);
|
//console.log(scon.contentId,con.id);
|
||||||
con.lastStudyTime = scon.lastStudyTime;
|
con.lastStudyTime = scon.lastStudyTime;
|
||||||
|
con.progressVideo = scon.progressVideo;
|
||||||
//以下判断是为了兼容之前的问题,学习状态
|
//以下判断是为了兼容之前的问题,学习状态
|
||||||
if (scon.status) {
|
if (scon.status) {
|
||||||
con.status = scon.status;
|
con.status = scon.status;
|
||||||
|
|||||||
@@ -380,15 +380,19 @@ export default {
|
|||||||
getExperience() {//经验值
|
getExperience() {//经验值
|
||||||
let data = {
|
let data = {
|
||||||
aid:this.userInfo.aid,// #用户id
|
aid:this.userInfo.aid,// #用户id
|
||||||
statType:21, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
|
statType:20, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
|
||||||
field:this.experience.field,// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
|
field:this.experience.field,// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
|
||||||
num:10,// #显示的条数
|
num:10,// #显示的条数
|
||||||
}
|
}
|
||||||
if(data.field == 'now'){
|
if(data.field == 'now'){
|
||||||
|
data.statType = 20
|
||||||
|
data.field = 'years'
|
||||||
|
this.experience.field = 'years'
|
||||||
|
this.isNow = true
|
||||||
|
}else{
|
||||||
data.statType = 20
|
data.statType = 20
|
||||||
data.field = 'total'
|
data.field = 'total'
|
||||||
this.experience.field = 'total'
|
this.experience.field = 'total'
|
||||||
this.isNow = true
|
|
||||||
}
|
}
|
||||||
apiStat.getRanking(data).then(res=>{
|
apiStat.getRanking(data).then(res=>{
|
||||||
if(res.status==200){
|
if(res.status==200){
|
||||||
@@ -402,12 +406,15 @@ export default {
|
|||||||
}
|
}
|
||||||
this.getUserData([res.result.currentUserRankingData.aid],[res.result.currentUserRankingData])
|
this.getUserData([res.result.currentUserRankingData.aid],[res.result.currentUserRankingData])
|
||||||
this.experience.data = res.result.currentUserRankingData;
|
this.experience.data = res.result.currentUserRankingData;
|
||||||
if(this.experience.field == 'total') {
|
this.currentUserRankingTotalData.rankNo = res.result.currentUserRankingData.rankingNo;
|
||||||
|
this.currentUserRankingTotalData.endValue = this.current.endValue;
|
||||||
|
if(data.field == 'total') {
|
||||||
this.current = this.experienceValue(res.result.currentUserRankingData.total);
|
this.current = this.experienceValue(res.result.currentUserRankingData.total);
|
||||||
this.currentUserRankingTotalData.rankNo = res.result.currentUserRankingData.rankingNo;
|
|
||||||
this.currentUserRankingTotalData.rankValue = res.result.currentUserRankingData.total;
|
this.currentUserRankingTotalData.rankValue = res.result.currentUserRankingData.total;
|
||||||
this.currentUserRankingTotalData.endValue = this.current.endValue;
|
}else if(data.field == 'years'){
|
||||||
|
this.currentUserRankingTotalData.rankValue = res.result.currentUserRankingData.years;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
this.current.total=res.result.currentUserRankingData.total;//当前用户的经验值是固定的
|
this.current.total=res.result.currentUserRankingData.total;//当前用户的经验值是固定的
|
||||||
const ids= [];
|
const ids= [];
|
||||||
@@ -434,9 +441,15 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.experience.list = listData.sort((a,b)=>{
|
if(data.field == 'total') {
|
||||||
return b.total-a.total
|
this.experience.list = listData.sort((a,b)=>{
|
||||||
}).slice(0,5);
|
return b.total-a.total
|
||||||
|
}).slice(0,5);
|
||||||
|
}else if(data.field == 'years'){
|
||||||
|
this.experience.list = listData.sort((a,b)=>{
|
||||||
|
return b.years-a.years
|
||||||
|
}).slice(0,5);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.message);
|
this.$message.error(res.message);
|
||||||
}
|
}
|
||||||
@@ -447,15 +460,19 @@ export default {
|
|||||||
getDuration() {//学习时长
|
getDuration() {//学习时长
|
||||||
let data = {
|
let data = {
|
||||||
aid:this.userInfo.aid,// #用户id
|
aid:this.userInfo.aid,// #用户id
|
||||||
statType:12, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
|
statType:10, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
|
||||||
field:this.learningDuration.field,// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
|
field:this.learningDuration.field,// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
|
||||||
num:10,// #显示的条数
|
num:10,// #显示的条数
|
||||||
}
|
}
|
||||||
if(data.field == 'now'){
|
if(data.field == 'now'){
|
||||||
data.statType = 10
|
data.statType = 10;
|
||||||
data.field = 'total'
|
data.field = 'years';
|
||||||
this.learningDuration.field = 'total'
|
this.learningDuration.field = 'years';
|
||||||
this.isStudyTime = true
|
this.isStudyTime = true;
|
||||||
|
}else{
|
||||||
|
data.statType = 10;
|
||||||
|
data.field = 'total';
|
||||||
|
this.learningDuration.field = 'total';
|
||||||
}
|
}
|
||||||
apiStat.getRanking(data).then(res=>{
|
apiStat.getRanking(data).then(res=>{
|
||||||
if(res.status==200){
|
if(res.status==200){
|
||||||
@@ -469,9 +486,11 @@ export default {
|
|||||||
}
|
}
|
||||||
this.getUserData([res.result.currentUserRankingData.aid],[res.result.currentUserRankingData])
|
this.getUserData([res.result.currentUserRankingData.aid],[res.result.currentUserRankingData])
|
||||||
this.learningDuration.data = res.result.currentUserRankingData;
|
this.learningDuration.data = res.result.currentUserRankingData;
|
||||||
|
this.learningDurationTotalData.rankNo = res.result.currentUserRankingData.rankingNo;
|
||||||
if(data.field == 'total'){
|
if(data.field == 'total'){
|
||||||
this.learningDurationTotalData.rankNo = res.result.currentUserRankingData.rankingNo;
|
|
||||||
this.learningDurationTotalData.rankValue = res.result.currentUserRankingData.total;
|
this.learningDurationTotalData.rankValue = res.result.currentUserRankingData.total;
|
||||||
|
} else if(data.field == 'years'){
|
||||||
|
this.learningDurationTotalData.rankValue = res.result.currentUserRankingData.years;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -500,9 +519,16 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.learningDuration.list = listData.sort((a,b)=>{
|
if(data.field == 'total'){
|
||||||
return b.total-a.total
|
this.learningDuration.list = listData.sort((a,b)=>{
|
||||||
}).slice(0,5);
|
return b.total-a.total
|
||||||
|
}).slice(0,5)
|
||||||
|
} else if(data.field == 'years'){
|
||||||
|
this.learningDuration.list = listData.sort((a,b)=>{
|
||||||
|
return b.years-a.years
|
||||||
|
}).slice(0,5)
|
||||||
|
}
|
||||||
|
;
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.message);
|
this.$message.error(res.message);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user