|
@@ -244,32 +244,10 @@
|
|
|
</view>
|
|
</view>
|
|
|
<!--讲义 -->
|
|
<!--讲义 -->
|
|
|
<view v-show="current == 1">
|
|
<view v-show="current == 1">
|
|
|
- <template v-if="courseHandoutsData.length">
|
|
|
|
|
- <view
|
|
|
|
|
- class="lecture-box"
|
|
|
|
|
- v-for="(item, index) in courseHandoutsData"
|
|
|
|
|
- :key="index"
|
|
|
|
|
- >
|
|
|
|
|
- <view class="title">
|
|
|
|
|
- {{ item.urlName }}
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="btn" @click="openDocument(item)">
|
|
|
|
|
- <image
|
|
|
|
|
- v-if="!downLoading"
|
|
|
|
|
- src="/pages3/static/imgs/downLoad.png"
|
|
|
|
|
- style="width: 40rpx; height: 40rpx"
|
|
|
|
|
- ></image>
|
|
|
|
|
- <image
|
|
|
|
|
- v-else
|
|
|
|
|
- src="/pages3/static/imgs/downLoading.png"
|
|
|
|
|
- class="loading_down"
|
|
|
|
|
- style="width: 40rpx; height: 40rpx"
|
|
|
|
|
- ></image>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </template>
|
|
|
|
|
- <view v-else style="text-align: center">暂无讲义</view>
|
|
|
|
|
- <handouts-box :list="fileList"></handouts-box>
|
|
|
|
|
|
|
+ <handouts-box
|
|
|
|
|
+ :handoutsId="goodsData.handoutsId"
|
|
|
|
|
+ v-if="goodsData.handoutsId"
|
|
|
|
|
+ ></handouts-box>
|
|
|
</view>
|
|
</view>
|
|
|
<!--笔记 -->
|
|
<!--笔记 -->
|
|
|
<view v-show="current == 2">
|
|
<view v-show="current == 2">
|
|
@@ -830,7 +808,6 @@ export default {
|
|
|
isAutoChange: false,
|
|
isAutoChange: false,
|
|
|
forceVideo: false,
|
|
forceVideo: false,
|
|
|
},
|
|
},
|
|
|
- courseHandoutsData: [],
|
|
|
|
|
liveDetail: {},
|
|
liveDetail: {},
|
|
|
showSet: false,
|
|
showSet: false,
|
|
|
startStatus: false,
|
|
startStatus: false,
|
|
@@ -897,7 +874,6 @@ export default {
|
|
|
clearTimer: null,
|
|
clearTimer: null,
|
|
|
livingItem: "",
|
|
livingItem: "",
|
|
|
option: null,
|
|
option: null,
|
|
|
- downLoading: false, //下载讲义加载
|
|
|
|
|
muluStyle: false, //显示和隐藏目录样式
|
|
muluStyle: false, //显示和隐藏目录样式
|
|
|
bottomHeight: 0,
|
|
bottomHeight: 0,
|
|
|
toggleCourseShow: false, // 切换课程弹窗
|
|
toggleCourseShow: false, // 切换课程弹窗
|
|
@@ -928,76 +904,6 @@ export default {
|
|
|
pauseTimer: null,
|
|
pauseTimer: null,
|
|
|
barTimer: null,
|
|
barTimer: null,
|
|
|
isReach: false,
|
|
isReach: false,
|
|
|
- fileList: [
|
|
|
|
|
- {
|
|
|
|
|
- fileId: 501,
|
|
|
|
|
- url: null,
|
|
|
|
|
- urlName: "1微信图片2微信图片2微信图片2微信图片2微信图片2微信图片2微信图片2",
|
|
|
|
|
- status: 1,
|
|
|
|
|
- handoutsId: 1557,
|
|
|
|
|
- sort: 1,
|
|
|
|
|
- type: 2,
|
|
|
|
|
- parentId: 0,
|
|
|
|
|
- children: [
|
|
|
|
|
- {
|
|
|
|
|
- fileId: 502,
|
|
|
|
|
- url: null,
|
|
|
|
|
- urlName: "2",
|
|
|
|
|
- status: 1,
|
|
|
|
|
- handoutsId: 1557,
|
|
|
|
|
- sort: 1,
|
|
|
|
|
- type: 2,
|
|
|
|
|
- parentId: 501,
|
|
|
|
|
- children: [
|
|
|
|
|
- {
|
|
|
|
|
- fileId: 504,
|
|
|
|
|
- url: "oss/images/certificate/20230411/1681201704754.jpg",
|
|
|
|
|
- urlName: "微信图片1微信图片2微信图片2微信图片2微信图片2微信图片2微信图片2微信图片2",
|
|
|
|
|
- status: 1,
|
|
|
|
|
- handoutsId: 1557,
|
|
|
|
|
- sort: 1,
|
|
|
|
|
- type: 1,
|
|
|
|
|
- parentId: 503,
|
|
|
|
|
- children: null,
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- fileId: 506,
|
|
|
|
|
- url: null,
|
|
|
|
|
- urlName: "3",
|
|
|
|
|
- status: 1,
|
|
|
|
|
- handoutsId: 1557,
|
|
|
|
|
- sort: 1,
|
|
|
|
|
- type: 2,
|
|
|
|
|
- parentId: 501,
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- fileId: 502,
|
|
|
|
|
- url: null,
|
|
|
|
|
- urlName: "zhiyuan(修改终版-02)",
|
|
|
|
|
- status: 1,
|
|
|
|
|
- handoutsId: 1557,
|
|
|
|
|
- sort: 1,
|
|
|
|
|
- type: 2,
|
|
|
|
|
- parentId: 0,
|
|
|
|
|
- children: [
|
|
|
|
|
- {
|
|
|
|
|
- fileId: 504,
|
|
|
|
|
- url: "oss/images/certificate/20230411/1681201704754.jpg",
|
|
|
|
|
- urlName: "微信图片1.jpg",
|
|
|
|
|
- status: 1,
|
|
|
|
|
- handoutsId: 1557,
|
|
|
|
|
- sort: 1,
|
|
|
|
|
- type: 1,
|
|
|
|
|
- parentId: 503,
|
|
|
|
|
- children: null,
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -1050,6 +956,10 @@ export default {
|
|
|
option.informId && this.clickOfficial(option.informId);
|
|
option.informId && this.clickOfficial(option.informId);
|
|
|
},
|
|
},
|
|
|
async onShow() {
|
|
async onShow() {
|
|
|
|
|
+ if(uni.getStorageSync('nofresh')){
|
|
|
|
|
+ uni.removeStorageSync('nofresh')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
if (this.option.skipPort) {
|
|
if (this.option.skipPort) {
|
|
|
await this.$method.skipLogin(this.option.skipPort);
|
|
await this.$method.skipLogin(this.option.skipPort);
|
|
|
}
|
|
}
|
|
@@ -1302,7 +1212,6 @@ export default {
|
|
|
this.studyRecordQueryLiveLast();
|
|
this.studyRecordQueryLiveLast();
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- this.current = uni.getStorageSync("current") || 0;
|
|
|
|
|
},
|
|
},
|
|
|
// 原来的mouted内容
|
|
// 原来的mouted内容
|
|
|
originMounted() {
|
|
originMounted() {
|
|
@@ -1423,7 +1332,6 @@ export default {
|
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
- uni.removeStorageSync("current");
|
|
|
|
|
},
|
|
},
|
|
|
changeCourses() {
|
|
changeCourses() {
|
|
|
this.toggleCourseShow = true;
|
|
this.toggleCourseShow = true;
|
|
@@ -2173,19 +2081,6 @@ export default {
|
|
|
itemWidth() {
|
|
itemWidth() {
|
|
|
return 100 / this.list.length + "%";
|
|
return 100 / this.list.length + "%";
|
|
|
},
|
|
},
|
|
|
- /**
|
|
|
|
|
- * 获取讲义权限
|
|
|
|
|
- */
|
|
|
|
|
- courseHandouts() {
|
|
|
|
|
- if (!this.goodsData.handoutsId) {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- this.$api
|
|
|
|
|
- .getHandoutList({ handoutsId: this.goodsData.handoutsId })
|
|
|
|
|
- .then((res) => {
|
|
|
|
|
- this.courseHandoutsData = res.data.rows;
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
findMenuNextSection(index) {
|
|
findMenuNextSection(index) {
|
|
|
for (let i = index + 1; i < this.reMenuList.length; i++) {
|
|
for (let i = index + 1; i < this.reMenuList.length; i++) {
|
|
|
let item = this.reMenuList[i];
|
|
let item = this.reMenuList[i];
|
|
@@ -3529,17 +3424,41 @@ export default {
|
|
|
this.navShow = false;
|
|
this.navShow = false;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ checkFinishRequiredCourse() {
|
|
|
|
|
+ return this.$api
|
|
|
|
|
+ .checkFinishRequiredCourse({
|
|
|
|
|
+ businessId: this.goodsData.businessId,
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ if (res.data.data == 0) {
|
|
|
|
|
+ // uni.showModal({
|
|
|
|
|
+ // showCancel: false,
|
|
|
|
|
+ // confirmText: "确定",
|
|
|
|
|
+ // content:
|
|
|
|
|
+ // "请先学完必修课程!",
|
|
|
|
|
+ // success: function (resultst) {
|
|
|
|
|
+ // uni.navigateBack();
|
|
|
|
|
+ // },
|
|
|
|
|
+ // });
|
|
|
|
|
+ // return Promise.reject()
|
|
|
|
|
+ }
|
|
|
|
|
+ return Promise.resolve();
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
getGoodsDetail() {
|
|
getGoodsDetail() {
|
|
|
let self = this;
|
|
let self = this;
|
|
|
// '/goods/'+ data,
|
|
// '/goods/'+ data,
|
|
|
- this.$api.goodsDetail(this.goodsId).then((res) => {
|
|
|
|
|
|
|
+ this.$api.goodsDetail(this.goodsId).then(async (res) => {
|
|
|
this.goodsData = res.data.data;
|
|
this.goodsData = res.data.data;
|
|
|
|
|
+ this.goodsData.categoryName != "必修" &&
|
|
|
|
|
+ (await this.checkFinishRequiredCourse());
|
|
|
if (self.goodsData.buyNote) {
|
|
if (self.goodsData.buyNote) {
|
|
|
this.baseHandoutTipList();
|
|
this.baseHandoutTipList();
|
|
|
}
|
|
}
|
|
|
self.gradeId = self.goodsData.gradeId;
|
|
self.gradeId = self.goodsData.gradeId;
|
|
|
|
|
+ self.erJianErZao = self.goodsData.erJianErZao;
|
|
|
|
|
+
|
|
|
this.courseBusiness(this.goodsData.businessId);
|
|
this.courseBusiness(this.goodsData.businessId);
|
|
|
- this.courseHandouts();
|
|
|
|
|
self.getMenuList();
|
|
self.getMenuList();
|
|
|
self.getReMenuList(); //获取重修目录
|
|
self.getReMenuList(); //获取重修目录
|
|
|
setTimeout(function () {
|
|
setTimeout(function () {
|
|
@@ -3569,7 +3488,6 @@ export default {
|
|
|
self.playbackRate = [0.5, 0.8, 1.0, 1.25, 1.5, 2.0];
|
|
self.playbackRate = [0.5, 0.8, 1.0, 1.25, 1.5, 2.0];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- self.erJianErZao = self.goodsData.erJianErZao;
|
|
|
|
|
if (self.goodsData.goodsPhotographConfig) {
|
|
if (self.goodsData.goodsPhotographConfig) {
|
|
|
self.goodsPhotographConfig = JSON.parse(
|
|
self.goodsPhotographConfig = JSON.parse(
|
|
|
self.goodsData.goodsPhotographConfig
|
|
self.goodsData.goodsPhotographConfig
|
|
@@ -3750,46 +3668,6 @@ export default {
|
|
|
change(index) {
|
|
change(index) {
|
|
|
this.current = index;
|
|
this.current = index;
|
|
|
},
|
|
},
|
|
|
- openDocument(item) {
|
|
|
|
|
- let url = this.$method.splitImgHost(item.url);
|
|
|
|
|
- // #ifdef H5
|
|
|
|
|
- window.location.href = url;
|
|
|
|
|
- // #endif
|
|
|
|
|
- // #ifdef MP-WEIXIN
|
|
|
|
|
- this.downLoading = true;
|
|
|
|
|
- uni.downloadFile({
|
|
|
|
|
- url: url,
|
|
|
|
|
- success: (res) => {
|
|
|
|
|
- var filePath = res.tempFilePath;
|
|
|
|
|
- // h5不支持
|
|
|
|
|
- uni.openDocument({
|
|
|
|
|
- filePath: filePath,
|
|
|
|
|
- fileType: "pdf",
|
|
|
|
|
- showMenu: item.canDownload == 1 ? true : false,
|
|
|
|
|
- success: (res) => {
|
|
|
|
|
- this.downLoading = false;
|
|
|
|
|
- uni.setStorageSync("current", this.current);
|
|
|
|
|
- },
|
|
|
|
|
- fail: (err) => {
|
|
|
|
|
- this.downLoading = false;
|
|
|
|
|
- uni.showToast({
|
|
|
|
|
- icon: "none",
|
|
|
|
|
- title: "文档地址错误",
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- fail: (err) => {
|
|
|
|
|
- this.downLoading = false;
|
|
|
|
|
- uni.showModal({
|
|
|
|
|
- title: "提示",
|
|
|
|
|
- content: "文档错误," + err.errMsg,
|
|
|
|
|
- showCancel: false,
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- });
|
|
|
|
|
- // #endif
|
|
|
|
|
- },
|
|
|
|
|
clickMulu() {
|
|
clickMulu() {
|
|
|
this.muluStyle = !this.muluStyle;
|
|
this.muluStyle = !this.muluStyle;
|
|
|
},
|
|
},
|
|
@@ -4109,47 +3987,6 @@ export default {
|
|
|
border-radius: 16rpx;
|
|
border-radius: 16rpx;
|
|
|
font-size: 24rpx;
|
|
font-size: 24rpx;
|
|
|
}
|
|
}
|
|
|
-.lecture-box {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- height: 80rpx;
|
|
|
|
|
- background: #ffffff;
|
|
|
|
|
- border-radius: 16rpx 16rpx 16rpx 16rpx;
|
|
|
|
|
- margin-bottom: 20rpx;
|
|
|
|
|
- .title {
|
|
|
|
|
- padding: 10rpx;
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- overflow: hidden;
|
|
|
|
|
- text-overflow: ellipsis;
|
|
|
|
|
- white-space: nowrap;
|
|
|
|
|
- color: #333;
|
|
|
|
|
- font-weight: bold;
|
|
|
|
|
- font-size: 32rpx;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .btn {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- justify-content: center;
|
|
|
|
|
- width: 80rpx;
|
|
|
|
|
- height: 80rpx;
|
|
|
|
|
- background: #ffffff;
|
|
|
|
|
- box-shadow: -4rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.1);
|
|
|
|
|
- border-radius: 16rpx 16rpx 16rpx 16rpx;
|
|
|
|
|
- }
|
|
|
|
|
- @keyframes rotation {
|
|
|
|
|
- from {
|
|
|
|
|
- -webkit-transform: rotate(0deg);
|
|
|
|
|
- }
|
|
|
|
|
- to {
|
|
|
|
|
- -webkit-transform: rotate(360deg);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .loading_down {
|
|
|
|
|
- transform: rotate(360deg);
|
|
|
|
|
- animation: rotation 3s linear infinite;
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
|
|
|
|
|
.lecture-content {
|
|
.lecture-content {
|
|
|
background: #fff;
|
|
background: #fff;
|