|
@@ -564,6 +564,8 @@ export default {
|
|
}
|
|
}
|
|
if (res3.code == 200) {
|
|
if (res3.code == 200) {
|
|
this.livingLists = res3.rows || []
|
|
this.livingLists = res3.rows || []
|
|
|
|
+ } else {
|
|
|
|
+ this.$u.toast(res3.msg)
|
|
}
|
|
}
|
|
this.allLoading = false
|
|
this.allLoading = false
|
|
// }
|
|
// }
|
|
@@ -582,7 +584,6 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 看直播
|
|
// 看直播
|
|
- // let encode = encodeURIComponent(WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='+item.liveUrl+'&gradeId='+0+'&courseId='+this.courseId+'&goodsId='+this.goodsId+'&orderGoodsId='+this.orderGoodsId+'§ionId='+sectionId+'&chapterId='+chapterId+'&moduleId='+moduleId)
|
|
|
|
toLiveLook(item) {
|
|
toLiveLook(item) {
|
|
let moduleId = item.moduleId || 0
|
|
let moduleId = item.moduleId || 0
|
|
let chapterId = item.chapterId || 0
|
|
let chapterId = item.chapterId || 0
|
|
@@ -676,8 +677,6 @@ export default {
|
|
})
|
|
})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- // console.log(this.sysTime, item.learningTimeStart)
|
|
|
|
- // console.log(this.sysTime < item.learningTimeStart)
|
|
|
|
if (item.learningStatus == 3 && (this.sysTime < item.learningTimeStart)) {
|
|
if (item.learningStatus == 3 && (this.sysTime < item.learningTimeStart)) {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
icon: 'none',
|
|
icon: 'none',
|
|
@@ -685,7 +684,10 @@ export default {
|
|
})
|
|
})
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: '拼命加载中...',
|
|
|
|
+ mask:true,
|
|
|
|
+ })
|
|
var confirmDetail = true;
|
|
var confirmDetail = true;
|
|
if (item.educationName == '继续教育') {
|
|
if (item.educationName == '继续教育') {
|
|
if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') {
|
|
if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') {
|
|
@@ -701,7 +703,7 @@ export default {
|
|
if (item.gradeStatus == 1 && item.status == 1 && (item.serviceEndTime > this.sysTime) && (item
|
|
if (item.gradeStatus == 1 && item.status == 1 && (item.serviceEndTime > this.sysTime) && (item
|
|
.classEndTime && (item.classEndTime < this.sysTime)) && (item.periodStatus == 0 || item
|
|
.classEndTime && (item.classEndTime < this.sysTime)) && (item.periodStatus == 0 || item
|
|
.periodStatus == -1) && item.studyCount > 0) {
|
|
.periodStatus == -1) && item.studyCount > 0) {
|
|
- this.selectClass(item, index)
|
|
|
|
|
|
+ this.selectClass(item, index, 'loading')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
@@ -709,6 +711,7 @@ export default {
|
|
let rebuildStatus = await this.courseGoodsRebuildStatus(item.goodsId, item.gradeId)
|
|
let rebuildStatus = await this.courseGoodsRebuildStatus(item.goodsId, item.gradeId)
|
|
|
|
|
|
if (rebuildStatus == 0) {
|
|
if (rebuildStatus == 0) {
|
|
|
|
+ uni.hideLoading()
|
|
this.$navTo.togo('/pages2/learn/details', {
|
|
this.$navTo.togo('/pages2/learn/details', {
|
|
gradeId: item.gradeId,
|
|
gradeId: item.gradeId,
|
|
goodsId: item.goodsId,
|
|
goodsId: item.goodsId,
|
|
@@ -730,15 +733,19 @@ export default {
|
|
duration: 3000
|
|
duration: 3000
|
|
})
|
|
})
|
|
} else if (res.data.code == 500) { //可以学习
|
|
} else if (res.data.code == 500) { //可以学习
|
|
- // if (item.courseNum == 1) { // 课程数量
|
|
|
|
- // /course/courseList查询商品下的课程列表
|
|
|
|
- this.$api.courseCourseList({
|
|
|
|
- pageNum: 1,
|
|
|
|
- pageSize: 1,
|
|
|
|
- goodsId: item.goodsId,
|
|
|
|
- gradeId: item.gradeId,
|
|
|
|
- orderGoodsId: item.orderGoodsId,
|
|
|
|
- }).then(res => {
|
|
|
|
|
|
+ this.$http({
|
|
|
|
+ url: '/course/courseList',
|
|
|
|
+ method: 'get',
|
|
|
|
+ data: {
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 1,
|
|
|
|
+ goodsId: item.goodsId,
|
|
|
|
+ gradeId: item.gradeId,
|
|
|
|
+ orderGoodsId: item.orderGoodsId,
|
|
|
|
+ },
|
|
|
|
+ noLoading: true
|
|
|
|
+ })
|
|
|
|
+ .then(res => {
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
|
|
|
|
if(res.data.total > 1) {
|
|
if(res.data.total > 1) {
|
|
@@ -757,9 +764,6 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
return;
|
|
return;
|
|
- // }
|
|
|
|
-
|
|
|
|
- // this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|
|
@@ -770,19 +774,30 @@ export default {
|
|
*/
|
|
*/
|
|
courseGoodsRebuildStatus(goodsId, gradeId) {
|
|
courseGoodsRebuildStatus(goodsId, gradeId) {
|
|
return new Promise(resolve => {
|
|
return new Promise(resolve => {
|
|
- this.$api.courseGoodsRebuildStatus({
|
|
|
|
- goodsId: goodsId,
|
|
|
|
- gradeId: gradeId
|
|
|
|
- }).then(res => {
|
|
|
|
|
|
+ this.$http({
|
|
|
|
+ url: '/course/goodsRebuildStatus',
|
|
|
|
+ method: 'get',
|
|
|
|
+ data: {
|
|
|
|
+ goodsId: goodsId,
|
|
|
|
+ gradeId: gradeId
|
|
|
|
+ },
|
|
|
|
+ noLoading: true,
|
|
|
|
+ compleLoading: true, // 请求成功是否还要继续显示加载中
|
|
|
|
+ })
|
|
|
|
+ .then(res => {
|
|
resolve(res.data.data)
|
|
resolve(res.data.data)
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
userConfirmInfoDetail(){
|
|
userConfirmInfoDetail(){
|
|
return new Promise(resolve => {
|
|
return new Promise(resolve => {
|
|
- this.$api.userConfirmInfoDetail({
|
|
|
|
- orderGoodsId:this.activeItem.orderGoodsId,
|
|
|
|
- }).then(res => {
|
|
|
|
|
|
+ this.$http({
|
|
|
|
+ url: '/user/confirm/info/detail',
|
|
|
|
+ method: 'GET',
|
|
|
|
+ data: { orderGoodsId:this.activeItem.orderGoodsId },
|
|
|
|
+ noLoading:true,
|
|
|
|
+ })
|
|
|
|
+ .then(res => {
|
|
if(!res.data.data) {
|
|
if(!res.data.data) {
|
|
clearInterval(this.confirmTimer);
|
|
clearInterval(this.confirmTimer);
|
|
this.confirmCount = 10;
|
|
this.confirmCount = 10;
|
|
@@ -811,16 +826,20 @@ export default {
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- selectClass(item, index) {
|
|
|
|
|
|
+ selectClass(item, index, load) {
|
|
this.itemIndex = index;
|
|
this.itemIndex = index;
|
|
this.selectItem = item;
|
|
this.selectItem = item;
|
|
this.selectClassModal = true;
|
|
this.selectClassModal = true;
|
|
- this.goodsGradeList(item.goodsId);
|
|
|
|
|
|
+ this.goodsGradeList(item.goodsId, load);
|
|
},
|
|
},
|
|
- goodsGradeList(id) {
|
|
|
|
- this.$api.goodsGradeList({
|
|
|
|
- goodsId: id
|
|
|
|
- }).then(res => {
|
|
|
|
|
|
+ goodsGradeList(id, load) {
|
|
|
|
+ this.$http({
|
|
|
|
+ url: '/grade/grade/list',
|
|
|
|
+ method: 'get',
|
|
|
|
+ data: { goodsId: id },
|
|
|
|
+ noLoading: load ? true : false,
|
|
|
|
+ })
|
|
|
|
+ .then(res => {
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
this.gradeList = res.data.rows
|
|
this.gradeList = res.data.rows
|
|
if (this.gradeList.length == 0) {
|
|
if (this.gradeList.length == 0) {
|
|
@@ -977,7 +996,6 @@ export default {
|
|
},
|
|
},
|
|
appBeforeAddress(goodsId,item) {
|
|
appBeforeAddress(goodsId,item) {
|
|
this.$api.appBeforeAddress({
|
|
this.$api.appBeforeAddress({
|
|
- // goodsId,
|
|
|
|
orderGoodsId:item.orderGoodsId
|
|
orderGoodsId:item.orderGoodsId
|
|
}).then(res => {
|
|
}).then(res => {
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|