mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-22 09:16:44 +08:00
先提交保留一下
This commit is contained in:
@@ -293,7 +293,7 @@ import ad from '@/components/Portal/adFloat.vue';
|
||||
import interactRowBar from '@/components/Portal/interactRowBar.vue';
|
||||
import courseImage from '@/components/Course/courseImage.vue';
|
||||
import articleImage from '@/components/Article/articleImage.vue';
|
||||
import { toScore } from '@/utils/tools.js';
|
||||
import { toScore,getFileBaseUrl} from '@/utils/tools.js';
|
||||
export default {
|
||||
name: 'index',
|
||||
components: { portalHeader,ad, portalFooter, articleImage, portalFloatTools, authorInfo, interactRowBar, interactBar, courseImage },
|
||||
@@ -331,6 +331,8 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//console.log(getFileBaseUrl(),'getFileBaseUrl')
|
||||
console.log(this.$Constants.fileBaseUrl,'fileBaseUrl地址');
|
||||
this.getCourseData(1);
|
||||
this.getCaseData();
|
||||
this.getArticleData();
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import loginApi from "@/api/login";
|
||||
import constants from '@/utils/constants'
|
||||
export default {
|
||||
computed: {
|
||||
...mapGetters(['portalLoginRememberMe'])
|
||||
@@ -67,6 +68,7 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log(constants,'this.$constants.fileBaseUrl');
|
||||
this.refreshCode();
|
||||
if(this.portalLoginRememberMe && this.portalLoginRememberMe.rememberMe){
|
||||
this.rememberMe = true;
|
||||
|
||||
@@ -325,7 +325,7 @@ export default {
|
||||
tags: [],
|
||||
numberToLetter: numberToLetter,
|
||||
// resOwnerListMap: resOwnerIndexName,
|
||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
fileBaseUrl: this.$Constants.fileBaseUrl,
|
||||
blobUrl:'',//播放的文件地址,新添加,采用blob方式
|
||||
getType: getType,
|
||||
courseType,
|
||||
@@ -509,6 +509,7 @@ export default {
|
||||
//this.blobUrl=process.env.VUE_APP_BASE_API+'/xboe/course/resource?fid='+fid;
|
||||
//this.blobUrl='http://localhost:9090/xboe/course/resource?fid='+fid;
|
||||
this.blobUrl=this.fileBaseUrl+u;
|
||||
console.log(this.blobUrl,'this.blobUrl');
|
||||
},
|
||||
createVideoBlob(url){
|
||||
let $this=this;
|
||||
|
||||
@@ -290,30 +290,15 @@ computed: {
|
||||
},
|
||||
jumpRouter(item) {
|
||||
if(item.isOld){
|
||||
|
||||
// this.$router.push({path:'/course/boeframe',query:{id:item.id,type:item.courseType}})
|
||||
location.href=`${this.webBaseUrl}/course/boeframe?id=${item.id}&type=${item.courseType}`
|
||||
//window.open(`${this.webBaseUrl}/course/boeframe?id=${item.id}&type=${item.courseType}`,'_self' )
|
||||
} else {
|
||||
if(item.courseType==10){
|
||||
// let routeData = this.$router.resolve({ path: '/course/micro?id='+item.courseId}); // , query: { id: 1 }
|
||||
// console.log(routeData,'routeData');
|
||||
// window.open(this.webBaseUrl+routeData.href, '_blank');
|
||||
// window.open('/pc/course/micro?id='+item.courseId,'_blank')
|
||||
this.$router.push({path:'/course/micro',query:{id:item.courseId}})
|
||||
}
|
||||
if(item.courseType==20){
|
||||
if(item.progress>0 && item.progress<100) {
|
||||
//let routeData = this.$router.resolve({ path: '/course/studyindex?id='+item.courseId}); // , query: { id: 1 }
|
||||
// console.log(routeData,'routeData');
|
||||
//window.open(this.webBaseUrl+routeData.href, '_blank');
|
||||
// window.open('/pc/course/studyindex?id='+item.courseId,'_blank')
|
||||
this.$router.push({path:'/course/studyindex',query:{id:item.courseId}})
|
||||
this.$router.push({path:'/course/studyindex',query:{id:item.courseId}})
|
||||
} else {
|
||||
//let routeData = this.$router.resolve({ path: '/course/detail?id='+item.courseId}); // , query: { id: 1 }
|
||||
// console.log(routeData,'routeData');
|
||||
// window.open(this.webBaseUrl+routeData.href, '_blank');
|
||||
// window.open('/pc/course/detail?id='+item.courseId,'_blank')
|
||||
this.$router.push({path:'/course/detail',query:{id:item.courseId}})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,9 +36,7 @@
|
||||
<div class="uc-course-time">推送时间:{{ formatsec(Number(item.updated_at) * 1000 )}}</div>
|
||||
</div>
|
||||
<div class="uc-course-btns">
|
||||
<!-- <a :href="item.type == 1 ? '/pc/course/recorded' : '/pc/course/micro'" target="_blank"> -->
|
||||
<el-button @click="jumpRouter(item)" type="primary" size="small">开始学习</el-button>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:150px; text-align: center; margin-top:57px;" >
|
||||
|
||||
Reference in New Issue
Block a user