From 8e7d038dba5951700164b8b5b35859a6b0965a70 Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Thu, 19 Dec 2024 10:00:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=AD=BE=E5=88=B0=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B90=E5=85=83=E6=94=AF=E4=BB=98=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/config.js | 12 +-- me/detail/detail.nvue | 14 ++- me/detail/detail.vue | 12 ++- me/detail/detailIOS.nvue | 12 ++- pages/chasingDrama/chasingDrama.vue | 4 +- pages/task/index.vue | 132 ++++++++++++++++++++++++---- static/images/signIn_icon1.png | Bin 0 -> 1561 bytes static/images/signIn_icon2.png | Bin 0 -> 1285 bytes static/images/signIn_icon3.png | Bin 0 -> 1509 bytes 9 files changed, 151 insertions(+), 35 deletions(-) create mode 100644 static/images/signIn_icon1.png create mode 100644 static/images/signIn_icon2.png create mode 100644 static/images/signIn_icon3.png diff --git a/common/config.js b/common/config.js index f8c138b..ff61669 100644 --- a/common/config.js +++ b/common/config.js @@ -1,10 +1,10 @@ -const ROOTPATH1 = "https://dj-api.hnsiyao.cn/sqx_fast/"; // -const ROOTPATH = "https://dj-api.hnsiyao.cn/sqx_fast/"; //后台服务域名 -const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名 +// const ROOTPATH1 = "https://dj-api.hnsiyao.cn/sqx_fast/"; // +// const ROOTPATH = "https://dj-api.hnsiyao.cn/sqx_fast/"; //后台服务域名 +// const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名 -// const ROOTPATH1 = "https://video.hnsiyao.cn/sqx_fast/"; // -// const ROOTPATH = "https://video.hnsiyao.cn/sqx_fast/"; //后台服务域名 -// const ROOTPATH2 = "https://video-h5.hnsiyao.cn"; //后台服务域名 +const ROOTPATH1 = "https://video.hnsiyao.cn/sqx_fast/"; // +const ROOTPATH = "https://video.hnsiyao.cn/sqx_fast/"; //后台服务域名 +const ROOTPATH2 = "https://video-h5.hnsiyao.cn"; //后台服务域名 // const ROOTPATH1 = "http://192.168.1.5:8100/sqx_fast/"; // // const ROOTPATH = "http://192.168.1.5:8100/sqx_fast/"; //后台服务域名 diff --git a/me/detail/detail.nvue b/me/detail/detail.nvue index f4fef46..6d4ef16 100644 --- a/me/detail/detail.nvue +++ b/me/detail/detail.nvue @@ -632,6 +632,7 @@ }, //选集弹窗的回调 changeXj(e) { + console.log(e) if (e.show == false) { //关闭弹窗的时候重置scrollIntoViews,防止关闭后第二次点就不能自动滑动到当前集的位置 this.scrollIntoViews = 'video0' @@ -1095,7 +1096,11 @@ this.$refs.popupPya.close() }, //选择播放 - selectPlay(item) { + selectPlay(item,type) { + if ( this.videoList[this.current].videoUrl == '' && this.videoList[this.current].price <= 0 && !type ) { + this.getDataList(this.courseId, this.courseDetailsId, true, 'select') + return; + } //重新计算一下当前观看的是哪个视频 this.comNumVideo() //滚动到选择的位置 @@ -1212,6 +1217,7 @@ //滚动到指定位置 goListPosition(courseDetailsId) { let _this = this; + // this.scrollIntoViews = 'video0' this.$nextTick(() => { // setTimeout(()=>{ console.log(courseDetailsId, '开始移动了') @@ -1238,7 +1244,7 @@ * @param {Number} courseDetailsId 当前视频id * @param {boolean} type 是购买后返回的还是直接进来的 */ - getDataList(courseId, courseDetailsId, type) { + getDataList(courseId, courseDetailsId, type, t) { let data = { id: courseId, token: uni.getStorageSync('token') ? uni.getStorageSync('token') : '' @@ -1347,7 +1353,9 @@ } }) } - + if ( t == 'select') { + this.selectPlay(this.videoList[this.current],true) + } this.$forceUpdate(); } diff --git a/me/detail/detail.vue b/me/detail/detail.vue index ee489db..ad9ce4e 100644 --- a/me/detail/detail.vue +++ b/me/detail/detail.vue @@ -1457,11 +1457,15 @@ this.$forceUpdate() }, //选择播放 - selectPlay(item) { + selectPlay(item,type) {//price //videoUrl // 根据选择的courseDetailsId拿到meunList列表中的相同数据的下标 const index = this.meunList.findIndex(menu => menu.courseDetailsId === item.courseDetailsId); this.videoList = [this.meunList[index]] this.current = 0 + if ( this.videoList[this.current].videoUrl == '' && this.videoList[this.current].price <= 0 && !type ) { + this.getDataList(this.courseId, this.courseDetailsId, true, 'select') + return; + } //重新计算一下当前观看的是哪个视频 this.comNumVideo() this.setWxUrl() @@ -1493,7 +1497,7 @@ }, // 资源详情 - getDataList(id, courseDetailsId, type) { + getDataList(id, courseDetailsId, type, t) { console.log('getDataList'); let data = { id, @@ -1660,7 +1664,9 @@ }) - + if ( t == 'select') { + this.selectPlay(this.videoList[this.current],true) + } } } else { uni.showToast({ diff --git a/me/detail/detailIOS.nvue b/me/detail/detailIOS.nvue index 0e69ea1..d2cc83f 100644 --- a/me/detail/detailIOS.nvue +++ b/me/detail/detailIOS.nvue @@ -1032,11 +1032,15 @@ this.$forceUpdate() }, //选择播放 - selectPlay(item, index) { + selectPlay(item, index, type) { // 根据选择的courseDetailsId拿到meunList列表中的相同数据的下标 // const index = this.meunList.findIndex(menu => menu.courseDetailsId === item.courseDetailsId); // this.videoList = [this.meunList[index]] this.current = index + if ( this.videoList[this.current].videoUrl == '' && this.videoList[this.current].price <= 0 && !type ) { + this.getDataList(this.courseId, this.courseDetailsId, true, 'select') + return; + } //重新计算一下当前观看的是哪个视频 this.comNumVideo() // 把选择的视频的自动播放设置为true @@ -1270,7 +1274,7 @@ * @param {Number} courseDetailsId 当前视频id * @param {boolean} type 是购买后返回的还是直接进来的 */ - getDataList(courseId, courseDetailsId, type) { + getDataList(courseId, courseDetailsId, type, t) { let data = { id: courseId, token: uni.getStorageSync('token') ? uni.getStorageSync('token') : '' @@ -1381,7 +1385,9 @@ } else { //不能播放则需要购买 this.openPay() } - + if ( t == 'select') { + this.selectPlay(this.videoList[this.current],this.current,true) + } this.$forceUpdate(); //插入历史记录 this.setHistor(this.videoList[this.current].courseId, this.videoList[this.current] diff --git a/pages/chasingDrama/chasingDrama.vue b/pages/chasingDrama/chasingDrama.vue index 8ed00f5..e0d6da0 100644 --- a/pages/chasingDrama/chasingDrama.vue +++ b/pages/chasingDrama/chasingDrama.vue @@ -1,6 +1,6 @@