Compare commits

...

12 Commits

Author SHA1 Message Date
sunhonglai
ffbc4ef808 增加乐享强制走sso 2025-04-15 16:20:23 +08:00
sunhonglai
5936183912 增加乐享转向 2025-04-15 09:12:11 +08:00
sunhonglai
702881c100 修改排行榜展示数据不对问题 2025-04-09 14:28:42 +08:00
670788339
b0229f6cde 测试 2025-04-03 16:36:38 +08:00
670788339
9c6c1708fc 测试 2025-04-03 16:33:42 +08:00
670788339
b67d7f4311 测试 2025-04-03 16:24:13 +08:00
670788339
c5e54f0170 测试 2025-04-03 16:17:04 +08:00
670788339
5c5a71ec55 测试 2025-04-03 15:21:51 +08:00
joshen
b6a3a32412 Merge remote-tracking branch 'aliyun/master_20250319-lyc' 2025-04-02 16:59:49 +08:00
sunhonglai
d6fd44830b 去掉无用日志 2025-04-01 08:30:37 +08:00
sunhonglai
d01fd6f07b 修改视频播放拖拽问题 2025-03-31 19:13:55 +08:00
670788339
f9e332ab7c SZX-1045 2025-03-28 11:47:43 +08:00
6 changed files with 139 additions and 31 deletions

View File

@@ -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');

View File

@@ -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: {

View File

@@ -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
View 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>

View File

@@ -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;

View File

@@ -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);
} }