课程指引+课程价格
This commit is contained in:
@@ -22,9 +22,9 @@
|
||||
<template slot="rightSlot" slot-scope="slotProps">
|
||||
<!-- {{ slotProps.row.bxType }} -->
|
||||
|
||||
<text class="fdButtonBox aui-text-danger fdButtonBoxRed"
|
||||
>立即购买</text
|
||||
>
|
||||
<text :class="`fdButtonBox ${cateList[currentCateIndex].type == 0 ?'':'aui-text-danger fdButtonBoxRed'} `">{{
|
||||
cateList[currentCateIndex].type == 0 ? "开始学习" : "立即购买"
|
||||
}}</text>
|
||||
|
||||
<view> </view>
|
||||
</template>
|
||||
@@ -396,6 +396,7 @@ export default {
|
||||
curriculumInfo: "sociology/course/getCourseCatalogueChapterList",
|
||||
list: "sociology/course/getCourseDetail",
|
||||
goodsList: "sociology/product/getProductListForCourse",
|
||||
startStudyForMF: "sociology/course/startStudyForMF",
|
||||
},
|
||||
};
|
||||
},
|
||||
@@ -473,30 +474,65 @@ export default {
|
||||
//获取相关关联课程商品
|
||||
handleClickGetGoodsList(data) {
|
||||
// console.log("data at line 313:", data);
|
||||
this.$http
|
||||
.request({
|
||||
url: this.urlList.goodsList,
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.cateList[this.currentCateIndex].id,
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.productList.length > 0) {
|
||||
this.goodsList = res.productList;
|
||||
this.selectGoodsData = this.goodsList[0];
|
||||
this.$refs.commonSelectGoods.open();
|
||||
this.show = true;
|
||||
} else {
|
||||
this.$commonJS.showToast("此课程暂无购买方式");
|
||||
}
|
||||
|
||||
this.$forceUpdate();
|
||||
});
|
||||
if (this.cateList[this.currentCateIndex].type == 0) {
|
||||
//免费
|
||||
|
||||
this.$http
|
||||
.request({
|
||||
url: this.urlList.startStudyForMF,
|
||||
method: "POST",
|
||||
data: {
|
||||
catalogueId: this.cateList[this.currentCateIndex].id,
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
console.log("res at line 493:", res);
|
||||
if (res.code == 0) {
|
||||
this.getCourseDescriptionData();
|
||||
// this.$commonJS.showToast("");
|
||||
}
|
||||
// if (res.productList.length > 0) {
|
||||
// this.goodsList = res.productList;
|
||||
// this.selectGoodsData = this.goodsList[0];
|
||||
// this.$refs.commonSelectGoods.open();
|
||||
// this.show = true;
|
||||
// } else {
|
||||
// this.$commonJS.showToast("此课程暂无购买方式");
|
||||
// }
|
||||
|
||||
this.$forceUpdate();
|
||||
});
|
||||
} else {
|
||||
this.$http
|
||||
.request({
|
||||
url: this.urlList.goodsList,
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.cateList[this.currentCateIndex].id,
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.productList.length > 0) {
|
||||
this.goodsList = res.productList;
|
||||
this.selectGoodsData = this.goodsList[0];
|
||||
this.$refs.commonSelectGoods.open();
|
||||
this.show = true;
|
||||
} else {
|
||||
this.$commonJS.showToast("此课程暂无购买方式");
|
||||
}
|
||||
|
||||
this.$forceUpdate();
|
||||
});
|
||||
}
|
||||
},
|
||||
hancleModalConfirm() {
|
||||
var data = {
|
||||
@@ -660,15 +696,25 @@ export default {
|
||||
},
|
||||
|
||||
async handleselectCate(item, index) {
|
||||
console.log("item at line 662:", item);
|
||||
console.log("index at line 637:", index);
|
||||
// this.description=`您还未购买当前【${item.title}】课程,`
|
||||
var title1 = "";
|
||||
this.currentCateIndex = index;
|
||||
if (this.cateList.length > 1) {
|
||||
this.goBuyTitle = `您还未购买当前【${item.title}】课程`;
|
||||
} else if (this.cateList.length == 1) {
|
||||
this.goBuyTitle = `您还未购买当前课程`;
|
||||
if (item.type == 0) {
|
||||
if (this.cateList.length > 1) {
|
||||
this.goBuyTitle = `【${item.title}】课程为免费课程`;
|
||||
} else if (this.cateList.length == 1) {
|
||||
this.goBuyTitle = `为免费课程`;
|
||||
}
|
||||
} else {
|
||||
if (this.cateList.length > 1) {
|
||||
this.goBuyTitle = `您还未购买当前【${item.title}】课程`;
|
||||
} else if (this.cateList.length == 1) {
|
||||
this.goBuyTitle = `您还未购买当前课程`;
|
||||
}
|
||||
}
|
||||
|
||||
// this.currentCateIndex = index;
|
||||
this.dataList = [];
|
||||
var data = [];
|
||||
@@ -959,7 +1005,7 @@ export default {
|
||||
}
|
||||
|
||||
.headImage {
|
||||
height: 600rpx !important;
|
||||
// height: 600rpx !important;
|
||||
}
|
||||
|
||||
.commonDetailPage {
|
||||
|
||||
Reference in New Issue
Block a user