diff --git a/common/http.api.js b/common/http.api.js index 7be54ea..40b5890 100644 --- a/common/http.api.js +++ b/common/http.api.js @@ -51,6 +51,7 @@ const install = (Vue, vm) => { let userMoney = (params = {}) => vm.$u.get('app/invite/selectUserMoney', params); //查看钱包 let cashMoney = (params = {}) => vm.$u.get('app/cash/cashMoney', params); //申请提现 + let withdraw = (params = {}) => vm.$u.get('app/cash/withdraw', params); //申请提现 let selectPay = (params = {}) => vm.$u.get('app/cash/selectPayDetails', params); //提现记录 let moneyDet = (params = {}) => vm.$u.get('app/cash/queryUserMoneyDetails', params); //钱包明细 let type = (params = {}) => vm.$u.get('app/common/type', params); //钱包明细 @@ -107,10 +108,14 @@ const install = (Vue, vm) => { moneyList, userMoney, cashMoney, + withdraw, selectPay, moneyDet, type, + myPurseDet, + myPurse, + help, helpDet, selectCourseDetailsById diff --git a/me/balance/duihuan.vue b/me/balance/duihuan.vue deleted file mode 100644 index de41370..0000000 --- a/me/balance/duihuan.vue +++ /dev/null @@ -1,191 +0,0 @@ - - - - - \ No newline at end of file diff --git a/me/detail/detail.nvue b/me/detail/detail.nvue index a77c216..a6ba30e 100644 --- a/me/detail/detail.nvue +++ b/me/detail/detail.nvue @@ -9,6 +9,8 @@ @@ -368,6 +370,7 @@ 'width': '750rpx', }, isShowVideo: '', + playFlag: false, }; }, onUnload() { @@ -492,6 +495,38 @@ } }, methods: { + //播放时的回掉 + videoPlay(videoId,courseDetailsId) { + this.courseDetailsId = courseDetailsId + if ( !this.playFlag ) { + this.playFlag = true + httpsRequest.getT('app/course/viewCourse', { + courseId: this.courseId, + courseDetailsId: courseDetailsId, + type: 'start' + }).then(res => { + console.log('播放开始') + }) + } + + }, + //播放进度变化回掉 + timeupdate(e) { + + if (e.detail.currentTime > e.detail.duration*0.9) { + if ( this.playFlag) { + this.playFlag = false + httpsRequest.getT('app/course/viewCourse', { + courseId: this.courseId, + courseDetailsId: this.courseDetailsId, + type: 'end' + }).then(res => { + console.log('播放结束') + }) + } + } + + }, appear(e, index) { this.current = index this.showControls = true @@ -796,7 +831,7 @@ //显示/隐藏适配控制器的回调 controlstoggles(e) { this.showControls = e.detail.show - console.log(e.detail.show, '显示/隐藏控制栏') + // console.log(e.detail.show, '显示/隐藏控制栏') }, //打开倍速弹框 openBs() { diff --git a/me/detail/detail.vue b/me/detail/detail.vue index df5cb77..6d14587 100644 --- a/me/detail/detail.vue +++ b/me/detail/detail.vue @@ -371,6 +371,7 @@ zongPrice: 0, //整部价格 countPrice: 0, //单集价格 isWxIosPay: true, + playFlag: false, }; }, onShareAppMessage(res) { @@ -526,7 +527,6 @@ if (e.tt_episode_id) { this.tt_episode_id = e.tt_episode_id } - console.log(1) // this.$u.get('/app/common/type/817').then(res => { //是否开启购买整部视频 817 // if (res.code == 0 && res.data) { // this.zhengbu = res.data.value; @@ -620,7 +620,6 @@ } // #endif this.isVips = uni.getStorageSync('isVips') ? uni.getStorageSync('isVips') : '否' - console.log(2) if(this.courseId){ this.getDataList(this.courseId, this.courseDetailsId); } @@ -949,6 +948,21 @@ // #ifdef H5 uni.hideLoading() // #endif + // console.log(e.detail.currentTime) + // console.log(e.detail.duration) + if (e.detail.currentTime > e.detail.duration*0.9) { + if ( this.playFlag) { + this.playFlag = false + this.$Request.getT('app/course/viewCourse', { + courseId: this.courseId, + courseDetailsId: this.courseDetailsId, + type: 'end' + }).then(res => { + console.log('播放结束') + }) + } + } + }, //缓冲中 waiting(e) { @@ -1577,8 +1591,8 @@ } } } - // this.courseId = this.videoList[current].courseId - // this.courseDetailsId = this.videoList[current].courseDetailsId + this.courseId = this.videoList[current].courseId + this.courseDetailsId = this.videoList[current].courseDetailsId //获取当前播放的视频在菜单数组中的位置 let scrollIndex = this.meunList.findIndex(ite => ite.courseDetailsId == this.videoList[current] .courseDetailsId) @@ -1608,10 +1622,12 @@ }) }, startPlay(current) { + console.log(222222) if (this.videoContext) { //判断之前是否有视频的上下文 this.videoContext.stop() this.videoContext = null } + console.log(this.videoList[current]) let numIdCurr = this.videoList[current].courseDetailsId if (this.videoList[current].videoUrl) { //已经购买可直接播放 // 播放时记录当前播放的id @@ -1635,7 +1651,14 @@ //播放时的回掉 videoPlay(videoId) { - + this.$Request.getT('app/course/viewCourse', { + courseId: this.courseId, + courseDetailsId: this.courseDetailsId, + type: 'start' + }).then(res => { + this.playFlag = true + console.log('播放开始') + }) }, //监听视频播放完成 ended() { diff --git a/me/detail/detailIOS.nvue b/me/detail/detailIOS.nvue index 18b804c..b71b0e6 100644 --- a/me/detail/detailIOS.nvue +++ b/me/detail/detailIOS.nvue @@ -8,6 +8,8 @@ @@ -358,6 +360,8 @@ payPrice: 0, //解锁价格 iosPayId: '', isCollect: false, + playFlag: false, + }; }, computed: { @@ -491,6 +495,38 @@ } }, methods: { + //播放时的回掉 + videoPlay(videoId,courseDetailsId) { + this.courseDetailsId = courseDetailsId + if ( !this.playFlag ) { + this.playFlag = true + httpsRequest.getT('app/course/viewCourse', { + courseId: this.courseId, + courseDetailsId: courseDetailsId, + type: 'start' + }).then(res => { + console.log('播放开始') + }) + } + + }, + //播放进度变化回掉 + timeupdate(e) { + + if (e.detail.currentTime > e.detail.duration*0.9) { + if ( this.playFlag) { + this.playFlag = false + httpsRequest.getT('app/course/viewCourse', { + courseId: this.courseId, + courseDetailsId: this.courseDetailsId, + type: 'end' + }).then(res => { + console.log('播放结束') + }) + } + } + + }, //选集弹窗的回调 changeXj(e) { if (e.show == false) { diff --git a/me/invite/cashDetail.vue b/me/invite/cashDetail.vue index a7856f2..9fa9a51 100644 --- a/me/invite/cashDetail.vue +++ b/me/invite/cashDetail.vue @@ -8,18 +8,23 @@ - 提现金额 (注:提现手续费为{{shouxufei * 100}}%) + 提现金额 + - - ¥ - + + + ¥ + + + 全部 + - + @@ -40,7 +45,7 @@ 提现账号 - 钱包明细 + 红包明细 提现记录 @@ -124,15 +129,20 @@ page: this.page, limit: this.limit } - this.$u.api.queryInviter(data).then(res => { + // this.$u.api.myPurseDet(data).then(res => { + // if (res.code == 0) { + // this.mayMoney = res.data.inviteMoney.money + // } else { + // uni.showToast({ + // title: res.msg, + // duration: 1000, + // icon: 'none' + // }); + // } + // }) + this.$Request.getT('app/moneyDetails/selectUserMoney').then(res => { if (res.code == 0) { - this.mayMoney = res.data.inviteMoney.money - } else { - uni.showToast({ - title: res.msg, - duration: 1000, - icon: 'none' - }); + this.mayMoney = res.data.amount } }) }, @@ -166,12 +176,12 @@ //this.$queue.showLoading("加载中..."); //可以提现金额查询预估收入查询 let data = { - money: that.money + amount: that.money } - this.$u.api.cashMoney(data).then(res => { + this.$u.api.withdraw(data).then(res => { if (res.code == 0) { uni.showToast({ - title: '提现申请成功,预计三个工作日到账', + title: res.msg, icon: 'none' }) that.money = '' @@ -196,12 +206,11 @@ let that = this; let token = that.token let userId = that.userId - console.log(token) let cashMoney = that.cashMoney; if (token) { if (that.zhifubao && that.zhifubaoName) { - if (!/^\d+$/.test(that.money)) { + if (!/^\d+(\.\d{1,2})?$/.test(that.money)) { uni.showToast({ icon: 'none', title: '请输入正确金额,不能包含中文,英文,特殊字符和小数' @@ -216,8 +225,10 @@ uni.showModal({ title: "提现申请提示", content: '请仔细确认收款人信息\n\n收款人姓名:' + that.zhifubaoName + '\n\n提现金额:' + that - .money + '元\n\n提现手续费:' + shouxufei + - '\n\n收款人账号:' + that.zhifubao + '', + .money + '元\n\n收款人账号:' + that.zhifubao + '', + // content: '请仔细确认收款人信息\n\n收款人姓名:' + that.zhifubaoName + '\n\n提现金额:' + that + // .money + '元\n\n提现手续费:' + shouxufei + + // '\n\n收款人账号:' + that.zhifubao + '', success: (e) => { if (e.confirm) { // that.money = money @@ -276,8 +287,10 @@ uni.showModal({ title: '提现申请提示', content: '请仔细确认收款人信息\n\n收款人姓名:' + that.zhifubaoName + '\n\n提现金额:' + money + - '元\n\n提现手续费:' + shouxufei + - '\n\n收款人账号:' + that.zhifubao + '', + '元\n\n收款人账号:' + that.zhifubao + '', + // content: '请仔细确认收款人信息\n\n收款人姓名:' + that.zhifubaoName + '\n\n提现金额:' + money + + // '元\n\n提现手续费:' + shouxufei + + // '\n\n收款人账号:' + that.zhifubao + '', confirmColor: '#ff7581', success: e => { if (e.confirm) { diff --git a/me/invite/cashList.vue b/me/invite/cashList.vue index 5bea93b..e71e6f6 100644 --- a/me/invite/cashList.vue +++ b/me/invite/cashList.vue @@ -59,7 +59,7 @@ page: that.page, limit: that.limit } - that.$u.api.selectPay(data).then(res => { + this.$Request.getT('app/cash/selectPayDetails', data).then(res => { if (that.page == 1) { that.list = res.data.list uni.stopPullDownRefresh(); diff --git a/me/invite/index.vue b/me/invite/index.vue index b277150..38a9518 100644 --- a/me/invite/index.vue +++ b/me/invite/index.vue @@ -51,7 +51,7 @@ - + 已邀请 {{inviterNumber}} diff --git a/me/invite/moneyList.vue b/me/invite/moneyList.vue index 0ec9db4..50cec56 100644 --- a/me/invite/moneyList.vue +++ b/me/invite/moneyList.vue @@ -51,7 +51,8 @@ page : that.page, limit : that.limit } - that.$u.api.moneyDet(data).then(res => { + + this.$Request.getT('app/moneyDetails/queryUserMoneyDetails', data).then(res => { if(that.page == 1) { that.list = res.data.records uni.stopPullDownRefresh(); diff --git a/me/task/index.vue b/me/task/index.vue index 3fe7a21..91a811d 100644 --- a/me/task/index.vue +++ b/me/task/index.vue @@ -1,7 +1,7 @@