|
@@ -189,27 +189,46 @@
|
|
|
></div>
|
|
></div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="right-box">
|
|
|
|
|
- <div class="title">
|
|
|
|
|
- 推荐课程
|
|
|
|
|
- <a class="more" @click="go('/course-list')"
|
|
|
|
|
- >更多></a
|
|
|
|
|
- >
|
|
|
|
|
- </div>
|
|
|
|
|
- <ul class="list">
|
|
|
|
|
- <li
|
|
|
|
|
- class="course-item"
|
|
|
|
|
- v-for="(itemy, index) in compyRecommend(
|
|
|
|
|
- recommendList.goodsList
|
|
|
|
|
- )"
|
|
|
|
|
- :key="index"
|
|
|
|
|
- >
|
|
|
|
|
- <GoodsItem :item="itemy"></GoodsItem>
|
|
|
|
|
- </li>
|
|
|
|
|
- </ul>
|
|
|
|
|
- </div>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+ <template v-else-if="item.label == '讲义资料'">
|
|
|
|
|
+ <p
|
|
|
|
|
+ v-if="compyRecommend(handoutList).length === 0"
|
|
|
|
|
+ style="text-align: center;"
|
|
|
|
|
+ >
|
|
|
|
|
+ 暂未拥有其他讲义资料
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <ul class="list">
|
|
|
|
|
+ <li
|
|
|
|
|
+ class="course-item"
|
|
|
|
|
+ v-for="(itemy, index) in compyRecommend(handoutList)"
|
|
|
|
|
+ :key="index"
|
|
|
|
|
+ >
|
|
|
|
|
+ <HandoutItem :item="itemy"></HandoutItem>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else-if="item.label == '推荐课程'">
|
|
|
|
|
+ <p
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ compyRecommend(recommendList.goodsList).length === 0
|
|
|
|
|
+ "
|
|
|
|
|
+ style="text-align: center;"
|
|
|
|
|
+ >
|
|
|
|
|
+ 暂无推荐课程
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <ul class="list">
|
|
|
|
|
+ <li
|
|
|
|
|
+ class="course-item"
|
|
|
|
|
+ v-for="(itemy, index) in compyRecommend(
|
|
|
|
|
+ recommendList.goodsList
|
|
|
|
|
+ )"
|
|
|
|
|
+ :key="index"
|
|
|
|
|
+ >
|
|
|
|
|
+ <GoodsItem :item="itemy"></GoodsItem>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ </template>
|
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
</el-tabs>
|
|
|
</div>
|
|
</div>
|
|
@@ -499,7 +518,14 @@
|
|
|
: ''
|
|
: ''
|
|
|
"
|
|
"
|
|
|
>
|
|
>
|
|
|
- <div class="upload-box" :id="item.fieldKey === 'idcard_face_photo'?'idcard_face_photo':null">
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="upload-box"
|
|
|
|
|
+ :id="
|
|
|
|
|
+ item.fieldKey === 'idcard_face_photo'
|
|
|
|
|
+ ? 'idcard_face_photo'
|
|
|
|
|
+ : null
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
<div
|
|
<div
|
|
|
:style="
|
|
:style="
|
|
|
item.fieldKey === 'recent_photos'
|
|
item.fieldKey === 'recent_photos'
|
|
@@ -884,11 +910,12 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { Loading } from 'element-ui';
|
|
|
|
|
|
|
+import { Loading } from "element-ui";
|
|
|
import axios from "axios";
|
|
import axios from "axios";
|
|
|
import Footer from "@/components/footer/index";
|
|
import Footer from "@/components/footer/index";
|
|
|
import Header from "@/components/header/index";
|
|
import Header from "@/components/header/index";
|
|
|
import ToolBar from "@/components/toolbar/index";
|
|
import ToolBar from "@/components/toolbar/index";
|
|
|
|
|
+import HandoutItem from "@/components/handoutItem/index";
|
|
|
import GoodsItem from "@/components/goodsItem/index";
|
|
import GoodsItem from "@/components/goodsItem/index";
|
|
|
import * as imageConversion from "image-conversion";
|
|
import * as imageConversion from "image-conversion";
|
|
|
import { mapGetters, mapMutations, mapActions } from "vuex";
|
|
import { mapGetters, mapMutations, mapActions } from "vuex";
|
|
@@ -911,6 +938,7 @@ export default {
|
|
|
Footer,
|
|
Footer,
|
|
|
Header,
|
|
Header,
|
|
|
ToolBar,
|
|
ToolBar,
|
|
|
|
|
+ HandoutItem,
|
|
|
GoodsItem,
|
|
GoodsItem,
|
|
|
CourseTree,
|
|
CourseTree,
|
|
|
AnswerQuestions,
|
|
AnswerQuestions,
|
|
@@ -1257,7 +1285,8 @@ export default {
|
|
|
confirmStatus: false,
|
|
confirmStatus: false,
|
|
|
failToRegister: false, //报名是否不通过
|
|
failToRegister: false, //报名是否不通过
|
|
|
openPhotoStatus: 0,
|
|
openPhotoStatus: 0,
|
|
|
- readerResult: null
|
|
|
|
|
|
|
+ readerResult: null,
|
|
|
|
|
+ handoutList: []
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
@@ -1293,14 +1322,8 @@ export default {
|
|
|
compyRecommend: function() {
|
|
compyRecommend: function() {
|
|
|
return function(array) {
|
|
return function(array) {
|
|
|
let ary = [];
|
|
let ary = [];
|
|
|
- if (array) {
|
|
|
|
|
- for (let i = 0; i < array.length; i++) {
|
|
|
|
|
- if (i >= 5) {
|
|
|
|
|
- break;
|
|
|
|
|
- } else {
|
|
|
|
|
- ary.push(array[i]);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (array && array.length > 0) {
|
|
|
|
|
+ ary = array.filter((i, index) => index < 5);
|
|
|
}
|
|
}
|
|
|
return ary;
|
|
return ary;
|
|
|
};
|
|
};
|
|
@@ -1344,11 +1367,11 @@ export default {
|
|
|
return menuTab;
|
|
return menuTab;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- created(){
|
|
|
|
|
- Loading.service().close()
|
|
|
|
|
|
|
+ created() {
|
|
|
|
|
+ Loading.service().close();
|
|
|
},
|
|
},
|
|
|
async mounted() {
|
|
async mounted() {
|
|
|
- console.log(1)
|
|
|
|
|
|
|
+ console.log(1);
|
|
|
this.courseId = this.$route.query.courseId || "";
|
|
this.courseId = this.$route.query.courseId || "";
|
|
|
this.goodsId = this.$route.params.goodsId;
|
|
this.goodsId = this.$route.params.goodsId;
|
|
|
this.orderGoodsId = this.$route.query.orderGoodsId;
|
|
this.orderGoodsId = this.$route.query.orderGoodsId;
|
|
@@ -1357,20 +1380,22 @@ export default {
|
|
|
let isOther = this.$route.query.isOther || "";
|
|
let isOther = this.$route.query.isOther || "";
|
|
|
this.nowTime = Number(new Date().getTime() / 1000).toFixed(0);
|
|
this.nowTime = Number(new Date().getTime() / 1000).toFixed(0);
|
|
|
if (isOther) {
|
|
if (isOther) {
|
|
|
- this.isOtherFunc()
|
|
|
|
|
|
|
+ this.isOtherFunc();
|
|
|
}
|
|
}
|
|
|
if (this.$route.query.rebuild) {
|
|
if (this.$route.query.rebuild) {
|
|
|
this.courseTabIndex = "2";
|
|
this.courseTabIndex = "2";
|
|
|
}
|
|
}
|
|
|
await this.getGoodsDetail(); //商品详情
|
|
await this.getGoodsDetail(); //商品详情
|
|
|
- this.dictList();//获取字典
|
|
|
|
|
|
|
+ this.dictList(); //获取字典
|
|
|
|
|
|
|
|
|
|
+ this.getUserHandOutList();
|
|
|
|
|
+ this.getRecommend();
|
|
|
this.getbaseprofiletplists().then(async res => {
|
|
this.getbaseprofiletplists().then(async res => {
|
|
|
await this.courseCourseList();
|
|
await this.courseCourseList();
|
|
|
this.getRebuildCourse();
|
|
this.getRebuildCourse();
|
|
|
});
|
|
});
|
|
|
document.addEventListener("visibilitychange", this.pauseVideo);
|
|
document.addEventListener("visibilitychange", this.pauseVideo);
|
|
|
- console.log(3)
|
|
|
|
|
|
|
+ console.log(3);
|
|
|
},
|
|
},
|
|
|
beforeDestroy() {
|
|
beforeDestroy() {
|
|
|
clearTimeout(this.takeSetInt);
|
|
clearTimeout(this.takeSetInt);
|
|
@@ -1400,7 +1425,18 @@ export default {
|
|
|
methods: {
|
|
methods: {
|
|
|
...mapMutations(["getCartCount"]),
|
|
...mapMutations(["getCartCount"]),
|
|
|
...mapActions(["getUserInfo"]),
|
|
...mapActions(["getUserInfo"]),
|
|
|
- isOtherFunc(){
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ *
|
|
|
|
|
+ 获取用户讲义列表
|
|
|
|
|
+ */
|
|
|
|
|
+ getUserHandOutList() {
|
|
|
|
|
+ this.$request
|
|
|
|
|
+ .courseGoodsHandoutsList({ pageSize: 99, pageNum: 1 })
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ this.handoutList = res.rows;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ isOtherFunc() {
|
|
|
const confirmText = [
|
|
const confirmText = [
|
|
|
"您的学习账号已经开通,请按照步骤操作,进行学习。",
|
|
"您的学习账号已经开通,请按照步骤操作,进行学习。",
|
|
|
"1.点击【跳转学习网址】按钮",
|
|
"1.点击【跳转学习网址】按钮",
|
|
@@ -1736,7 +1772,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
async changePhotoListHeader2(params, fileList) {
|
|
async changePhotoListHeader2(params, fileList) {
|
|
|
- console.log('err1')
|
|
|
|
|
|
|
+ console.log("err1");
|
|
|
let file = await this.uploadRules(params);
|
|
let file = await this.uploadRules(params);
|
|
|
if (fileList.length == 1) {
|
|
if (fileList.length == 1) {
|
|
|
fileList.splice(0, 1);
|
|
fileList.splice(0, 1);
|
|
@@ -1748,23 +1784,23 @@ export default {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (this.infoForm.name) {
|
|
|
|
|
- if (this.infoForm.name != res.data.IdName) {
|
|
|
|
|
- this.$message.warning(
|
|
|
|
|
- "输入的姓名和身份证人像面照片姓名不匹配,请联系客服"
|
|
|
|
|
- );
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (this.infoForm.name) {
|
|
|
|
|
+ if (this.infoForm.name != res.data.IdName) {
|
|
|
|
|
+ this.$message.warning(
|
|
|
|
|
+ "输入的姓名和身份证人像面照片姓名不匹配,请联系客服"
|
|
|
|
|
+ );
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
- if (this.infoForm.idcard) {
|
|
|
|
|
- if (this.infoForm.idcard != res.data.IdNum) {
|
|
|
|
|
- this.$message.warning(
|
|
|
|
|
- "输入的身份证号和身份证人像面照片身份证号不匹配,请联系客服"
|
|
|
|
|
- );
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.infoForm.idcard) {
|
|
|
|
|
+ if (this.infoForm.idcard != res.data.IdNum) {
|
|
|
|
|
+ this.$message.warning(
|
|
|
|
|
+ "输入的身份证号和身份证人像面照片身份证号不匹配,请联系客服"
|
|
|
|
|
+ );
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
- this.$refs.idcard_face_photo[0].clearFiles();
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$refs.idcard_face_photo[0].clearFiles();
|
|
|
|
|
|
|
|
this.$set(this.infoForm, "idcard_face_photo", res.data.IdImgPath);
|
|
this.$set(this.infoForm, "idcard_face_photo", res.data.IdImgPath);
|
|
|
this.fileList2 = [
|
|
this.fileList2 = [
|
|
@@ -2140,30 +2176,29 @@ export default {
|
|
|
async uploadDatas(data) {
|
|
async uploadDatas(data) {
|
|
|
let self = this;
|
|
let self = this;
|
|
|
if (this.infoForm.recent_photos && this.infoForm.idcard_face_photo) {
|
|
if (this.infoForm.recent_photos && this.infoForm.idcard_face_photo) {
|
|
|
-
|
|
|
|
|
let resData = {};
|
|
let resData = {};
|
|
|
try {
|
|
try {
|
|
|
let base = await this.$tools.imageToBase64(
|
|
let base = await this.$tools.imageToBase64(
|
|
|
- this.$tools.splitImgHost(this.infoForm.idcard_face_photo)
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ this.$tools.splitImgHost(this.infoForm.idcard_face_photo)
|
|
|
|
|
+ );
|
|
|
resData = await this.$request.faceCertificationIDCardOCR({
|
|
resData = await this.$request.faceCertificationIDCardOCR({
|
|
|
cardSide: 1, //1人像 2 国徽
|
|
cardSide: 1, //1人像 2 国徽
|
|
|
cardImageBase64: base,
|
|
cardImageBase64: base,
|
|
|
gradeId: this.gradeId
|
|
gradeId: this.gradeId
|
|
|
});
|
|
});
|
|
|
} catch (err) {
|
|
} catch (err) {
|
|
|
- //生成唯一ID定位Start
|
|
|
|
|
- document.getElementById("idcard_face_photo").scrollIntoView(true);
|
|
|
|
|
- //生成唯一ID定位End
|
|
|
|
|
|
|
+ //生成唯一ID定位Start
|
|
|
|
|
+ document.getElementById("idcard_face_photo").scrollIntoView(true);
|
|
|
|
|
+ //生成唯一ID定位End
|
|
|
self.$message.warning("身份证人像面照片异常,请重新上传");
|
|
self.$message.warning("身份证人像面照片异常,请重新上传");
|
|
|
self.uploading = false;
|
|
self.uploading = false;
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (!resData.data) {
|
|
if (!resData.data) {
|
|
|
- //生成唯一ID定位Start
|
|
|
|
|
- document.getElementById("idcard_face_photo").scrollIntoView(true);
|
|
|
|
|
- //生成唯一ID定位End
|
|
|
|
|
|
|
+ //生成唯一ID定位Start
|
|
|
|
|
+ document.getElementById("idcard_face_photo").scrollIntoView(true);
|
|
|
|
|
+ //生成唯一ID定位End
|
|
|
this.$message.warning("身份证人像面照片异常,请重新上传");
|
|
this.$message.warning("身份证人像面照片异常,请重新上传");
|
|
|
this.uploading = false;
|
|
this.uploading = false;
|
|
|
return;
|
|
return;
|
|
@@ -2172,10 +2207,9 @@ export default {
|
|
|
this.veryIdName = resData.data.IdName;
|
|
this.veryIdName = resData.data.IdName;
|
|
|
if (this.infoForm.name) {
|
|
if (this.infoForm.name) {
|
|
|
if (this.infoForm.name != this.veryIdName) {
|
|
if (this.infoForm.name != this.veryIdName) {
|
|
|
-
|
|
|
|
|
- //生成唯一ID定位Start
|
|
|
|
|
- document.getElementById("idcard_face_photo").scrollIntoView(true);
|
|
|
|
|
- //生成唯一ID定位End
|
|
|
|
|
|
|
+ //生成唯一ID定位Start
|
|
|
|
|
+ document.getElementById("idcard_face_photo").scrollIntoView(true);
|
|
|
|
|
+ //生成唯一ID定位End
|
|
|
this.$message.warning(
|
|
this.$message.warning(
|
|
|
"输入的姓名和身份证人像面照片姓名不匹配,请联系客服"
|
|
"输入的姓名和身份证人像面照片姓名不匹配,请联系客服"
|
|
|
);
|
|
);
|
|
@@ -2185,9 +2219,9 @@ export default {
|
|
|
}
|
|
}
|
|
|
if (this.infoForm.idcard) {
|
|
if (this.infoForm.idcard) {
|
|
|
if (this.infoForm.idcard != this.veryIdCard) {
|
|
if (this.infoForm.idcard != this.veryIdCard) {
|
|
|
- //生成唯一ID定位Start
|
|
|
|
|
- document.getElementById("idcard_face_photo").scrollIntoView(true);
|
|
|
|
|
- //生成唯一ID定位End
|
|
|
|
|
|
|
+ //生成唯一ID定位Start
|
|
|
|
|
+ document.getElementById("idcard_face_photo").scrollIntoView(true);
|
|
|
|
|
+ //生成唯一ID定位End
|
|
|
this.$message.warning(
|
|
this.$message.warning(
|
|
|
"输入的身份证号和身份证人像面照片身份证号不匹配,请联系客服"
|
|
"输入的身份证号和身份证人像面照片身份证号不匹配,请联系客服"
|
|
|
);
|
|
);
|
|
@@ -3311,7 +3345,7 @@ export default {
|
|
|
let self = this;
|
|
let self = this;
|
|
|
this.$request.goodsDetail(this.goodsId).then(res => {
|
|
this.$request.goodsDetail(this.goodsId).then(res => {
|
|
|
self.goodsData = res.data;
|
|
self.goodsData = res.data;
|
|
|
- console.log("tanglian1",self.goodsData.erJianErZao);
|
|
|
|
|
|
|
+ console.log("tanglian1", self.goodsData.erJianErZao);
|
|
|
self.gradeId = self.goodsData.gradeId;
|
|
self.gradeId = self.goodsData.gradeId;
|
|
|
if (this.goodsData.categoryName) {
|
|
if (this.goodsData.categoryName) {
|
|
|
this.infoForm.apply_post = this.goodsData.categoryName;
|
|
this.infoForm.apply_post = this.goodsData.categoryName;
|
|
@@ -3325,16 +3359,14 @@ export default {
|
|
|
}
|
|
}
|
|
|
if (this.goodsData.buyNote) {
|
|
if (this.goodsData.buyNote) {
|
|
|
this.tabList = [
|
|
this.tabList = [
|
|
|
- { name: "1", label: "学员须知" }
|
|
|
|
|
- // { name: "2", label: "课程答疑" },
|
|
|
|
|
- // { name: "3", label: "笔记讲义" },
|
|
|
|
|
|
|
+ { name: "1", label: "讲义资料" },
|
|
|
|
|
+ { name: "2", label: "推荐课程" },
|
|
|
|
|
+ { name: "3", label: "学员须知" }
|
|
|
];
|
|
];
|
|
|
- console.log(res, "res111");
|
|
|
|
|
- this.getRecommend();
|
|
|
|
|
} else {
|
|
} else {
|
|
|
this.tabList = [
|
|
this.tabList = [
|
|
|
- // { name: "1", label: "课程答疑" },
|
|
|
|
|
- // { name: "2", label: "笔记讲义" },
|
|
|
|
|
|
|
+ { name: "1", label: "讲义资料" },
|
|
|
|
|
+ { name: "2", label: "推荐课程" }
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
|
this.courseBusiness();
|
|
this.courseBusiness();
|
|
@@ -3635,7 +3667,7 @@ export default {
|
|
|
this.player.on("s2j_onVideoPause", () => {
|
|
this.player.on("s2j_onVideoPause", () => {
|
|
|
clearInterval(this.postTimer);
|
|
clearInterval(this.postTimer);
|
|
|
if (this.sectionItem.learning != 1 && this.goodsData.erJianErZao) {
|
|
if (this.sectionItem.learning != 1 && this.goodsData.erJianErZao) {
|
|
|
- console.log(123)
|
|
|
|
|
|
|
+ console.log(123);
|
|
|
this.videoPause = setTimeout(() => {
|
|
this.videoPause = setTimeout(() => {
|
|
|
if (!this.takePhotoModal) {
|
|
if (!this.takePhotoModal) {
|
|
|
if (this.isFullScreen()) {
|
|
if (this.isFullScreen()) {
|
|
@@ -4520,7 +4552,7 @@ export default {
|
|
|
gradeId: this.gradeId
|
|
gradeId: this.gradeId
|
|
|
})
|
|
})
|
|
|
.then(async res => {
|
|
.then(async res => {
|
|
|
- if(res.data.length > 0){
|
|
|
|
|
|
|
+ if (res.data.length > 0) {
|
|
|
this.rebuildCourseList = [res.data[0]];
|
|
this.rebuildCourseList = [res.data[0]];
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -4550,7 +4582,7 @@ export default {
|
|
|
.courseCourseList({ goodsId: this.goodsId, gradeId: this.gradeId })
|
|
.courseCourseList({ goodsId: this.goodsId, gradeId: this.gradeId })
|
|
|
.then(async res => {
|
|
.then(async res => {
|
|
|
this.courseList = res.rows;
|
|
this.courseList = res.rows;
|
|
|
- console.error("res.rows",res.rows)
|
|
|
|
|
|
|
+ console.error("res.rows", res.rows);
|
|
|
if (!this.courseId) {
|
|
if (!this.courseId) {
|
|
|
this.courseId = this.courseList[0].courseId;
|
|
this.courseId = this.courseList[0].courseId;
|
|
|
}
|
|
}
|
|
@@ -4701,6 +4733,10 @@ export default {
|
|
|
|
|
|
|
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
|
|
+.course-item {
|
|
|
|
|
+ float: left;
|
|
|
|
|
+ margin-bottom: 6px;
|
|
|
|
|
+}
|
|
|
/deep/ .docx-wrapper {
|
|
/deep/ .docx-wrapper {
|
|
|
padding: 0px;
|
|
padding: 0px;
|
|
|
}
|
|
}
|