diff --git a/components/myPay/myPay.axml b/components/myPay/myPay.axml index 55adeba..ffadd12 100644 --- a/components/myPay/myPay.axml +++ b/components/myPay/myPay.axml @@ -1,5 +1,5 @@ - + 创作不易,支持作者 diff --git a/pages/index/index.js b/pages/index/index.js index b93cadd..a0e226d 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -15,16 +15,18 @@ Page({ searchDialogTips: true, }, onLoad(query) { - const sid = query.sid; + const sid = query.sid || ''; + const id = query.id || ''; + const tid = query.tid || ''; const systemInfo = getApp().globalData.systemInfo; - if (sid) { + if (sid || id || tid) { if (systemInfo.platform == 'android' || systemInfo.platform == 'Android') { my.navigateTo({ - url: `/pages/videoAndroid/videoAndroid?sid=${sid}`, + url: `/pages/videoAndroid/videoAndroid?sid=${sid}&id=${id}&tid=${tid}`, }); } else { my.navigateTo({ - url: `/pages/video/video?sid=${sid}` + url: `/pages/video/video?sid=${sid}&id=${id}&tid=${tid}` }); } } else { diff --git a/pages/video/video.js b/pages/video/video.js index 83b4d1c..fd6cc91 100644 --- a/pages/video/video.js +++ b/pages/video/video.js @@ -22,6 +22,8 @@ Page({ changeCuurent: 0, swiperOrder: 0, sid: '', + id: '', + tid: '', popupShow: false, batchAllOrder: 0, batchAllList: [], @@ -116,13 +118,24 @@ Page({ }, // 获取 剧情 - async isVideoPaymentFn(sid) { + async isVideoPaymentFn(sid, id, tid) { + + const body = {}; + + if (sid) { + body.sid = sid; + } + if (sid) { + body.id = id; + } + if (sid) { + body.tid = tid; + } + const paramVideo = { path: '/videoread', method: 'POST', - body: { - sid: sid - } + body: body } const videoRead = await httpRequest(paramVideo); @@ -316,15 +329,21 @@ Page({ onLoad(query) { const sid = query.sid; + const id = query.id || ''; + const tid = query.tid || ''; this.setData({ - sid: sid + sid: sid, + id: id, + tid: tid }) }, onShow() { const sid = this.data.sid; + const id = this.data.id; + const tid = this.data.tid; this.isOtherFn(); - this.isVideoPaymentFn(sid); + this.isVideoPaymentFn(sid, id, tid); // const lodash = require('lodash'); const isThrottle = _.throttle((current) => { let id = '';