This commit is contained in:
zhaofang
2022-07-21 15:49:59 +08:00
parent c61b435b6a
commit b4f83b1795
9 changed files with 11 additions and 12 deletions

View File

@@ -40,8 +40,8 @@ const pageList = function(query) {
* 课程的详细信息 * 课程的详细信息
* @param {String} id * @param {String} id
*/ */
const detail = function(id) { const detail = function(id,preview) {
return ajax.get('/xboe/m/course/portal/detail?id=' + id); return ajax.get(`/xboe/m/course/portal/detail?id=${id}&preview=${preview}`);
} }
/** /**

View File

@@ -567,7 +567,7 @@ export default {
}, },
getDetail() { getDetail() {
let $this = this; let $this = this;
apiCoursePortal.detail(this.id).then(rs => { apiCoursePortal.detail(this.id,true).then(rs => {
if (rs.status == 200) { if (rs.status == 200) {
this.courseInfo = rs.result.course; this.courseInfo = rs.result.course;
this.teacherList = rs.result.teachers; this.teacherList = rs.result.teachers;

View File

@@ -607,7 +607,7 @@ export default {
this.courseInfo.coverImg = ""; this.courseInfo.coverImg = "";
}, },
getDetail() { getDetail() {
apiCoursePortal.detail(this.id).then(rs => { apiCoursePortal.detail(this.id,true).then(rs => {
if (rs.status == 200) { if (rs.status == 200) {
this.courseInfo = rs.result.course; this.courseInfo = rs.result.course;
if(rs.result.course.coverImg !== '') { if(rs.result.course.coverImg !== '') {

View File

@@ -443,7 +443,7 @@ export default {
} }
}, },
getDetail() { getDetail() {
apiCoursePortal.detail(this.manageStudyData.id).then(rs => { apiCoursePortal.detail(this.manageStudyData.id,true).then(rs => {
if (rs.status == 200) { if (rs.status == 200) {
let treeList = []; let treeList = [];
if (rs.result.sections.length > 0) { if (rs.result.sections.length > 0) {
@@ -523,7 +523,7 @@ export default {
}); });
}, },
getRecordDetail(id) { getRecordDetail(id) {
apiCoursePortal.detail(id).then(rs => { apiCoursePortal.detail(id,true).then(rs => {
if (rs.status == 200) { if (rs.status == 200) {
let treeList = []; let treeList = [];
if (rs.result.sections.length > 0) { if (rs.result.sections.length > 0) {

View File

@@ -173,7 +173,7 @@ export default {
let $this=this; let $this=this;
//页面只支取一次,所以先直接写在这里面 //页面只支取一次,所以先直接写在这里面
apiCoursePortal.detail(id).then(rs=>{ apiCoursePortal.detail(id,false).then(rs=>{
if(rs.status==200){ if(rs.status==200){
if(rs.result.teachers && rs.result.teachers.length > 0){ if(rs.result.teachers && rs.result.teachers.length > 0){
let userIds=[]; let userIds=[];

View File

@@ -363,7 +363,7 @@ export default {
this.loadResOwners(); this.loadResOwners();
let $this = this; let $this = this;
//页面只支取一次,所以先直接写在这里面 //页面只支取一次,所以先直接写在这里面
apiCoursePortal.detail(id).then(rs => { apiCoursePortal.detail(id,false).then(rs => {
if (rs.status == 200) { if (rs.status == 200) {
this.courseInfo = rs.result.course; this.courseInfo = rs.result.course;
if(rs.result.course.tags != '') this.tags = rs.result.course.tags.split(","); if(rs.result.course.tags != '') this.tags = rs.result.course.tags.split(",");

View File

@@ -484,7 +484,7 @@ export default {
this.showQrimage(); this.showQrimage();
let $this = this; let $this = this;
//页面只支取一次,所以先直接写在这里面 //页面只支取一次,所以先直接写在这里面
apiCoursePortal.detail(id).then(rs => { apiCoursePortal.detail(id,true).then(rs => {
if (rs.status == 200) { if (rs.status == 200) {
console.log(rs,'2') console.log(rs,'2')
this.courseInfo = rs.result.course; this.courseInfo = rs.result.course;

View File

@@ -300,7 +300,7 @@ export default {
//console.log("播放结束"); //console.log("播放结束");
}, },
loadData() { loadData() {
apiCoursePortal.detail(this.courseId).then(rs=>{ apiCoursePortal.detail(this.courseId,true).then(rs=>{
if(rs.status==200){ if(rs.status==200){
//设置必须的字段 //设置必须的字段
rs.result.sections.forEach(sec=>{ rs.result.sections.forEach(sec=>{

View File

@@ -580,10 +580,9 @@ export default {
if(this.contentData.status<9){ if(this.contentData.status<9){
this.finishStudyItem(); this.finishStudyItem();
} }
}, },
loadData() { loadData() {
apiCoursePortal.detail(this.courseId).then(rs => { apiCoursePortal.detail(this.courseId,false).then(rs => {
if (rs.status == 200) { if (rs.status == 200) {
//设置必须的字段 //设置必须的字段
rs.result.sections.forEach(sec => { rs.result.sections.forEach(sec => {