|
@@ -82,13 +82,13 @@
|
|
|
</div>
|
|
|
|
|
|
<div v-if="!readonly">
|
|
|
- <span class="price">
|
|
|
+ <span v-show="CourseData.price !== 0" class="price">
|
|
|
¥
|
|
|
<span class="price_1" v-text="changePrice('1', CourseData.price)"></span>
|
|
|
<span class="price_2" v-text="changePrice('2', CourseData.price)"></span>
|
|
|
</span>
|
|
|
<button class="get" @click="getPurchase">
|
|
|
- {{ is_buy ? $t('Key390') : $t('Key391') }}
|
|
|
+ {{ is_buy || is_free_license || CourseData.price === 0 ? $t('Key390') : $t('Key391') }}
|
|
|
</button>
|
|
|
<span class="collection" @click="addOrDeleteMyCollection">
|
|
|
<svg-icon :icon-class="collection ? 'collection-solid' : 'collection'" />
|
|
@@ -314,7 +314,7 @@ export default {
|
|
|
return {
|
|
|
goods_id: query.goods_id,
|
|
|
goods_type: Number(query.goods_type),
|
|
|
- readonly: 'readonly' in query ? query.readonly : false,
|
|
|
+ readonly: 'readonly' in query ? query.readonly === 'true' : false,
|
|
|
// 调用模块
|
|
|
invok_module: query.invok_module,
|
|
|
collection: false,
|
|
@@ -324,6 +324,7 @@ export default {
|
|
|
auditShow: false,
|
|
|
loading: false,
|
|
|
is_buy: false,
|
|
|
+ is_free_license: false, // 是否机构免费授权
|
|
|
CourseData: null,
|
|
|
isData: false,
|
|
|
courseContentList: [
|
|
@@ -342,9 +343,12 @@ export default {
|
|
|
created() {
|
|
|
// 获取课程详情
|
|
|
this.loading = true;
|
|
|
- CheckMyGoodsBuyStatus({ goods_type: this.goods_type, goods_id: this.goods_id }).then(({ is_buy }) => {
|
|
|
- this.is_buy = is_buy === 'true';
|
|
|
- });
|
|
|
+ CheckMyGoodsBuyStatus({ goods_type: this.goods_type, goods_id: this.goods_id }).then(
|
|
|
+ ({ is_buy, is_free_license }) => {
|
|
|
+ this.is_buy = is_buy === 'true';
|
|
|
+ this.is_free_license = is_free_license === 'true';
|
|
|
+ }
|
|
|
+ );
|
|
|
GetCourseInfoBox({ id: this.goods_id })
|
|
|
.then((res) => {
|
|
|
this.CourseData = res;
|
|
@@ -427,7 +431,7 @@ export default {
|
|
|
// 购买 需要先加入课程 审核 审核通过之后才能购买课程
|
|
|
getPurchase() {
|
|
|
// 购买通道关闭
|
|
|
- if (this.is_buy) {
|
|
|
+ if (this.is_buy || this.is_free_license || this.CourseData.price === 0) {
|
|
|
return this.$router.push('/');
|
|
|
}
|
|
|
if (!this.backTime) {
|