From 440811c3faed2cafd9d36b1e96ed11d6978c5937 Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Thu, 26 Dec 2024 14:07:51 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E6=94=AF=E4=BB=98=E5=AE=9D?= =?UTF-8?q?=EF=BC=8C=E8=A7=86=E9=A2=91=E8=A7=A3=E9=94=81=E7=94=9F=E6=88=90?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=A2=9E=E5=8A=A0=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/config.js | 16 ++++++++-------- me/detail/detail.nvue | 13 ++++++++++++- me/detail/detail.vue | 28 ++++++++++++++++++---------- me/invite/index.vue | 4 +++- me/invite/zhifubao.vue | 11 +++-------- pages/task/index.vue | 20 ++++++++++++-------- 6 files changed, 56 insertions(+), 36 deletions(-) diff --git a/common/config.js b/common/config.js index f8c138b..2ae726f 100644 --- a/common/config.js +++ b/common/config.js @@ -1,13 +1,13 @@ -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/czg/"; // +// const ROOTPATH = "https://dj-api.hnsiyao.cn/czg/"; //后台服务域名 +// 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/czg/"; // +const ROOTPATH = "https://video.hnsiyao.cn/czg/"; //后台服务域名 +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/"; //后台服务域名 +// const ROOTPATH1 = "http://192.168.1.5:8100/czg/"; // +// const ROOTPATH = "http://192.168.1.5:8100/czg/"; //后台服务域名 // const ROOTPATH2 = "http://192.168.1.5:8100"; //后台服务域名 module.exports = { diff --git a/me/detail/detail.nvue b/me/detail/detail.nvue index 9a23eab..d0aa717 100644 --- a/me/detail/detail.nvue +++ b/me/detail/detail.nvue @@ -406,7 +406,8 @@ getRedEnvelopeTips: '', scale: 1, // 防抖使用的变量 - appearTimeout: null + appearTimeout: null, + isOrder: true }; }, onUnload() { @@ -1041,6 +1042,12 @@ * 2:购买单集视频 */ payVideo(type, num) { + console.log(this.isOrder) + if(!this.isOrder){ + return; + } + console.log(1) + this.isOrder = false if (uni.getStorageSync('token')) { this.submitPay(type, num) } else { @@ -1061,6 +1068,7 @@ } httpsRequest.getT((num && num == 10) ? '/app/order/insertCourseOrders/limit10' : '/app/order/insertCourseOrders', data).then(res => { + console.log(3) if (res.code == 0) { this.ordersId = res.data.orders.ordersId //记录订单id this.payMoney = res.data.orders.payMoney //记录订单价格 @@ -1077,6 +1085,7 @@ } else { if (res.status && res.status == 1) { this.showPay = false //关闭购买选择弹窗 + this.isOrder = true this.getDataList(this.courseId, this.videoList[this.current].courseDetailsId, true); return; @@ -1103,6 +1112,7 @@ this.closePopusPay() this.closePay() that.showPay = false + this.isOrder = true that.showMoney = false that.noBuyVideoIndex = null setTimeout(() => { @@ -1291,6 +1301,7 @@ token: uni.getStorageSync('token') ? uni.getStorageSync('token') : '' }; httpsRequest.getT('/app/course/selectCourseDetailsById', data).then(res => { + if (res.code == 0) { console.log(res) if (res.data.listsDetail) { diff --git a/me/detail/detail.vue b/me/detail/detail.vue index b0de123..d98ff4a 100644 --- a/me/detail/detail.vue +++ b/me/detail/detail.vue @@ -433,6 +433,7 @@ playFlag: false, getRedEnvelopeTips: '', scale: 1, + isOrder: true, }; }, onShareAppMessage(res) { @@ -1260,6 +1261,10 @@ * 2:购买单集视频 */ payVideo(type) { + if(!this.isOrder){ + return; + } + this.isOrder = false if (uni.getStorageSync('token')) { // #ifdef MP-TOUTIAO if (!this.checked) { @@ -1310,13 +1315,13 @@ if (res.code == 0) { this.ordersId = res.data.orders.ordersId //记录订单id this.payMoney = res.data.orders.payMoney //记录订单价格 - console.log(type) if (type == 1) { //金币 // this.showPay = false // this.showMoney = false this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney); } else if (type == 2) { //支付宝 this.showPay = false //关闭购买选择弹窗 + this.isOrder = true this.payPrice = res.data.orders.payMoney //需要支付的价格 this.showMoney = true //显示充值弹窗 } @@ -1324,6 +1329,7 @@ } else { if ( res.status && res.status == 1) { this.showPay = false //关闭购买选择弹窗 + this.isOrder = true this.getDataList(this.courseId, this.videoList[this.current].courseDetailsId, true); return; @@ -1348,6 +1354,7 @@ icon: 'none' }) that.showPay = false + this.isOrder = true that.showMoney = false that.noBuyVideoIndex = null setTimeout(() => { @@ -1573,17 +1580,13 @@ let indexs = -1 if (courseDetailsId) { //从记录进来的 - console.log(courseDetailsId) - console.log(this.meunList) this.meunList.map((item, index) => { if (item.courseDetailsId == courseDetailsId) { indexs = index } }) - console.log(indexs) if (indexs != -1) { //找到了 if (Number(indexs + 1) === this.meunList.length) { //最后一条 - console.log("最后一条") if (this.meunList.length == 1) { //只有一条 this.videoList = this.meunList.slice(0, 3) @@ -1807,10 +1810,17 @@ } } //考虑向下滑动 + console.log(current+"---"+this.current) if ((current == 0 && this.current == 2) || (current == 0 && this.current == 0)) { //是否滑动到第一条,虽然刚进入页面current为0,但是首次不触发 //拿出当前的courseDetailsId - let courseDetailsId = this.videoList[2].courseDetailsId + console.log(this.videoList) + let courseDetailsId =this.videoList[2].courseDetailsId + // if ( this.videoList.length > 1) { + // courseDetailsId = this.videoList[2].courseDetailsId + // } else { + // courseDetailsId = this.videoList[0].courseDetailsId + // } indexs = this.meunList.findIndex(item => item.courseDetailsId === courseDetailsId); //记录当前数据在meunList中的下标 if (indexs != -1) { //找到了,indexs就是对应下标 @@ -1906,15 +1916,13 @@ }, //播放时的回掉 videoPlay(videoId) { - console.log(courseDetailsId) - console.log(this.playFlag) // this.courseDetailsId = courseDetailsId if (!this.playFlag) { this.getDataList(this.courseId, this.videoList[this.current].courseDetailsId,true); this.playFlag = true - httpsRequest.getT('app/course/viewCourse', { + this.$Request.getT('app/course/viewCourse', { courseId: this.courseId, - courseDetailsId: courseDetailsId, + courseDetailsId: this.videoList[this.current].courseDetailsId, type: 'start' }).then(res => { console.log('播放开始') diff --git a/me/invite/index.vue b/me/invite/index.vue index 56e8c6d..a09ca50 100644 --- a/me/invite/index.vue +++ b/me/invite/index.vue @@ -245,7 +245,9 @@ } // h5携带邀请码去首页 // #ifdef H5 - this.erweima = config.APIHOST2 + '/?invitation=' + this + // this.erweima = config.APIHOST2 + '/?invitation=' + this + // .invitationCode + '&qdCode=' + this.qdCode + this.erweima = config.APIHOST2 + '/pages/login/registerApp/?invitation=' + this .invitationCode + '&qdCode=' + this.qdCode // #endif // app直接去app注册页面 diff --git a/me/invite/zhifubao.vue b/me/invite/zhifubao.vue index 1bafd81..28a9765 100644 --- a/me/invite/zhifubao.vue +++ b/me/invite/zhifubao.vue @@ -54,16 +54,9 @@ }, toLogin() { - // console.log(this.zhiFuBao ) - // console.log(this.zhiFuBaoName ) - // const { - // zhiFuBao, - // zhiFuBaoName - // } = this; let zhiFuBao = this.zhiFuBao let zhiFuBaoName = this.zhiFuBaoName - console.log(zhiFuBao) - console.log(zhiFuBaoName) + if (!zhiFuBao) { uni.showToast({ title: '请设置收款人姓名', @@ -75,8 +68,10 @@ icon: 'none' }) } else { + this.logining = true this.$u.post('app/user/updateUser?zhiFuBao=' + zhiFuBao + '&zhiFuBaoName=' + zhiFuBaoName).then( res => { + this.logining = false console.log(res); if(res.code===0){ uni.setStorageSync('zhiFuBao', zhiFuBao) diff --git a/pages/task/index.vue b/pages/task/index.vue index 733cbdd..9ee71f0 100644 --- a/pages/task/index.vue +++ b/pages/task/index.vue @@ -162,6 +162,17 @@ this.adRewardedVideo = true; console.log('广告数据加载成功'); }, + + /** + * 广告加载失败回调 + * @param {Object} e + */ + onaderror(e) { // 广告加载失败 + this.$refs.adRewardedVideo.load(); + // this.adRewardedVideo = false; + console.log("广告加载失败") + }, + /** * 广告播放成功回调 * @param {Object} e @@ -187,14 +198,7 @@ // 播放中途退出 } }, - /** - * 广告加载失败回调 - * @param {Object} e - */ - onaderror(e) { // 广告加载失败 - this.adRewardedVideo = false; - console.log("广告加载失败") - }, + /** * 获取签到数据 */