This commit is contained in:
2024-07-24 14:24:20 +08:00
parent 4387fba497
commit bd8ff7071b
46 changed files with 2297 additions and 1446 deletions

View File

@@ -13,36 +13,16 @@
>
<view :style="`background:#000`">
<common-video
:videoTitle="curriculumData.title"
v-if="isfresh"
@changeScreen="changeScreen"
@changeScreenLoading="changeScreenLoading"
ref="commonVideo"
:currentVideo="currentVideo"
:currentVideoList="videoArray"
:currentVideoId="currentVideoId"
>
</common-video>
<!-- <common-video
v-else
@changeScreen="changeScreen"
@changeScreenLoading="changeScreenLoading"
ref="commonVideo"
:currentVideo="currentVideo"
:currentVideoList="videoArray"
>
</common-video> -->
<!-- <view style="height: 200px" v-else></view> -->
<view v-else style="height: 200px"> </view>
</view>
<!-- <common-sticky
style=""
itemStyle="width:auto; height: 80rpx;font-size:20rpx;color:#fff"
:list="ordersTabs"
label="name"
:currentCateIndex="currentCateIndex"
@handleselectCate="ordersTabCLi"
></common-sticky> -->
<scroll-view
:style="`height:calc(100% - 200px - 40rpx) ;`"
scroll-y="true"
@@ -241,14 +221,6 @@
v-show="screenLoading"
>
</view>
<!-- <u-modal
:show="show"
:title="modalInfo.title"
:content="modalInfo.content"
showCancelButton
@confirm="hancleModalConfirm"
@cancel="hancleModalCancel"
></u-modal> -->
</view>
</template>
@@ -256,7 +228,6 @@
import courseDescription from "@/pages/component/commonComponents/list";
import curriculumMp3 from "./mp3Detail.vue";
import price from "../price/index.vue";
import $http from "@/config/requestConfig.js";
import { mapState } from "vuex";
export default {
@@ -326,35 +297,27 @@ export default {
userMes: {}, // 用户信息
searchDisable: false, // 搜索不可用
limitShow: false,
limitTitle: "提示",
limitContent: "",
scrollViewHeight: 0,
urlList: {
detail: "sociology/course/getCourseCatalogueChapterDetail",
checkVideo: "sociology/course/checkVideo",
curriculumInfo: "app/phone.do?getCourseInfo",
},
currentVideoId: null,
};
},
onLoad(options) {
this.options = options;
this.getCourseDescriptionData();
// plus.screen.lockOrientation("default");
this.screenLoading = false;
this.currentCateIndex = 0;
// #ifdef APP-PLUS
// plus.screen.unlockOrientation(); //解除锁定屏幕方向
// plus.screen.lockOrientation("portrait-primary");
// this.getUserInfo()
// this.getCateList()
},
onHide() {
// this.showSearchList = false
// this.searchList = []
},
onShow() {
// #endif
},
onHide() {},
onShow() {},
computed: {
...mapState(["userInfo"]),
},
@@ -370,71 +333,16 @@ export default {
this.currentCateIndex = data.index;
this.$forceUpdate();
},
initVideo() {
this.screenLoading = false;
this.isfresh = false;
this.$nextTick(() => {
this.isfresh = true;
setTimeout(() => {
this.$refs.commonVideo.init({
currentVideo: this.currentVideo,
currentVideoList: this.videoArray,
});
}, 200);
});
},
changeVideo(data) {
if (data.id != this.currentVideo.id) {
clearInterval(this.$store.state.videoTimer);
console.log(
"父页面是否触发了切换视屏呀:",
data.id,
this.currentVideo.id
);
this.currentVideo = data;
// setTimeout(() => {
this.$refs.commonVideo.changeVideo({
currentVideo: data,
currentVideoList: this.videoArray,
this.isfresh = false;
this.$nextTick(() => {
this.currentVideoId = data.id;
this.currentVideo = data;
this.isfresh = true;
});
// }, 200);
// // handleEnd
// this.$refs.commonVideo.handleEnd();
// this.currentVideo = data;
// this.initVideo();
// this.isOpenMp3 = false;
}
console.log("data at line 380111111111111111111:", data.type);
// var mynavData = JSON.stringify(data); // 这里转换成 字符串
// if (data.type == 0 || data.type == 2) {
// //0 mp4 2 mp3
// uni.navigateTo({
// url: `/pages/curriculum/order/curriculum/videoDetail?data=${mynavData}`,
// });
// } else if (data.type == 1) {
// //视频云点播
// uni.navigateTo({
// url: `/pages/curriculum/order/curriculum/videoDetailOss?data=${mynavData}`,
// });
// }
// else if (data.type == 2) {
// //mp3
// this.isOpenMp3 = true;
// this.$nextTick(() => {
// this.$refs.mp3Detail.init({ data: mynavData });
// });
// }
// uni.navigateTo({
// // url: '../bookShop/commodityDetail?id=' + item.id
// url: `/pages/curriculum/order/curriculum/detail?navTitle=${v.title}&title=${v.title}&oid=${v.oid}`,
// });
},
hancleModalCancel() {
this.show = false;
@@ -442,7 +350,6 @@ export default {
handleClickMore(v, i, status) {
console.log("i at line 357:", i);
this.$set(this.correlationiList[i], "isOpen", status);
// [i].=!this.correlationiList[i].isOpen;
},
hancleModalConfirm() {
var data = {
@@ -453,19 +360,12 @@ export default {
...this.taiHuClassInfo,
},
};
// $mars.progressBegin('申请中...');
// $mars.post(customerType, 'applyRelearn', data, function (ret) {
// api.hideProgress();
// fnLoadDataGrid();
// });
},
//课程详情
gotoDetail(v) {
console.log(v);
uni.navigateTo({
// url: '../bookShop/commodityDetail?id=' + item.id
url: `/pages/curriculum/order/curriculum/detail?navTitle=${v.title}&title=${v.title}&oid=${v.oid}`,
});
},
@@ -473,117 +373,34 @@ export default {
goCourseDescription(v) {
console.log(v);
uni.navigateTo({
// url: '../bookShop/commodityDetail?id=' + item.id
url: `/pages/curriculum/order/curriculum/index?navTitle=${v.title}&title=${v.title}&id=${v.id}`,
});
},
getCourseDescriptionData() {
async getCourseDescriptionData() {
this.isfresh = false;
var data = {
id: this.options.id,
load: false,
// id: "16457",
};
var that = this;
$http
.request({
// url: "book/buyOrder/buySave",
url: "sociology/course/getCourseCatalogueChapterDetail",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data,
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then(async (res) => {
console.log(this.$store.state, "11111111111");
console.log("res at line 491:", res);
console.log("res at line 395:", res);
that.curriculumData = res.data.detail;
that.videoArray = res.data.videos;
if (that.videoArray.length > 0) {
this.currentVideo = that.videoArray[0];
this.initVideo();
that.currentVideoId = that.videoArray[0].id;
that.currentVideo = that.videoArray[0];
that.isfresh = true;
}
// if (res.obj.correlatedList && res.obj.correlatedList.length > 0) {
// this.relatedCoursesList =
// res.obj.correlatedList && res.obj.correlatedList.length > 0
// ? res.obj.correlatedList
// : [];
// this.medicalCasesList =
// res.obj.dataList && res.obj.dataList.length > 0
// ? res.obj.dataList
// : [];
// this.commentLst =
// res.obj.commentLst && res.obj.commentLst.length > 0
// ? res.obj.commentLst
// : [];
// this.praise = res.obj.praise
// ? res.obj.praise
// .split("")
// .filter((e) => e != "")
// .join("")
// : "";
// this.reward = res.obj.reward
// ? res.obj.reward
// .split("")
// .filter((e) => e != "")
// .join("")
// : "";
// correlatedListEl.innerHTML = courseDot(ret.correlatedList);
// }
var videoArray = [];
var videoArrayHW = [];
// break;
// switch (that.curriculumData.videoType) {
// case "01":
// // allDataList
// // voices
// that.videoArray = res.obj.videos.split(",");
// that.videoArrayHW = res.obj.videos.split(",");
// if (res.obj.dataLst && res.obj.dataLst.length > 0) {
// // dataGrid.innerHTML = dot(ret.dataLst);
// }
// break;
// case "02":
// that.videoArray = res.obj.videoId.split(",");
// if (res.obj.dataLst && res.obj.dataLst.length > 0) {
// // res.obj.dataLst
// console.log("res.obj.dataLst at line 436:", res.obj.dataLst);
// }
// break;
// // console.log(this.dataList.length, 6666666)
// break;
// }
// if (res.obj.w_videoIds != "") {
// // 海外视频
// // $mars.initAVDataHW(ret.oid,'1', 'videoHW', ret.w_videoIds, 'taiHuClass/');
// that.videoArrayHW = res.obj.w_videoIds.split(",");
// // if (ret.dataLst && ret.dataLst.length > 0) {
// // dataGrid.innerHTML = dot(ret.dataLst);
// // }
// // if (ret.correlatedList && ret.correlatedList.length > 0) {
// // correlatedListEl.innerHTML = courseDot(ret.correlatedList);
// // }
// }
// that.cateList = res.obj.courseTabs
// that.relatedCoursesList = res.obj.correlatedList
// await that.handleselectCate({ ...this.cateList[0], index: 0 })
// socket.init();
});
},
getPriceData() {
@@ -598,21 +415,7 @@ export default {
checkDisable() {
console.log("点击了");
},
// 显示无权限弹窗
// showNoRights() {
// let that = this
// uni.showModal({
// content: "",
// confirmText: '好的',
// showCancel: false,
// success: function(res) {
// if (res.confirm) {
// // console.log('用户点击确定');
// that.clear()
// }
// }
// })
// },
// 获取用户详情
getUserInfo() {
// 用户详情
@@ -630,9 +433,6 @@ export default {
var data = [];
console.log(item, index, 99999);
var that = this;
// curriculumInfo
this.$http
.post(this.urlList.curriculumInfo, {
customerType: "D",
@@ -647,69 +447,11 @@ export default {
// socket.init();
});
// this.$nextTick(() => {
// switch (item.type) {
// case 1:
// // allDataList
// this.dataList = that.allDataList.result1Lst
// break;
// case 2:
// this.dataList = that.allDataList.result2Lst
// break;
// case 3:
// this.dataList = that.allDataList.result3Lst
// break;
// case 4:
// this.dataList = that.allDataList.result4Lst.filter(e =>
// e.oid != '5fcf991c027b11e7ae62008cfae40c18' && e.oid != 'b3d8a938b8e147bc877613bb712a9cb3' && e.oid != '4d4730163135420ea962bfac4805e026' && e.oid != '49fb76ca3d6b43718d78c6aa9a3003c2' && e.oid != 'c7b047ed9246469b9ae2b1013fc3df9c'
// )
// console.log(this.dataList.length, 6666666)
// break;
// }
// this.currentCateIndex = item.index
// })
console.log(this.allDataList, this.dataList, "1688");
// if(this.userMes.tgdzPower == 0){
// let that = this
// uni.showModal({
// content: "购买 针灸六经法要上册和下册 后方可使用此功能",
// confirmText: '好的',
// showCancel: false,
// success: function(res) {
// if (res.confirm) {
// // console.log('用户点击确定');
// }
// }
// })
// return
// }
// if(item.title == "时辰取穴"){
// uni.navigateTo({
// url: "../timeAcupoint/timeAcupoint"
// })
// return
// }
// this.currentStatusIndex = index
this.searchValue = "";
this.searchList = [];
this.showSearchList = false;
// if (index != 2) {
// uni.createSelectorQuery().select('.statusList').boundingClientRect(function (rect) {
// var height = rect.height
// console.log('元素高度:',);
// }).exec();
// } else {
// this.getJFList(dictType)
// }
return data;
},
@@ -718,51 +460,14 @@ export default {
console.log(index, 99999);
var that = this;
// if(this.userMes.tgdzPower == 0){
// let that = this
// uni.showModal({
// content: "购买 针灸六经法要上册和下册 后方可使用此功能",
// confirmText: '好的',
// showCancel: false,
// success: function(res) {
// if (res.confirm) {
// // console.log('用户点击确定');
// }
// }
// })
// return
// }
// if(item.title == "时辰取穴"){
// uni.navigateTo({
// url: "../timeAcupoint/timeAcupoint"
// })
// return
// }
this.currentStatusIndex = index;
// this.currentCateIndex = 0
this.searchValue = "";
this.searchList = [];
this.showSearchList = false;
this.$nextTick(async () => {
await that.getCourseDescriptionData();
this.$forceUpdate();
});
// this.handleselectCate(this.cateList[this.currentCateIndex])
// if (index != 2) {
// uni.createSelectorQuery().select('.statusList').boundingClientRect(function (rect) {
// var height = rect.height
// console.log('元素高度:',);
// }).exec();
// } else {
// this.getJFList(dictType)
// }
},
transformData(inputData) {
@@ -777,59 +482,11 @@ export default {
// const finalResult = Object.keys(result).map(key => ({ [key]: result[key] }));
return result;
},
// getJFList(id) {
// $http.request({
// url: "book/prescript/prescriptListForJF",
// method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
// data: {
// loadAnimate: 'none', // 请求加载动画
// 'categoryId': id
// },
// header: { //默认 无 说明:请求头
// 'Content-Type': 'application/json'
// },
// }).then(res => {
// if (res.code == 0 && res.list.length > 0) {
// this.twoCateList = []
// this.dataList = this.transformData(res.list)
// console.log('JF经方', this.dataList)
// } else {
// this.twoCateList = []
// this.dataList = []
// }
// }).catch(e => {
// this.twoCateList = []
// this.dataList = []
// console.log(e)
// })
// },
getCateList(id) {
id ? "" : (id = 0);
this.twoCateList = [];
this.curTwoCateIndex = 0;
// 0为获取顶级分类其他为搜索下级分类目前的逻辑顶级是写死的所以可能只会涉及到搜索第二级
// $http.request({
// url: "book/prescript/prescriptCategoryList",
// method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
// data: {
// loadAnimate: 'none', // 请求加载动画
// 'categoryId': id
// },
// header: { //默认 无 说明:请求头
// 'Content-Type': 'application/json'
// },
// }).then(res => {
// console.log(res, '脉穴分类获取成功')
// if (res.code == 0 && res.list.length > 0) {
// this.statusList = res.list
// this.getTowCateList(this.statusList[0].type)
// } else {
// this.statusList = []
// }
// }).catch(e => {
// this.statusList = []
// console.log(e)
// })
},
// 放大图片
@@ -845,88 +502,6 @@ export default {
},
});
},
// getSearch() {
// $http.request({
// url: "book/prescript/searchPrescript",
// method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
// data: {
// loadAnimate: 'none', // 请求加载动画
// 'keywords': this.searchValue,
// type: this.currentStatusIndex + 1
// },
// header: { //默认 无 说明:请求头
// 'Content-Type': 'application/json'
// },
// }).then(res => {
// console.log(res, '搜索结果')
// if (res.code == 0 && res.list.length >= 0) {
// this.showSearchList = true
// this.searchList = res.list
// } else {
// this.searchList = []
// }
// }).catch(e => {
// // this.dataList = []
// this.searchList = []
// console.log(e)
// })
// },
// search(res) {
// console.log(res, 'res')
// // uni.showToast({
// // title: '搜索:' + res,
// // icon: 'none'
// // })
// if (res == '') {
// this.showSearchList = false
// this.searchList = []
// } else {
// this.getSearch()
// }
// },
// input(res) {
// console.log('----input:', res)
// if (res == '') {
// this.searchList = []
// } else {
// this.getSearch()
// }
// },
// clear(res) {
// console.log('----clear:', res)
// // uni.showToast({
// // title: 'clear事件清除值为',
// // icon: 'none'
// // })
// this.searchValue = ''
// this.showSearchList = false
// },
// blur(res) {
// // console.log('----blur:', res)
// // if (res == '') {
// // this.showSearchList = false
// // this.searchList = []
// // } else {
// // this.getSearch()
// // }
// },
// focus(e) {
// console.log('----focus:')
// // uni.showToast({
// // title: 'focus事件输出值为' + e.value,
// // icon: 'none'
// // })
// // 等于1 就是有权限
// // this.showSearchList = true
// },
// cancel(res) {
// uni.showToast({
// title: '点击取消,输入值为:' + res.value,
// icon: 'none'
// })
// }
},
onBackPress() {
// #ifdef APP-PLUS