|
@@ -687,7 +687,10 @@ export default {
|
|
|
})
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+ uni.showLoading({
|
|
|
+ title: '拼命加载中...',
|
|
|
+ mask:true,
|
|
|
+ })
|
|
|
var confirmDetail = true;
|
|
|
if (item.educationName == '继续教育') {
|
|
|
if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') {
|
|
@@ -703,7 +706,7 @@ export default {
|
|
|
if (item.gradeStatus == 1 && item.status == 1 && (item.serviceEndTime > this.sysTime) && (item
|
|
|
.classEndTime && (item.classEndTime < this.sysTime)) && (item.periodStatus == 0 || item
|
|
|
.periodStatus == -1) && item.studyCount > 0) {
|
|
|
- this.selectClass(item, index)
|
|
|
+ this.selectClass(item, index, 'loading')
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -711,6 +714,7 @@ export default {
|
|
|
let rebuildStatus = await this.courseGoodsRebuildStatus(item.goodsId, item.gradeId)
|
|
|
|
|
|
if (rebuildStatus == 0) {
|
|
|
+ uni.hideLoading()
|
|
|
this.$navTo.togo('/pages2/learn/details', {
|
|
|
gradeId: item.gradeId,
|
|
|
goodsId: item.goodsId,
|
|
@@ -734,13 +738,26 @@ export default {
|
|
|
} 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.$api.courseCourseList({
|
|
|
+ // pageNum: 1,
|
|
|
+ // pageSize: 1,
|
|
|
+ // goodsId: item.goodsId,
|
|
|
+ // gradeId: item.gradeId,
|
|
|
+ // orderGoodsId: item.orderGoodsId,
|
|
|
+ // })
|
|
|
+ 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.total > 1) {
|
|
@@ -772,19 +789,37 @@ export default {
|
|
|
*/
|
|
|
courseGoodsRebuildStatus(goodsId, gradeId) {
|
|
|
return new Promise(resolve => {
|
|
|
- this.$api.courseGoodsRebuildStatus({
|
|
|
- goodsId: goodsId,
|
|
|
- gradeId: gradeId
|
|
|
- }).then(res => {
|
|
|
+ // this.$api.courseGoodsRebuildStatus({
|
|
|
+ // goodsId: goodsId,
|
|
|
+ // gradeId: gradeId
|
|
|
+ // })
|
|
|
+ this.$http({
|
|
|
+ url: '/course/goodsRebuildStatus',
|
|
|
+ method: 'get',
|
|
|
+ data: {
|
|
|
+ goodsId: goodsId,
|
|
|
+ gradeId: gradeId
|
|
|
+ },
|
|
|
+ noLoading: true,
|
|
|
+ compleLoading: true, // 请求成功是否还要继续显示加载中
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
resolve(res.data.data)
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
userConfirmInfoDetail(){
|
|
|
return new Promise(resolve => {
|
|
|
- this.$api.userConfirmInfoDetail({
|
|
|
- orderGoodsId:this.activeItem.orderGoodsId,
|
|
|
- }).then(res => {
|
|
|
+ // this.$api.userConfirmInfoDetail({
|
|
|
+ // orderGoodsId:this.activeItem.orderGoodsId,
|
|
|
+ // })
|
|
|
+ this.$http({
|
|
|
+ url: '/user/confirm/info/detail',
|
|
|
+ method: 'GET',
|
|
|
+ data: { orderGoodsId:this.activeItem.orderGoodsId },
|
|
|
+ noLoading:true,
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
if(!res.data.data) {
|
|
|
clearInterval(this.confirmTimer);
|
|
|
this.confirmCount = 10;
|
|
@@ -813,16 +848,23 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- selectClass(item, index) {
|
|
|
+ selectClass(item, index, load) {
|
|
|
this.itemIndex = index;
|
|
|
this.selectItem = item;
|
|
|
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.$api.goodsGradeList({
|
|
|
+ // goodsId: id
|
|
|
+ // })
|
|
|
+ this.$http({
|
|
|
+ url: '/grade/grade/list',
|
|
|
+ method: 'get',
|
|
|
+ data: { goodsId: id },
|
|
|
+ noLoading: load ? true : false,
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
this.gradeList = res.data.rows
|
|
|
if (this.gradeList.length == 0) {
|