|
@@ -35,7 +35,7 @@
|
|
|
class="price"
|
|
|
v-if="
|
|
|
!goodsDetail.specTemplateId ||
|
|
|
- (!goodsDetail.maxPrice && !goodsDetail.minPrice)
|
|
|
+ (!goodsDetail.maxPrice && !goodsDetail.minPrice)
|
|
|
"
|
|
|
>
|
|
|
{{
|
|
@@ -75,15 +75,15 @@
|
|
|
<div class="goods-info__body">
|
|
|
<el-tabs v-model="activeName">
|
|
|
<el-tab-pane label="课程详情" name="1">
|
|
|
- <div class="detail ql-editor" style="white-space: pre-wrap" v-html="goodsDetail.pcDetailHtml"></div>
|
|
|
+ <div
|
|
|
+ class="detail ql-editor"
|
|
|
+ v-if="goodsDetail.pcDetailHtml"
|
|
|
+ style="white-space: pre-wrap"
|
|
|
+ v-html="goodsDetail.pcDetailHtml"
|
|
|
+ ></div>
|
|
|
+ <el-empty description="暂无课程详情" v-else></el-empty>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="章节目录" name="2">
|
|
|
- <div slot="label" style="position: relative">
|
|
|
- <span class="label">章节目录</span>
|
|
|
- <!-- <span v-if="listenConfigList.length" class="view-note"
|
|
|
- >试看</span
|
|
|
- > -->
|
|
|
- </div>
|
|
|
<div class="goods-menu clearfix">
|
|
|
<div class="left-box">
|
|
|
<div class="left-box__body">
|
|
@@ -99,7 +99,7 @@
|
|
|
<i
|
|
|
:class="{
|
|
|
'el-icon-caret-right': !course.showList,
|
|
|
- 'el-icon-caret-bottom': course.showList,
|
|
|
+ 'el-icon-caret-bottom': course.showList
|
|
|
}"
|
|
|
></i>
|
|
|
{{ course.courseName }}
|
|
@@ -118,7 +118,7 @@
|
|
|
<i
|
|
|
:class="{
|
|
|
'el-icon-caret-right': !item.showList,
|
|
|
- 'el-icon-caret-bottom': item.showList,
|
|
|
+ 'el-icon-caret-bottom': item.showList
|
|
|
}"
|
|
|
></i>
|
|
|
{{ item.name }}
|
|
@@ -130,9 +130,8 @@
|
|
|
>
|
|
|
<div
|
|
|
class="bank-chapter__item"
|
|
|
- v-for="(
|
|
|
- chapter, chapterIndex
|
|
|
- ) in item.list"
|
|
|
+ v-for="(chapter,
|
|
|
+ chapterIndex) in item.list"
|
|
|
:key="chapterIndex"
|
|
|
>
|
|
|
<div
|
|
@@ -141,10 +140,9 @@
|
|
|
>
|
|
|
<i
|
|
|
:class="{
|
|
|
- 'el-icon-caret-right':
|
|
|
- !chapter.showList,
|
|
|
+ 'el-icon-caret-right': !chapter.showList,
|
|
|
'el-icon-caret-bottom':
|
|
|
- chapter.showList,
|
|
|
+ chapter.showList
|
|
|
}"
|
|
|
></i
|
|
|
>{{ chapter.name }}
|
|
@@ -156,9 +154,8 @@
|
|
|
>
|
|
|
<div
|
|
|
class="bank-section__item"
|
|
|
- v-for="(
|
|
|
- section, sectionIndex
|
|
|
- ) in chapter.list"
|
|
|
+ v-for="(section,
|
|
|
+ sectionIndex) in chapter.list"
|
|
|
:key="sectionIndex"
|
|
|
>
|
|
|
<div
|
|
@@ -212,10 +209,9 @@
|
|
|
>
|
|
|
<i
|
|
|
:class="{
|
|
|
- 'el-icon-caret-right':
|
|
|
- !item.showList,
|
|
|
+ 'el-icon-caret-right': !item.showList,
|
|
|
'el-icon-caret-bottom':
|
|
|
- item.showList,
|
|
|
+ item.showList
|
|
|
}"
|
|
|
></i
|
|
|
>{{ item.name }}
|
|
@@ -227,9 +223,8 @@
|
|
|
>
|
|
|
<div
|
|
|
class="bank-section__item"
|
|
|
- v-for="(
|
|
|
- section, sectionIndex
|
|
|
- ) in item.list"
|
|
|
+ v-for="(section,
|
|
|
+ sectionIndex) in item.list"
|
|
|
:key="sectionIndex"
|
|
|
>
|
|
|
<div
|
|
@@ -315,11 +310,11 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="right-box">
|
|
|
- <div class="title" v-if="recommendList.goodsList">
|
|
|
+ <div class="title">
|
|
|
推荐直播
|
|
|
<a class="more" @click="comeMoreList">更多></a>
|
|
|
</div>
|
|
|
- <ul class="list" v-if="recommendList.goodsList">
|
|
|
+ <ul class="list" v-if="recommendList.goodsList && recommendList.goodsList.length > 0">
|
|
|
<li
|
|
|
class="course-item"
|
|
|
v-for="(itemy, index) in compyRecommend(
|
|
@@ -353,16 +348,21 @@
|
|
|
</div> -->
|
|
|
</li>
|
|
|
</ul>
|
|
|
+ <el-empty description="暂无推荐直播" v-else></el-empty>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="学员须知" name="3">
|
|
|
- <div class="ql-editor" style="white-space: pre-wrap"
|
|
|
+ <div
|
|
|
+ class="ql-editor"
|
|
|
+ style="white-space: pre-wrap"
|
|
|
+ v-if="goodsDetail.buyNote"
|
|
|
v-html="
|
|
|
goodsDetail.buyNote &&
|
|
|
- goodsDetail.buyNote.replace(/\n|\r\n/g, '<br>')
|
|
|
+ goodsDetail.buyNote.replace(/\n|\r\n/g, '<br>')
|
|
|
"
|
|
|
></div>
|
|
|
+ <el-empty description="暂无学员须知" v-else></el-empty>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane
|
|
|
label="赠送题卷"
|
|
@@ -418,8 +418,8 @@
|
|
|
class="section__footer"
|
|
|
v-if="
|
|
|
recommendList.goodsList &&
|
|
|
- recommendList.goodsList.length &&
|
|
|
- (activeName == 1 || activeName == 3)
|
|
|
+ recommendList.goodsList.length &&
|
|
|
+ (activeName == 1 || activeName == 3)
|
|
|
"
|
|
|
>
|
|
|
<div class="recommend">
|
|
@@ -577,14 +577,14 @@ export default {
|
|
|
Header,
|
|
|
ToolBar,
|
|
|
GoodsItem,
|
|
|
- IndexSkuDialog,
|
|
|
+ IndexSkuDialog
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
questionList: [],
|
|
|
goodsExamConfig: [],
|
|
|
goodsDetail: {
|
|
|
- standPrice: 0,
|
|
|
+ standPrice: 0
|
|
|
},
|
|
|
courseList: [],
|
|
|
goodsId: "",
|
|
@@ -596,7 +596,7 @@ export default {
|
|
|
questionModalData: {
|
|
|
activeName: "0",
|
|
|
num: 0, //试做题数
|
|
|
- current: 0,
|
|
|
+ current: 0
|
|
|
},
|
|
|
judge: ["正确", "错误"],
|
|
|
ast: [
|
|
@@ -625,7 +625,7 @@ export default {
|
|
|
"W",
|
|
|
"X",
|
|
|
"Y",
|
|
|
- "Z",
|
|
|
+ "Z"
|
|
|
],
|
|
|
goodsAuditionConfigIdList: [], //试听列表
|
|
|
listenConfigList: [],
|
|
@@ -645,7 +645,7 @@ export default {
|
|
|
educationId: "",
|
|
|
props: {
|
|
|
lazy: true,
|
|
|
- lazyLoad: this.lazyLoad,
|
|
|
+ lazyLoad: this.lazyLoad
|
|
|
},
|
|
|
applyAreas: [],
|
|
|
provinceList: [],
|
|
@@ -656,7 +656,7 @@ export default {
|
|
|
menuIndex: [], //需要展开的章节索引值
|
|
|
freeMenuList: [], //赠送题卷列表
|
|
|
skuModal: false,
|
|
|
- isCarOrBuy: 1, // 1加入购物车 2立即购买
|
|
|
+ isCarOrBuy: 1 // 1加入购物车 2立即购买
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -670,8 +670,8 @@ export default {
|
|
|
document.addEventListener("visibilitychange", this.pauseVideo);
|
|
|
},
|
|
|
computed: {
|
|
|
- compyRecommend: function () {
|
|
|
- return function (array) {
|
|
|
+ compyRecommend: function() {
|
|
|
+ return function(array) {
|
|
|
let ary = [];
|
|
|
if (array) {
|
|
|
for (let i = 0; i < array.length; i++) {
|
|
@@ -684,7 +684,7 @@ export default {
|
|
|
}
|
|
|
return ary;
|
|
|
};
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations(["setCurrentRouter", "getCartCount"]),
|
|
@@ -696,7 +696,7 @@ export default {
|
|
|
appCommonGoodsCourseModuleFreeExamList() {
|
|
|
this.$request
|
|
|
.appCommonGoodsCourseModuleFreeExamList(this.goodsId)
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
if (res.data.length) {
|
|
|
this.freeMenuList = res.data;
|
|
|
}
|
|
@@ -704,7 +704,7 @@ export default {
|
|
|
},
|
|
|
toGoodsDetail(item) {
|
|
|
this.$router.push({
|
|
|
- path: "/course-detail/" + item.goodsId,
|
|
|
+ path: "/course-detail/" + item.goodsId
|
|
|
});
|
|
|
location.reload();
|
|
|
},
|
|
@@ -717,8 +717,8 @@ export default {
|
|
|
query: {
|
|
|
educationId: this.goodsDetail.educationTypeId,
|
|
|
projectId: this.goodsDetail.projectId,
|
|
|
- businessId: this.goodsDetail.businessId,
|
|
|
- },
|
|
|
+ businessId: this.goodsDetail.businessId
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
/**
|
|
@@ -739,9 +739,9 @@ export default {
|
|
|
this.$request
|
|
|
.appCommonActivityRecommendList({
|
|
|
businessId: this.goodsDetail.businessId,
|
|
|
- type: 6,
|
|
|
+ type: 6
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
if (res.rows.length) {
|
|
|
this.recommendList = res.rows[0];
|
|
|
}
|
|
@@ -751,7 +751,7 @@ export default {
|
|
|
* 获取模块列表
|
|
|
*/
|
|
|
getMenuList(item) {
|
|
|
- this.$request.menuList({ courseId: item.courseId }).then((res) => {
|
|
|
+ this.$request.menuList({ courseId: item.courseId }).then(res => {
|
|
|
for (let i = 0; i < res.rows.length; i++) {
|
|
|
let item = res.rows[i];
|
|
|
item.showList = false;
|
|
@@ -803,7 +803,7 @@ export default {
|
|
|
checkboxSubmit(question, questionIndex) {
|
|
|
if (this.questionList[questionIndex].ques) return;
|
|
|
let arr = [];
|
|
|
- this.questionList[questionIndex].jsonStr.forEach((item) => {
|
|
|
+ this.questionList[questionIndex].jsonStr.forEach(item => {
|
|
|
if (item.checked) {
|
|
|
arr.push(item.optionsId);
|
|
|
}
|
|
@@ -811,7 +811,7 @@ export default {
|
|
|
if (!arr.length) {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
- message: "请选择答案",
|
|
|
+ message: "请选择答案"
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -825,7 +825,7 @@ export default {
|
|
|
if (this.questionList[questionIndex].ques[ansIndex]) return;
|
|
|
let arr = [];
|
|
|
this.questionList[questionIndex].jsonStr[ansIndex].optionsList.forEach(
|
|
|
- (item) => {
|
|
|
+ item => {
|
|
|
if (item.checked) {
|
|
|
arr.push(item.optionsId);
|
|
|
}
|
|
@@ -835,7 +835,7 @@ export default {
|
|
|
if (!arr.length) {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
- message: "请选择答案",
|
|
|
+ message: "请选择答案"
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -872,7 +872,10 @@ export default {
|
|
|
this.$message.warn("图片不得大于2000kb");
|
|
|
return;
|
|
|
}
|
|
|
- var type = e.target.value.toLowerCase().split(".").splice(-1);
|
|
|
+ var type = e.target.value
|
|
|
+ .toLowerCase()
|
|
|
+ .split(".")
|
|
|
+ .splice(-1);
|
|
|
if (
|
|
|
type[0] != "jpg" &&
|
|
|
type[0] != "png" &&
|
|
@@ -884,7 +887,7 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- this.$upload.upload(file, 0).then((res) => {
|
|
|
+ this.$upload.upload(file, 0).then(res => {
|
|
|
question.ansText.imageList.push(res);
|
|
|
});
|
|
|
},
|
|
@@ -898,7 +901,10 @@ export default {
|
|
|
this.$message.warn("图片不得大于2000kb");
|
|
|
return;
|
|
|
}
|
|
|
- var type = e.target.value.toLowerCase().split(".").splice(-1);
|
|
|
+ var type = e.target.value
|
|
|
+ .toLowerCase()
|
|
|
+ .split(".")
|
|
|
+ .splice(-1);
|
|
|
if (
|
|
|
type[0] != "jpg" &&
|
|
|
type[0] != "png" &&
|
|
@@ -910,7 +916,7 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- this.$upload.upload(file, 0).then((res) => {
|
|
|
+ this.$upload.upload(file, 0).then(res => {
|
|
|
this.questionList[questionIndex].jsonStr[
|
|
|
jsonIndex
|
|
|
].ansText.imageList.push(res);
|
|
@@ -967,7 +973,7 @@ export default {
|
|
|
if (!question.ansText.text && !question.ansText.imageList.length) {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
- message: "请输入内容或上传图片",
|
|
|
+ message: "请输入内容或上传图片"
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -985,7 +991,7 @@ export default {
|
|
|
) {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
- message: "请输入内容或上传图片",
|
|
|
+ message: "请输入内容或上传图片"
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -995,8 +1001,7 @@ export default {
|
|
|
this.questionList[questionIndex].jsonStr[jsonIndex].ansText
|
|
|
.imageList || [],
|
|
|
text:
|
|
|
- this.questionList[questionIndex].jsonStr[jsonIndex].ansText.text ||
|
|
|
- "",
|
|
|
+ this.questionList[questionIndex].jsonStr[jsonIndex].ansText.text || ""
|
|
|
});
|
|
|
},
|
|
|
/**
|
|
@@ -1029,13 +1034,13 @@ export default {
|
|
|
width: 800,
|
|
|
height: 450,
|
|
|
uid: this.uidzb,
|
|
|
- vid: this.vidzb,
|
|
|
+ vid: this.vidzb
|
|
|
});
|
|
|
},
|
|
|
loadPlayer() {
|
|
|
var self = this;
|
|
|
const polyvPlayer = window.polyvPlayer;
|
|
|
- let auditionMinute = this.listenConfigList.find((item) => {
|
|
|
+ let auditionMinute = this.listenConfigList.find(item => {
|
|
|
if (
|
|
|
item.sectionId ==
|
|
|
(this.sectionItem.sectionId || this.sectionItem.menuId) &&
|
|
@@ -1045,7 +1050,7 @@ export default {
|
|
|
}
|
|
|
}).auditionMinute;
|
|
|
|
|
|
- self.$request.obtainpolyvvideosign(self.vid).then((res) => {
|
|
|
+ self.$request.obtainpolyvvideosign(self.vid).then(res => {
|
|
|
self.player = polyvPlayer({
|
|
|
wrap: "#player",
|
|
|
width: 800,
|
|
@@ -1056,11 +1061,11 @@ export default {
|
|
|
teaser_show: 0,
|
|
|
ts: res.data.ts,
|
|
|
sign: res.data.sign,
|
|
|
- playsafe: function (vid, next) {
|
|
|
- self.$request.obtainpolyvvideopcsign(vid).then((res) => {
|
|
|
+ playsafe: function(vid, next) {
|
|
|
+ self.$request.obtainpolyvvideopcsign(vid).then(res => {
|
|
|
next(res.data);
|
|
|
});
|
|
|
- },
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
self.player.on("s2j_onPlayOver", () => {
|
|
@@ -1069,8 +1074,8 @@ export default {
|
|
|
showCancelButton: false,
|
|
|
closeOnPressEscape: false,
|
|
|
distinguishCancelAndClose: false,
|
|
|
- showClose: false,
|
|
|
- }).then((res) => {
|
|
|
+ showClose: false
|
|
|
+ }).then(res => {
|
|
|
this.videoModalShow = false;
|
|
|
});
|
|
|
});
|
|
@@ -1121,7 +1126,7 @@ export default {
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
- message: "试做题目已经结束~",
|
|
|
+ message: "试做题目已经结束~"
|
|
|
});
|
|
|
}
|
|
|
},
|
|
@@ -1129,7 +1134,7 @@ export default {
|
|
|
if (this.questionModalData.current >= this.questionModalData.num - 1) {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
- message: "试做题目已经结束~",
|
|
|
+ message: "试做题目已经结束~"
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
@@ -1258,7 +1263,7 @@ export default {
|
|
|
*/
|
|
|
questionOverNum(hasSpecail) {
|
|
|
let count = 0;
|
|
|
- this.questionList.forEach((item) => {
|
|
|
+ this.questionList.forEach(item => {
|
|
|
if (item.type == 1 || item.type == 2 || item.type == 3) {
|
|
|
if (item.ques) {
|
|
|
count++;
|
|
@@ -1317,7 +1322,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getChapterList(Module) {
|
|
|
- this.$request.chapterList(Module.id).then((res) => {
|
|
|
+ this.$request.chapterList(Module.id).then(res => {
|
|
|
for (let i = 0; i < res.data.length; i++) {
|
|
|
let item = res.data[i];
|
|
|
item.id = item.chapterId;
|
|
@@ -1349,11 +1354,11 @@ export default {
|
|
|
console.log(node);
|
|
|
if (level == 0) {
|
|
|
} else if (level == 1) {
|
|
|
- this.$request.getCityList({ parentId: node.value }).then((res) => {
|
|
|
- const nodes = res.rows.map((item) => ({
|
|
|
+ this.$request.getCityList({ parentId: node.value }).then(res => {
|
|
|
+ const nodes = res.rows.map(item => ({
|
|
|
value: item.areaId,
|
|
|
label: `${item.areaName}`,
|
|
|
- leaf: level >= 1,
|
|
|
+ leaf: level >= 1
|
|
|
}));
|
|
|
resolve(nodes);
|
|
|
});
|
|
@@ -1361,7 +1366,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
getSectionList(chapter) {
|
|
|
- this.$request.sectionList(chapter.id).then((res) => {
|
|
|
+ this.$request.sectionList(chapter.id).then(res => {
|
|
|
for (let i = 0; i < res.data.length; i++) {
|
|
|
let item = res.data[i];
|
|
|
item.id = item.sectionId;
|
|
@@ -1384,24 +1389,24 @@ export default {
|
|
|
//选择班级
|
|
|
// 之前的传参:goodsId:goodsDetail.goodsId
|
|
|
if (!this.gradeList.length) {
|
|
|
- this.$request.goodsGradeList({ goodsId: goodsId }).then((res) => {
|
|
|
+ this.$request.goodsGradeList({ goodsId: goodsId }).then(res => {
|
|
|
this.gradeList = res.rows;
|
|
|
if (this.gradeList.length == 0) {
|
|
|
let item = {
|
|
|
className: "系统分班",
|
|
|
- gradeId: 0,
|
|
|
+ gradeId: 0
|
|
|
};
|
|
|
this.gradeList.push(item);
|
|
|
} else {
|
|
|
let isGradeFull = this.gradeList.every(
|
|
|
- (item) =>
|
|
|
+ item =>
|
|
|
item.studentNum > 0 && item.studentNum == item.studentUpper
|
|
|
);
|
|
|
//所有班级都满了
|
|
|
if (isGradeFull) {
|
|
|
let item = {
|
|
|
className: "系统分班",
|
|
|
- gradeId: 0,
|
|
|
+ gradeId: 0
|
|
|
};
|
|
|
this.gradeList.unshift(item);
|
|
|
}
|
|
@@ -1414,7 +1419,7 @@ export default {
|
|
|
//选择考期
|
|
|
this.$request
|
|
|
.getExamineList({ projectId: goodsDetail.projectId })
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
this.examineList = res.rows;
|
|
|
});
|
|
|
}
|
|
@@ -1423,11 +1428,11 @@ export default {
|
|
|
* 获取所有省份
|
|
|
*/
|
|
|
getProvinceList() {
|
|
|
- this.$request.getProvinceList().then((res) => {
|
|
|
- this.provinceList = res.rows.map((item) => ({
|
|
|
+ this.$request.getProvinceList().then(res => {
|
|
|
+ this.provinceList = res.rows.map(item => ({
|
|
|
value: item.areaId,
|
|
|
label: `${item.areaName}`,
|
|
|
- leaf: false,
|
|
|
+ leaf: false
|
|
|
}));
|
|
|
});
|
|
|
},
|
|
@@ -1438,7 +1443,7 @@ export default {
|
|
|
areaName: node.parent.label,
|
|
|
areaId: node.parent.value,
|
|
|
cityId: node.value,
|
|
|
- cityName: node.label,
|
|
|
+ cityName: node.label
|
|
|
};
|
|
|
},
|
|
|
buyNow() {
|
|
@@ -1455,22 +1460,22 @@ export default {
|
|
|
} else {
|
|
|
this.setCurrentRouter(this.$route);
|
|
|
this.$router.push({
|
|
|
- path: "/login",
|
|
|
+ path: "/login"
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
},
|
|
|
toPayment(goodsDetail) {
|
|
|
let selectGoodsList = JSON.parse(JSON.stringify([goodsDetail]));
|
|
|
- selectGoodsList.forEach((item) => {
|
|
|
+ selectGoodsList.forEach(item => {
|
|
|
if (item.goodsType == 1) {
|
|
|
if (item.templateType == "class") {
|
|
|
let goodsInputData = {
|
|
|
type: "class",
|
|
|
gradeId: this.gradeId,
|
|
|
gradeJson: JSON.stringify(
|
|
|
- this.gradeList.find((grade) => grade.gradeId == this.gradeId)
|
|
|
- ),
|
|
|
+ this.gradeList.find(grade => grade.gradeId == this.gradeId)
|
|
|
+ )
|
|
|
};
|
|
|
item.goodsInputData = goodsInputData;
|
|
|
}
|
|
@@ -1480,9 +1485,9 @@ export default {
|
|
|
applyAreasJson: JSON.stringify(this.applyAreas),
|
|
|
examDateJson: JSON.stringify(
|
|
|
this.examineList.find(
|
|
|
- (exam) => exam.educationId == this.educationId
|
|
|
+ exam => exam.educationId == this.educationId
|
|
|
)
|
|
|
- ),
|
|
|
+ )
|
|
|
};
|
|
|
item.goodsInputData = goodsInputData;
|
|
|
}
|
|
@@ -1492,7 +1497,7 @@ export default {
|
|
|
localStorage.setItem("checkGoodsList", JSON.stringify(selectGoodsList));
|
|
|
|
|
|
this.$router.push({
|
|
|
- path: "/payment",
|
|
|
+ path: "/payment"
|
|
|
});
|
|
|
},
|
|
|
pay() {
|
|
@@ -1503,7 +1508,7 @@ export default {
|
|
|
if (!this.gradeId && this.gradeId !== 0) {
|
|
|
this.$message({
|
|
|
message: "请选择班级",
|
|
|
- type: "warning",
|
|
|
+ type: "warning"
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -1524,22 +1529,22 @@ export default {
|
|
|
if (!this.educationId) {
|
|
|
this.$message({
|
|
|
message: "请选择考期",
|
|
|
- type: "warning",
|
|
|
+ type: "warning"
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
let selectGoodsList = JSON.parse(JSON.stringify([this.goodsDetail]));
|
|
|
- selectGoodsList.forEach((item) => {
|
|
|
+ selectGoodsList.forEach(item => {
|
|
|
if (item.goodsType == 1) {
|
|
|
if (item.templateType == "class") {
|
|
|
let goodsInputData = {
|
|
|
type: "class",
|
|
|
gradeId: this.gradeId,
|
|
|
gradeJson: JSON.stringify(
|
|
|
- this.gradeList.find((grade) => grade.gradeId == this.gradeId)
|
|
|
- ),
|
|
|
+ this.gradeList.find(grade => grade.gradeId == this.gradeId)
|
|
|
+ )
|
|
|
};
|
|
|
item.goodsInputData = goodsInputData;
|
|
|
}
|
|
@@ -1549,9 +1554,9 @@ export default {
|
|
|
applyAreasJson: JSON.stringify(this.applyAreas),
|
|
|
examDateJson: JSON.stringify(
|
|
|
this.examineList.find(
|
|
|
- (exam) => exam.educationId == this.educationId
|
|
|
+ exam => exam.educationId == this.educationId
|
|
|
)
|
|
|
- ),
|
|
|
+ )
|
|
|
};
|
|
|
item.goodsInputData = goodsInputData;
|
|
|
}
|
|
@@ -1561,14 +1566,14 @@ export default {
|
|
|
localStorage.setItem("checkGoodsList", JSON.stringify(selectGoodsList));
|
|
|
|
|
|
this.$router.push({
|
|
|
- path: "/payment",
|
|
|
+ path: "/payment"
|
|
|
});
|
|
|
},
|
|
|
addCart(status, goodsId) {
|
|
|
if (!this.$tools.isLogin()) {
|
|
|
this.setCurrentRouter(this.$route);
|
|
|
this.$router.push({
|
|
|
- path: "/login",
|
|
|
+ path: "/login"
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -1587,18 +1592,18 @@ export default {
|
|
|
}
|
|
|
this.$request
|
|
|
.addCart({ goodsIds })
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
this.getCartCount();
|
|
|
this.$message({
|
|
|
message: "加入购物车成功",
|
|
|
- type: "success",
|
|
|
+ type: "success"
|
|
|
});
|
|
|
})
|
|
|
- .catch((err) => {
|
|
|
+ .catch(err => {
|
|
|
if (err.code == 500) {
|
|
|
this.$message({
|
|
|
message: err.msg,
|
|
|
- type: "warning",
|
|
|
+ type: "warning"
|
|
|
});
|
|
|
}
|
|
|
});
|
|
@@ -1607,9 +1612,9 @@ export default {
|
|
|
this.$axios({
|
|
|
url: `/app/common/spec/${this.goodsDetail.specTemplateId}`,
|
|
|
method: "get",
|
|
|
- noToken: true,
|
|
|
+ noToken: true
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
if (res.data) {
|
|
|
this.skuModal = true;
|
|
|
} else {
|
|
@@ -1626,7 +1631,7 @@ export default {
|
|
|
* 获取商品详情
|
|
|
*/
|
|
|
getGoodsDetail() {
|
|
|
- this.$request.commonGoodsDetail(this.goodsId).then((res) => {
|
|
|
+ this.$request.commonGoodsDetail(this.goodsId).then(res => {
|
|
|
if (res.data.pcDetailHtml) {
|
|
|
res.data.pcDetailHtml =
|
|
|
res.data.pcDetailHtml &&
|
|
@@ -1658,14 +1663,14 @@ export default {
|
|
|
* 是否是试做
|
|
|
*/
|
|
|
isTest(id) {
|
|
|
- return this.goodsExamConfig.find((item) => item.examId == id);
|
|
|
+ return this.goodsExamConfig.find(item => item.examId == id);
|
|
|
},
|
|
|
/**
|
|
|
* 获取课程章节列表
|
|
|
*/
|
|
|
goodsCourseList() {
|
|
|
- this.$request.goodsCourseList(this.goodsId).then(async (res) => {
|
|
|
- res.rows.forEach((item) => {
|
|
|
+ this.$request.goodsCourseList(this.goodsId).then(async res => {
|
|
|
+ res.rows.forEach(item => {
|
|
|
item.showList = false;
|
|
|
item.list = [];
|
|
|
});
|
|
@@ -1688,8 +1693,8 @@ export default {
|
|
|
},
|
|
|
|
|
|
getCourseMenus(item) {
|
|
|
- return new Promise((resolve) => {
|
|
|
- this.$request.menuList({ courseId: item.courseId }).then((res) => {
|
|
|
+ return new Promise(resolve => {
|
|
|
+ this.$request.menuList({ courseId: item.courseId }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
for (let i = 0; i < res.rows.length; i++) {
|
|
|
if (res.rows[i].type == 3) {
|
|
@@ -1704,7 +1709,7 @@ export default {
|
|
|
collect() {
|
|
|
this.$message({
|
|
|
message: "试做题目,不支持收藏~",
|
|
|
- type: "warning",
|
|
|
+ type: "warning"
|
|
|
});
|
|
|
return;
|
|
|
},
|
|
@@ -1715,17 +1720,17 @@ export default {
|
|
|
closeOnClickModal: false,
|
|
|
closeOnPressEscape: false,
|
|
|
distinguishCancelAndClose: false,
|
|
|
- showClose: false,
|
|
|
+ showClose: false
|
|
|
})
|
|
|
- .then((_) => {})
|
|
|
- .catch((_) => {
|
|
|
+ .then(_ => {})
|
|
|
+ .catch(_ => {
|
|
|
this.questionModalShow = false;
|
|
|
});
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
document.removeEventListener("visibilitychange", this.pauseVideo);
|
|
|
- },
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|
|
@@ -1801,7 +1806,7 @@ export default {
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
}
|
|
|
- i{
|
|
|
+ i {
|
|
|
font-size: 32px;
|
|
|
}
|
|
|
}
|
|
@@ -1876,7 +1881,7 @@ export default {
|
|
|
|
|
|
&__body {
|
|
|
.course-list-item {
|
|
|
- margin-top: 24px;
|
|
|
+ margin-bottom: 20px;
|
|
|
padding: 16px;
|
|
|
background: #f5f7fa;
|
|
|
border-radius: 10px;
|