From 2c97f29c1b6f097337e49ef950978efb5717984f Mon Sep 17 00:00:00 2001 From: lipenggao Date: Thu, 29 Feb 2024 09:27:59 +0800 Subject: [PATCH] xiugai --- .tea/entryFiles-development/index$.web.js | 9 +- .tea/entryFiles-development/index$.worker.js | 9 +- .tea/entryFiles-production/index$.web.js | 9 +- .tea/entryFiles-production/index$.worker.js | 13 +- app.json | 2 - components/myPay/myPay.acss | 17 +- components/myPay/myPay.axml | 45 +- components/myPay/myPay.js | 145 +++++- pages/addqywx/addqywx.acss | 40 -- pages/addqywx/addqywx.axml | 15 - pages/addqywx/addqywx.js | 22 - pages/addqywx/addqywx.json | 3 - pages/binge/binge.acss | 76 ++- pages/binge/binge.axml | 38 +- pages/binge/binge.js | 23 +- pages/give/give.acss | 16 +- pages/give/give.axml | 21 +- pages/give/give.js | 30 +- pages/history/history.acss | 33 +- pages/history/history.axml | 8 +- pages/history/history.js | 27 +- .../index/components/recommend/recommend.acss | 191 -------- .../index/components/recommend/recommend.axml | 101 ---- pages/index/components/recommend/recommend.js | 34 -- .../index/components/recommend/recommend.json | 7 - pages/index/index.acss | 9 +- pages/index/index.axml | 18 +- pages/index/index.js | 4 +- pages/index/index.json | 3 +- pages/my/my.acss | 19 +- pages/my/my.axml | 14 +- pages/my/my.js | 59 ++- pages/transaction/transaction.acss | 15 +- pages/transaction/transaction.axml | 26 +- pages/transaction/transaction.js | 29 +- pages/video/video.acss | 97 +++- pages/video/video.axml | 145 +++--- pages/video/video.js | 449 ++++++++++++------ pages/video/video.json | 3 +- pages/wxkf/wxkf.acss | 33 -- pages/wxkf/wxkf.axml | 13 - pages/wxkf/wxkf.js | 25 - pages/wxkf/wxkf.json | 1 - utils/httpRequest.js | 17 +- 44 files changed, 990 insertions(+), 923 deletions(-) delete mode 100644 pages/addqywx/addqywx.acss delete mode 100644 pages/addqywx/addqywx.axml delete mode 100644 pages/addqywx/addqywx.js delete mode 100644 pages/addqywx/addqywx.json delete mode 100644 pages/index/components/recommend/recommend.acss delete mode 100644 pages/index/components/recommend/recommend.axml delete mode 100644 pages/index/components/recommend/recommend.js delete mode 100644 pages/index/components/recommend/recommend.json delete mode 100644 pages/wxkf/wxkf.acss delete mode 100644 pages/wxkf/wxkf.axml delete mode 100644 pages/wxkf/wxkf.js delete mode 100644 pages/wxkf/wxkf.json diff --git a/.tea/entryFiles-development/index$.web.js b/.tea/entryFiles-development/index$.web.js index f05c207..62ea662 100644 --- a/.tea/entryFiles-development/index$.web.js +++ b/.tea/entryFiles-development/index$.web.js @@ -2,10 +2,9 @@ require('@alipay/appx-compiler/lib/sjsEnvInit'); require('./config$'); require('../../app'); require('../../node_modules/mini-antui/es/am-icon/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); -require('../../components/myFooter/myFooter?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); -require('../../pages/index/components/recommend/recommend?hash=efa451848b581ae39f6dfc3f481e34d889c0c338'); require('../../components/myEmpty/myEmpty?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../components/pursueItem/pursueItem?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); +require('../../components/myFooter/myFooter?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../node_modules/mini-antui/es/list/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../node_modules/mini-antui/es/list/list-item/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../node_modules/mini-antui/es/popup/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); @@ -17,7 +16,7 @@ require('../../node_modules/mini-antui/es/modal/index?hash=05d2a9730dd6009bf9446 require('../../node_modules/mini-antui/es/badge/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../node_modules/mini-antui/es/tabs/index?hash=b998354db5b64281090d8969355b2b3db41cda49'); require('../../node_modules/mini-antui/es/tabs/tab-content/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); -require('../../pages/index/index?hash=c4e2a134875c6734d176f2bda090e0e51de10962'); +require('../../pages/index/index?hash=4c436b8802cde3a53b8da3fd201d0c5d124d1427'); require('../../pages/discover/discover?hash=c38b953af6bdab8fe399141b33dd1ad1ceb7ea7f'); require('../../pages/binge/binge?hash=6164953b5a1ef04f4f4f6e6561b545255541aa0c'); require('../../pages/my/my?hash=75b5b8f1ecfabe3e2ac25d83ad8d5dac4aa47c98'); @@ -25,8 +24,6 @@ require('../../pages/search/search?hash=aba215d007624a3ae18a69066f7987a8463d4c8c require('../../pages/history/history?hash=496b52f9f456db6a9f22580be95fd2756db9e17d'); require('../../pages/transaction/transaction?hash=496b52f9f456db6a9f22580be95fd2756db9e17d'); require('../../pages/give/give?hash=496b52f9f456db6a9f22580be95fd2756db9e17d'); -require('../../pages/wxkf/wxkf?hash=c38b953af6bdab8fe399141b33dd1ad1ceb7ea7f'); require('../../pages/purchaseNotes/purchaseNotes?hash=c38b953af6bdab8fe399141b33dd1ad1ceb7ea7f'); -require('../../pages/addqywx/addqywx?hash=c38b953af6bdab8fe399141b33dd1ad1ceb7ea7f'); -require('../../pages/video/video?hash=2f86860594605cd2430cc3d9ad723984b88e0e36'); +require('../../pages/video/video?hash=ab3ed3fe15953ba710981e31c5a541336f6b549b'); require('../../pages/recharge/recharge?hash=c38b953af6bdab8fe399141b33dd1ad1ceb7ea7f'); diff --git a/.tea/entryFiles-development/index$.worker.js b/.tea/entryFiles-development/index$.worker.js index f998d5c..08d93fe 100644 --- a/.tea/entryFiles-development/index$.worker.js +++ b/.tea/entryFiles-development/index$.worker.js @@ -36,10 +36,9 @@ if(AFAppX.compilerConfig){ AFAppX.compilerConfig.component2 = true; } function success() { require('../../app'); require('../../node_modules/mini-antui/es/am-icon/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); -require('../../components/myFooter/myFooter?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); -require('../../pages/index/components/recommend/recommend?hash=efa451848b581ae39f6dfc3f481e34d889c0c338'); require('../../components/myEmpty/myEmpty?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../components/pursueItem/pursueItem?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); +require('../../components/myFooter/myFooter?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../node_modules/mini-antui/es/list/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../node_modules/mini-antui/es/list/list-item/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../node_modules/mini-antui/es/popup/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); @@ -51,7 +50,7 @@ require('../../node_modules/mini-antui/es/modal/index?hash=05d2a9730dd6009bf9446 require('../../node_modules/mini-antui/es/badge/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../node_modules/mini-antui/es/tabs/index?hash=b998354db5b64281090d8969355b2b3db41cda49'); require('../../node_modules/mini-antui/es/tabs/tab-content/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); -require('../../pages/index/index?hash=c4e2a134875c6734d176f2bda090e0e51de10962'); +require('../../pages/index/index?hash=4c436b8802cde3a53b8da3fd201d0c5d124d1427'); require('../../pages/discover/discover?hash=c38b953af6bdab8fe399141b33dd1ad1ceb7ea7f'); require('../../pages/binge/binge?hash=6164953b5a1ef04f4f4f6e6561b545255541aa0c'); require('../../pages/my/my?hash=75b5b8f1ecfabe3e2ac25d83ad8d5dac4aa47c98'); @@ -59,10 +58,8 @@ require('../../pages/search/search?hash=aba215d007624a3ae18a69066f7987a8463d4c8c require('../../pages/history/history?hash=496b52f9f456db6a9f22580be95fd2756db9e17d'); require('../../pages/transaction/transaction?hash=496b52f9f456db6a9f22580be95fd2756db9e17d'); require('../../pages/give/give?hash=496b52f9f456db6a9f22580be95fd2756db9e17d'); -require('../../pages/wxkf/wxkf?hash=c38b953af6bdab8fe399141b33dd1ad1ceb7ea7f'); require('../../pages/purchaseNotes/purchaseNotes?hash=c38b953af6bdab8fe399141b33dd1ad1ceb7ea7f'); -require('../../pages/addqywx/addqywx?hash=c38b953af6bdab8fe399141b33dd1ad1ceb7ea7f'); -require('../../pages/video/video?hash=2f86860594605cd2430cc3d9ad723984b88e0e36'); +require('../../pages/video/video?hash=ab3ed3fe15953ba710981e31c5a541336f6b549b'); require('../../pages/recharge/recharge?hash=c38b953af6bdab8fe399141b33dd1ad1ceb7ea7f'); } self.bootstrapApp ? self.bootstrapApp({ success }) : success(); diff --git a/.tea/entryFiles-production/index$.web.js b/.tea/entryFiles-production/index$.web.js index f05c207..62ea662 100644 --- a/.tea/entryFiles-production/index$.web.js +++ b/.tea/entryFiles-production/index$.web.js @@ -2,10 +2,9 @@ require('@alipay/appx-compiler/lib/sjsEnvInit'); require('./config$'); require('../../app'); require('../../node_modules/mini-antui/es/am-icon/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); -require('../../components/myFooter/myFooter?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); -require('../../pages/index/components/recommend/recommend?hash=efa451848b581ae39f6dfc3f481e34d889c0c338'); require('../../components/myEmpty/myEmpty?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../components/pursueItem/pursueItem?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); +require('../../components/myFooter/myFooter?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../node_modules/mini-antui/es/list/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../node_modules/mini-antui/es/list/list-item/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../node_modules/mini-antui/es/popup/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); @@ -17,7 +16,7 @@ require('../../node_modules/mini-antui/es/modal/index?hash=05d2a9730dd6009bf9446 require('../../node_modules/mini-antui/es/badge/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../node_modules/mini-antui/es/tabs/index?hash=b998354db5b64281090d8969355b2b3db41cda49'); require('../../node_modules/mini-antui/es/tabs/tab-content/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); -require('../../pages/index/index?hash=c4e2a134875c6734d176f2bda090e0e51de10962'); +require('../../pages/index/index?hash=4c436b8802cde3a53b8da3fd201d0c5d124d1427'); require('../../pages/discover/discover?hash=c38b953af6bdab8fe399141b33dd1ad1ceb7ea7f'); require('../../pages/binge/binge?hash=6164953b5a1ef04f4f4f6e6561b545255541aa0c'); require('../../pages/my/my?hash=75b5b8f1ecfabe3e2ac25d83ad8d5dac4aa47c98'); @@ -25,8 +24,6 @@ require('../../pages/search/search?hash=aba215d007624a3ae18a69066f7987a8463d4c8c require('../../pages/history/history?hash=496b52f9f456db6a9f22580be95fd2756db9e17d'); require('../../pages/transaction/transaction?hash=496b52f9f456db6a9f22580be95fd2756db9e17d'); require('../../pages/give/give?hash=496b52f9f456db6a9f22580be95fd2756db9e17d'); -require('../../pages/wxkf/wxkf?hash=c38b953af6bdab8fe399141b33dd1ad1ceb7ea7f'); require('../../pages/purchaseNotes/purchaseNotes?hash=c38b953af6bdab8fe399141b33dd1ad1ceb7ea7f'); -require('../../pages/addqywx/addqywx?hash=c38b953af6bdab8fe399141b33dd1ad1ceb7ea7f'); -require('../../pages/video/video?hash=2f86860594605cd2430cc3d9ad723984b88e0e36'); +require('../../pages/video/video?hash=ab3ed3fe15953ba710981e31c5a541336f6b549b'); require('../../pages/recharge/recharge?hash=c38b953af6bdab8fe399141b33dd1ad1ceb7ea7f'); diff --git a/.tea/entryFiles-production/index$.worker.js b/.tea/entryFiles-production/index$.worker.js index dae5556..964da0d 100644 --- a/.tea/entryFiles-production/index$.worker.js +++ b/.tea/entryFiles-production/index$.worker.js @@ -1,4 +1,6 @@ -/**! __BUGME_START__ */ !function(){"use strict";var e,n,t,o,r,a,i,c,s,u;!function(e){e.PageResume="pageResume",e.PagePause="pagePause",e.DebugPanelClick="tinyRemoteDebugPanelButtonClick",e.DebugConsole="onTinyDebugConsole",e.DebugNetworkRequest="tinyAppRemoteDebug_network_request",e.DebugNetworkResponse="tinyAppRemoteDebug_network_response",e.DebugNetworkError="tinyAppRemoteDebug_network_error",e.DebugStorageChanged="tinyAppRemoteDebug_storage",e.MessageFromVConsole="onMessageFromVConsole"}(e||(e={})),function(e){e.GetPagesData="Tiny.Data.getPageData",e.SetPageData="Tiny.Data.setPageData"}(n||(n={})),function(e){e.DataChanged="Tiny.Data.dataChanged"}(t||(t={})),function(e){e.GetStorageInfo="Tiny.Storage.getStorageInfo",e.ClearStorage="Tiny.Storage.clearStorage",e.RemoveStorage="Tiny.Storage.removeStorage",e.SetStorage="Tiny.Storage.setStorage"}(o||(o={})),function(e){e.StorageChanged="Tiny.Storage.storageChanged"}(r||(r={})),function(e){e.Enable="MiniAppLog.enable"}(a||(a={})),function(e){e.ApiSyncCall="MiniAppLog.onApiSyncCall",e.ApiSyncCallback="MiniAppLog.onApiSyncCallback",e.ApiCall="MiniAppLog.onApiCall",e.ApiCallback="MiniAppLog.onApiCallback",e.SetData="MiniAppLog.onSetData",e.SetDataCallback="MiniAppLog.onSetDataCallback",e.ShareAppMessage="MiniAppLog.onShareAppMessage"}(i||(i={})),function(e){e.consoleAPICalled="Runtime.consoleAPICalled",e.executionContextDestroyed="Runtime.executionContextDestroyed",e.executionContextsCleared="Runtime.executionContextsCleared",e.executionContextCreated="Runtime.executionContextCreated"}(c||(c={})),function(e){e.RequestWillBeSent="Network.requestWillBeSent",e.ResponseReceived="Network.responseReceived",e.LoadingFinished="Network.loadingFinished",e.LoadingFailed="Networkw.loadingFailed",e.GetResponseBody="Network.getResponseBody"}(s||(s={})),function(e){e.Data="data",e.Storage="storage",e.AppLog="applog"}(u||(u={}));var l=self,g="\\x"+("0"+"~".charCodeAt(0).toString(16)).slice(-2),p="\\"+g,f=new RegExp(g,"g"),d=new RegExp(p,"g"),y=new RegExp("(?:^|([^\\\\]))"+p),h=[].indexOf||function(e){for(var n=this.length;n--&&this[n]!==e;);return n},C=String;function m(e,n,t){return n instanceof Array?function(e,n,t){for(var o=0,r=n.length;o-1},e}(),StickyFinger=function(){function StickyFinger(e,t,n,s){var i=this;this.isWebIDE=!1,this.asyncRequestMethod="tyroRequest",this.host=t,this.contextMap={},this.contextUrlMap={},this.breakpointMap={},this.breakpointIdMap={},this.debuggerMap={},this.objectMap={},this.originConsoleAPI={},this.requestTaskId=0,this.stickyMsgQueue=[],this.wsMsgQueue=[],this.wsIsOpen=!1,this.instrumentId=n,this.stickyFlag=s.stickyFlag,this.fingerFlag=s.fingerFlag,this.hookConsole(),this.stickyFlag&&(setTimeout((function(){i.socketTask=my.connectSocket({url:"wss://"+getServerConfig().domain+"/tyro/agent/"+i.instrumentId,multiple:!0});var e=function(){if(!i.wsIsOpen){i.originConsoleAPI.log("[tyro-agent] WebSocket 连接成功"),i.wsIsOpen=!0;for(var e=0,t=i.wsMsgQueue;e0&&"string"==typeof n[0]&&(n[0].indexOf("[framework]")>=0||n[0].indexOf("dispatchEvent")>=0||n[0].indexOf("onMessage push")>=0))){var i={type:"log",args:n.map((function(t){return e.objectToRemoteObject(t,null,"object"==typeof t)})),executionContextId:0,timestamp:(new Date).getTime()};e.xhrSend(ResponseEvent.ConsoleAPICalled,i,null,!1)}},console.debug=function(){for(var t,n=[],s=0;s0&&"string"==typeof n[0]&&(n[0].indexOf("[framework]")>=0||n[0].indexOf("dispatchEvent")>=0||n[0].indexOf("onMessage push")>=0))){var i={type:"debug",args:n.map((function(t){return e.objectToRemoteObject(t,null,"object"==typeof t)})),executionContextId:0,timestamp:(new Date).getTime()};e.xhrSend(ResponseEvent.ConsoleAPICalled,i,null,!1)}},console.info=function(){for(var t,n=[],s=0;s0&&"string"==typeof n[0]&&(n[0].indexOf("[framework]")>=0||n[0].indexOf("dispatchEvent")>=0||n[0].indexOf("onMessage push")>=0))){var i={type:"info",args:n.map((function(t){return e.objectToRemoteObject(t,null,"object"==typeof t)})),executionContextId:0,timestamp:(new Date).getTime()};e.xhrSend(ResponseEvent.ConsoleAPICalled,i,null,!1)}},console.error=function(){for(var t,n=[],s=0;s0&&"string"==typeof n[0]&&(n[0].indexOf("[framework]")>=0||n[0].indexOf("dispatchEvent")>=0||n[0].indexOf("onMessage push")>=0))){var i={type:"error",args:n.map((function(t){return e.objectToRemoteObject(t,null,"object"==typeof t)})),executionContextId:0,timestamp:(new Date).getTime()};e.xhrSend(ResponseEvent.ConsoleAPICalled,i,null,!1)}},console.warn=function(){for(var t,n=[],s=0;s0&&"string"==typeof n[0]&&(n[0].indexOf("[framework]")>=0||n[0].indexOf("dispatchEvent")>=0||n[0].indexOf("onMessage push")>=0))){var i={type:"warning",args:n.map((function(t){return e.objectToRemoteObject(t,null,"object"==typeof t)})),executionContextId:0,timestamp:(new Date).getTime()};e.xhrSend(ResponseEvent.ConsoleAPICalled,i,null,!1)}}},StickyFinger.prototype.inflateStickyParamsObject=function(e){if(0!==this.stickyParams.callFrames.length){this.generateObjectId+=1;var t=String(this.generateObjectId);this.objectMap[t]=e,this.stickyParams.callFrames[0].scopeChain.push({type:"local",name:this.stickyParams.callFrames[0].functionName,object:{className:"Object",description:"Object",objectId:t,type:"object"}})}},StickyFinger.prototype.processCallFrames=function(e,t,n,s){var i=this,r=[],o=s.slice(3,s.length).map((function(e){return e.substr(0,e.lastIndexOf(":")).replace(" at ","").replace(" (",":")})),a=0,c=!0;return o.map((function(t){var s=t.split(":"),o=s[0],p=i.contextMap[e].path,u=Number(s[s.length-1]),l=i.contextUrlMap[p]||"none",y=a+":"+u+":"+p;c&&(i.scopeVariables=void 0!==i.contextMap[e]?i.contextMap[e].scope[n]:[],c=!1);var h={callFrameId:y,functionName:o,location:{scriptId:l,lineNumber:u,columnNumber:0},url:p,scopeChain:[],this:{}};r.push(h),a+=1})),r},StickyFinger.prototype.processCallFramesPhone=function(e,t,n,s){var i=this,r=[],o=s.slice(2,s.length).map((function(e){return e.substr(0,e.lastIndexOf(":")).replace(" at ","").replace(" (",":").replace("@",":")})),a=0,c=!0;return o.map((function(s){var o=s.split(":"),p=o[0],u=i.contextMap[e].path,l=Number(o[o.length-1]),y=i.contextUrlMap[u]||"none",h=a+":"+l+":"+u;c&&(i.scopeVariables=void 0!==i.contextMap[e]?i.contextMap[e].scope[n]:[],i.originConsoleAPI.log("scopeVariables "+TyroUtil.safeJSONStringify(i.scopeVariables)),i.originConsoleAPI.log("scopeVariables "+TyroUtil.safeJSONStringify(i.contextMap[e])+" "+i.contextMap[e].scope+" "+n),c=!1);var d={callFrameId:h,functionName:p,location:{scriptId:y,lineNumber:t,columnNumber:0},url:u,scopeChain:[],this:{}};r.push(d),a+=1})),r},StickyFinger.prototype.stickyAsyncLoop=function(){this.xhrSend(ResponseEvent.StickyAsync,{})},StickyFinger.prototype.xhrSendJSAPI=function(e,t,n,s){var i,r=this;if(e===ResponseEvent.Sticky){var o;this.stickyMsgQueue.length>0?(this.stickyMsgQueue.push({method:this.stickyNotSendPaused?ResponseEvent.StickyNotSendPaused:ResponseEvent.Sticky,params:t}),o=TyroUtil.safeJSONStringify(this.stickyMsgQueue),this.stickyMsgQueue=[]):o=TyroUtil.safeJSONStringify({method:this.stickyNotSendPaused?ResponseEvent.StickyNotSendPaused:ResponseEvent.Sticky,params:t}),my.call("showRemoteDebugMask",{text:" ",buttonTitle:"断点命中",hide:!1}),this.stickyNotSendPaused=!1;var a=Date.now(),c=my.callSync("tyroRequest",{url:this.host+"/tyro/agent",method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8","instrument-id":this.instrumentId},data:o,timeout:6e5,blockTimeout:6e5,dataType:"json",requestTaskId:this.requestTaskId++});return my.call("showRemoteDebugMask",{hide:!0}),c.error||null===c?(null===c?this.originConsoleAPI.error("[tyro-agent] xhrSend error result is "+c):this.originConsoleAPI.error("[tyro-agent] xhrSend error "+c.error+" "+c.errorMessage),Date.now()-a>=5e3?this.xhrSendJSAPI(e,t,n,s):TyroUtil.safeJSONStringify({method:"default"})):200!==c.status?(this.originConsoleAPI.error("[tyro-agent] xhrSend status fail "+e+" "+c.status),TyroUtil.safeJSONStringify({method:"default"})):c.data}if(e===ResponseEvent.StickyAsync){var p=TyroUtil.safeJSONStringify({method:ResponseEvent.StickyAsync,params:t});this.originConsoleAPI.info("[tyro-agent] xhrSend async send "+p),my.call(this.asyncRequestMethod,{url:this.host+"/tyro/agent",method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8","instrument-id":this.instrumentId},data:p,timeout:6e5,dataType:"json",requestTaskId:this.requestTaskId++,success:function(e){r.lastStickyAsyncError=0,r.stickyAsyncLoop(),200===e.status?(r.originConsoleAPI.info("[tyro-agent] xhrSend async success "+e.status+" "+e.data),r.handleStickyAsync(JSON.parse(e.data))):r.originConsoleAPI.error("[tyro-agent] xhrSend async fail "+e.status+" "+e.data)},fail:function(e){r.lastStickyAsyncError>=3?setTimeout((function(){r.stickyAsyncLoop()}),3e3):(r.lastStickyAsyncError+=1,r.stickyAsyncLoop()),r.originConsoleAPI.error("[tyro-agent] xhrSend async error "+TyroUtil.safeJSONStringify(e))}})}switch(e){case ResponseEvent.ById:i={id:n,result:t};break;case ResponseEvent.ScriptSource:i={method:ResponseEvent.ScriptSource,params:t};break;case ResponseEvent.Resumed:i={method:ResponseEvent.Resumed,params:t};break;case ResponseEvent.ConsoleAPICalled:i={method:ResponseEvent.ConsoleAPICalled,params:t};break;default:return}s?this.stickyMsgQueue.push(i):this.wsIsOpen?this.socketTask.send({data:TyroUtil.safeJSONStringify(i)}):this.wsMsgQueue.push(TyroUtil.safeJSONStringify(i))},StickyFinger.prototype.xhrSend=function(e,t,n,s){var i=this;if(Agent.isPhone)return this.xhrSendJSAPI(e,t,n,s);var r,o=new XMLHttpRequest;if(e===ResponseEvent.Sticky){var a;if(o.open("POST",this.host+"/tyro/agent",!1),o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),o.setRequestHeader("instrument-id",this.instrumentId),this.stickyMsgQueue.length>0){this.stickyMsgQueue.push({method:this.stickyNotSendPaused?ResponseEvent.StickyNotSendPaused:ResponseEvent.Sticky,params:t});try{a=TyroUtil.safeJSONStringify(this.stickyMsgQueue)}catch(e){this.originConsoleAPI.error(e),a=TyroUtil.safeJSONStringify({method:this.stickyNotSendPaused?ResponseEvent.StickyNotSendPaused:ResponseEvent.Sticky,params:t})}finally{this.stickyMsgQueue=[]}}else a=TyroUtil.safeJSONStringify({method:this.stickyNotSendPaused?ResponseEvent.StickyNotSendPaused:ResponseEvent.Sticky,params:t});if(this.stickyNotSendPaused=!1,o.send(a),200===o.status)return o.responseText;throw new Error("[sticky-finger] xhrSend error "+e+" "+o.status)}if(e===ResponseEvent.StickyAsync)return o.open("POST",this.host+"/tyro/agent",!0),o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),o.setRequestHeader("instrument-id",this.instrumentId),o.onload=function(){if(i.lastStickyAsyncError=0,i.stickyAsyncLoop(),4!==o.readyState||200!==o.status)throw new Error("[tyro-agent] xhrSend async fail "+e+" "+o.readyState+" "+o.status);i.handleStickyAsync(JSON.parse(o.responseText))},o.onerror=function(){throw i.lastStickyAsyncError>=3?setTimeout((function(){i.stickyAsyncLoop()}),3e3):(i.lastStickyAsyncError+=1,i.stickyAsyncLoop()),new Error("[tyro-agent] xhrSend async error "+e+" "+o.readyState+" "+o.status)},void o.send(TyroUtil.safeJSONStringify({method:ResponseEvent.StickyAsync,params:t}));switch(o.open("POST",this.host+"/tyro/agent",!0),o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),o.setRequestHeader("instrument-id",this.instrumentId),o.onload=function(){if(4!==o.readyState||200!==o.status)throw new Error("[tyro-agent] xhrSend async fail "+e+" "+o.readyState+" "+o.status)},o.onerror=function(){throw new Error("[tyro-agent] xhrSend async error "+e+" "+o.readyState+" "+o.status)},e){case ResponseEvent.ById:r={id:n,result:t};break;case ResponseEvent.ScriptSource:r={method:ResponseEvent.ScriptSource,params:t};break;case ResponseEvent.Resumed:r={method:ResponseEvent.Resumed,params:t};break;case ResponseEvent.ConsoleAPICalled:r={method:ResponseEvent.ConsoleAPICalled,params:t};break;default:return}s?this.stickyMsgQueue.push(r):o.send(TyroUtil.safeJSONStringify(r))},StickyFinger.prototype.handleSticky=function(e){var t=e.id,n=e.method,s=e.params;switch(n){case RequestMethod.DiscardConsoleEntries:return this.stickyNotSendPaused=!0,this.originConsoleAPI.log("[tyro-agent] DiscardConsoleEntries success"),"true";case RequestMethod.CallFunctionOn:return this.stickyNotSendPaused=!0,this.originConsoleAPI.log("[tyro-agent] CallFunctionOn TODO sticky"),"true";case RequestMethod.CompileScript:return this.stickyNotSendPaused=!0,this.originConsoleAPI.log("[tyro-agent] CompileScript success, "+TyroUtil.safeJSONStringify(s)),"true";case RequestMethod.SetBreakpointsActive:return this.stickyNotSendPaused=!0,this.breakpointsActive=s.active,this.originConsoleAPI.log("[tyro-agent] SetBreakpointsActive success, breakpointsActive "+this.breakpointsActive),this.breakStepType=BreakStepType.NextSticky,"true";case RequestMethod.SetSkipAllPauses:return this.stickyNotSendPaused=!0,this.skipAllPauses=s.skip,this.originConsoleAPI.log("[tyro-agent] SetSkipAllPauses success, skipAllPauses "+this.skipAllPauses),this.breakStepType=BreakStepType.NextSticky,"true";case RequestMethod.Resume:return this.xhrSend(ResponseEvent.Resumed,{}),this.originConsoleAPI.log("[tyro-agent] Resume success"),"false";case RequestMethod.StepInto:return this.xhrSend(ResponseEvent.Resumed,{}),this.breakStepType=BreakStepType.NextSticky,this.originConsoleAPI.log("[tyro-agent] StepInto success"),"false";case RequestMethod.StepOver:return this.xhrSend(ResponseEvent.Resumed,{}),this.breakStepType=BreakStepType.StepOver,this.originConsoleAPI.log("[tyro-agent] StepOver success"),"false";case RequestMethod.StepOut:return this.xhrSend(ResponseEvent.Resumed,{}),this.breakStepType=BreakStepType.StepOut,this.originConsoleAPI.log("[tyro-agent] StepOut success"),"false";case RequestMethod.GetPossibleBreakpoints:return this.stickyNotSendPaused=!0,this.getPossibleBreakpoints(t,s,!0),this.breakStepType=BreakStepType.NextSticky,"true";case RequestMethod.SetBreakpointByUrl:return this.stickyNotSendPaused=!0,this.setBreakpointByUrl(t,s,!0),this.breakStepType=BreakStepType.NextSticky,"true";case RequestMethod.SetBreakpoint:return this.stickyNotSendPaused=!0,this.setBreakpoint(t,s,!0),this.breakStepType=BreakStepType.NextSticky,"true";case RequestMethod.RemoveBreakpoint:return this.stickyNotSendPaused=!0,this.removeBreakpoint(t,s),this.breakStepType=BreakStepType.NextSticky,"true";case RequestMethod.REPL:return this.stickyNotSendPaused=!0,this.breakStepType=BreakStepType.NextSticky,"(function(){(function(){"+s.statement+"})();return true})()";case RequestMethod.GetVariableValue:this.stickyNotSendPaused=!0;var i=e.params;return this.breakStepType=BreakStepType.NextSticky,"(function(){(function(){\n Agent.variableValue({"+i.map((function(e){return e+": (function(){try{return "+e+"}catch(e){return undefined}})()"})).join(",")+"})\n })();return true})()";case RequestMethod.SetPauseOnExceptions:return this.stickyNotSendPaused=!0,this.setPauseOnExceptions(t,s),this.breakStepType=BreakStepType.NextSticky,"true";case RequestMethod.SetAsyncCallStackDepth:return this.stickyNotSendPaused=!0,this.setAsyncCallStackDepth(t,s),this.breakStepType=BreakStepType.NextSticky,"true";case RequestMethod.EvaluateOnCallFrame:return this.stickyNotSendPaused=!0,this.evaluateOnCallFrameExpression=s.expression,this.breakStepType=BreakStepType.NextSticky,"(function(){\n var tyroRet,tyroErr;\n try{tyroRet=eval(Agent.getEvaluateOnCallFrameExpression())}\n catch(e){tyroErr=e}\n Agent.evaluateOnCallFrame("+t+",tyroRet,tyroErr,"+s.generatePreview+");\n return true;\n })()";case RequestMethod.GetProperties:return this.stickyNotSendPaused=!0,this.getProperties(t,s,!0),this.breakStepType=BreakStepType.NextSticky,"true";default:return this.breakStepType=BreakStepType.NextSticky,"true"}},StickyFinger.prototype.handleStickyAsync=function(e){var t=e.id,n=e.method,s=e.params;switch(this.originConsoleAPI.log("[tyro-agent] handleStickyAsync "+t+", "+n+", "+s),n){case RequestMethod.DiscardConsoleEntries:this.originConsoleAPI.log("[tyro-agent] DiscardConsoleEntries success");break;case RequestMethod.Evaluate:this.originConsoleAPI.log("[tyro-agent] Evaluate start, expression "+s.expression);var i=this.evaluate(this.globalExecutionContext,t,s);this.originConsoleAPI.log("[tyro-agent] Evaluate success, expression "+s.expression+", result "+TyroUtil.safeJSONStringify(i));break;case RequestMethod.CallFunctionOn:this.originConsoleAPI.log("[tyro-agent] CallFunctionOn TODO stickyAsync");break;case RequestMethod.CompileScript:this.originConsoleAPI.log("[tyro-agent] CompileScript success, params "+TyroUtil.safeJSONStringify(s));break;case RequestMethod.SetBreakpointsActive:this.breakpointsActive=s.active,this.originConsoleAPI.log("[tyro-agent] SetBreakpointsActive success, breakpointsActive "+this.breakpointsActive);break;case RequestMethod.SetSkipAllPauses:this.skipAllPauses=s.skip,this.originConsoleAPI.log("[tyro-agent] SetSkipAllPauses success, skipAllPauses "+this.skipAllPauses);break;case RequestMethod.Pause:this.breakStepType=BreakStepType.NextSticky,this.originConsoleAPI.log("[tyro-agent] Pause success");break;case RequestMethod.GetPossibleBreakpoints:this.getPossibleBreakpoints(t,s);break;case RequestMethod.SetBreakpointByUrl:this.setBreakpointByUrl(t,s);break;case RequestMethod.SetBreakpoint:this.setBreakpoint(t,s);break;case RequestMethod.RemoveBreakpoint:this.removeBreakpoint(t,s);break;case RequestMethod.SetPauseOnExceptions:this.setPauseOnExceptions(t,s);break;case RequestMethod.SetAsyncCallStackDepth:this.setAsyncCallStackDepth(t,s);break;case RequestMethod.GetProperties:this.getProperties(t,s)}},StickyFinger.prototype.objectToRemoteObject=function(e,t,n){var s={};if(isError(e)&&(t=e),t)return error2RemoteObject(t);switch(s.type=typeof e,s.type){case"undefined":break;case"object":if(null===e){s.subtype="null",s.value=null;break}if(void 0!==e.constructor&&(s.className=e.constructor.name),void 0!==e.toString)try{s.description=e.toString()}catch(e){s.description="[object Object]"}else s.description="[object Object]";if(this.generateObjectId+=1,s.objectId=String(this.generateObjectId),this.objectMap[String(this.generateObjectId)]=e,n)for(var i in s.preview={type:"object",description:"Object",overflow:!1,properties:[]},e){var r=typeof e[i];s.preview.properties.push({name:i,type:r,value:"object"===r?"Object":"function"===r?"":e[i]})}break;case"function":s.description=e.toString(),s.className="Function";break;default:s.value=e,s.description=e.toString()}return s},StickyFinger.prototype.evaluateOnCallFrame=function(e,t,n,s){var i=this.objectToRemoteObject(t,n,s);return this.xhrSend(ResponseEvent.ById,{result:i},e,!0),i},StickyFinger.prototype.evaluate=function(executionContext,id,params){var returnValue,error;try{returnValue=function(expression){return"function"==typeof eval?eval(expression):Agent.evalReference(expression)}.call(executionContext,params.expression)}catch(e){error=e}var result=this.objectToRemoteObject(returnValue,error,params.generatePreview);return this.xhrSend(ResponseEvent.ById,{result:result},id),result},StickyFinger.prototype.getPossibleBreakpoints=function(e,t,n){var s=t.scriptId,i=t.startLine,r=t.endLine===t.startLine?t.endLine+1:t.endLine,o={locations:[]};if(this.contextMap[s])for(var a=this.contextMap[s].stickyLine,c=i;c>>0)+u+++"__",e&&e.forEach&&e.forEach(this.add,this)}var g=l.prototype;g.add=function(e){var t=this.name;return e[t]||Object.defineProperty(e,t,{value:!0,writable:!0}),this},g.delete=function(e){return!!e[this.name]&&(e[this.name]=void 0,!0)},g.has=function(e){return!!e[this.name]};var f=l,d=self;var h="[DEBUG]";function _(){for(var e=[],t=0;t5e6||(this.opened?this.socket.send(t):this.messageBeforeSocketOpen.push(t))},t.prototype.onSocketMessage=function(e){},t.prototype.onSocketOpen=function(){var e=this;this.opened=!0,this.messageBeforeSocketOpen.length&&(this.messageBeforeSocketOpen.forEach((function(t){e.sendSocketMessage(t)})),this.messageBeforeSocketOpen=[])},t.prototype.onSocketClose=function(){this.opened=!1,console.log("[DEBUG] connection closed")},t.prototype.onSocketError=function(e){console.error("[DEBUG] connection onerror",e)},t}(D),R=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.messageBeforeSocketOpen=[],t}return L(t,e),t.prototype.open=function(){var e=this;this.socketTask=AFAppX.bridge.connectSocket({url:this.url,multiple:!0,fail:function(t){e.onSocketError(t)}}),this.socketTask.onOpen((function(){e.handleSocketOpen()})),this.socketTask.onError((function(t){e.onSocketError(t.data)})),this.socketTask.onClose((function(){e.opened=!1,e.onSocketClose()})),this.socketTask.onMessage((function(t){e.opened||e.handleSocketOpen(),e.onSocketMessage(t.data.data)}))},t.prototype.sendSocketMessage=function(e){var t="string"==typeof e?e:JSON.stringify(e);t.length>5e6||(this.opened?this.socketTask.send({data:t,isBuffer:!1}):this.messageBeforeSocketOpen.push(t))},t.prototype.close=function(){this.opened&&this.socketTask.close()},t.prototype.onSocketMessage=function(e){},t.prototype.onSocketOpen=function(){},t.prototype.onSocketError=function(e){},t.prototype.onSocketClose=function(){},t.prototype.handleSocketOpen=function(){var e=this;this.opened||(this.opened=!0,this.messageBeforeSocketOpen.length&&(this.messageBeforeSocketOpen.forEach((function(t){e.sendSocketMessage(t)})),this.messageBeforeSocketOpen=[]),this.onSocketOpen())},t}(D),j=function(){this.channelConfigKey="0",this.silentMode=!1,this.userAgent="undefined"!=typeof navigator?navigator.swuserAgent||navigator.userAgent:"",this.isIOS=/iPhone|iPad|iOS/i.test(this.userAgent),this.isLyra=/LyraVM/i.test(this.userAgent),this.startupParams=b(),this.channelId=this.startupParams.channelId,"string"==typeof __BUGME_EXTERNAL_CHANNEL__&&__BUGME_EXTERNAL_CHANNEL__&&(this.channelId=__BUGME_EXTERNAL_CHANNEL__,this.silentMode=!0),this.isLyra&&(this.silentMode=!0),this.startupParams.remoteCh&&(this.channelConfigKey=String(this.startupParams.remoteCh))},N=function(){function e(){this.records=new Map}return e.prototype.setRequest=function(e,t){this.records.set(e,P(P({},this.records.get(e)||{}),t))},e.prototype.getRequest=function(e){return this.records.get(e)},e.prototype.removeRequest=function(e){this.records.has(e)&&this.records.delete(e)},e}(),B=function(){function e(e){void 0===e&&(e=[]),this._messageQueue=e,this._queueSize=0,this.isApplogEnabled=!1}return e.prototype.push=function(e){this._queueSize;var t=function(e){var t="string"==typeof e?e:JSON.stringify(e);return t.length>5e6?void console.warn("abort send websocket message due to size:",t.length):t}(e);null!=t&&(this._messageQueue.push(t),this._queueSize+=t.length)},e.prototype.sendQueuedMessages=function(){if(0!==this._messageQueue.length){var e=M().getWorkerSocket();e&&(this._messageQueue.forEach((function(t){return e.send(t)})),this._messageQueue=[],this._queueSize=0)}},e.prototype.setApplogEnabled=function(e){this.isApplogEnabled=e},e}(),T=function(){function e(){}return e.prototype.getAgentContext=function(){return this.agentContext||(this.agentContext=new j),this.agentContext},e.prototype.setWorkerSocket=function(e){this.workerSocket=e},e.prototype.getWorkerSocket=function(){return this.workerSocket},e.prototype.getNetworkRecorder=function(){return this.networkRecorder||(this.networkRecorder=new N),this.networkRecorder},e.prototype.getMessageQueue=function(){return null==this.messageQueue&&(this.messageQueue=new B),this.messageQueue},e}();function M(){return w||(w=new T),w}var I=function(e,t,n,o,r){var i,a,s=null,c=0;r||(r={});var p=function(){c=!1===r.leading?0:Date.now(),s=null,a=e.apply(null,i),i=null};return function(){for(var u=[],l=0;lt?(o(s),s=null,c=g,a=e.apply(null,i),i=null):s||!1===r.trailing||(s=n(p,f)),a}}((function(){var e=M().getWorkerSocket();e&&e.send({method:n.DataChanged,ext:{origin:p.Data}})}),300,setTimeout,clearTimeout);function X(e){if(d.__APPX_DEVTOOLS_GLOBAL_HOOK__&&d.__APPX_DEVTOOLS_GLOBAL_HOOK__[e]&&"function"==typeof d.__APPX_DEVTOOLS_GLOBAL_HOOK__[e])return d.__APPX_DEVTOOLS_GLOBAL_HOOK__[e]}var G=console.error;function q(){null==d.__APPX_DEVTOOLS_GLOBAL_HOOK__&&(d.__APPX_DEVTOOLS_GLOBAL_HOOK__={});var e={onSetData:X("onSetData"),onSetDataCallback:X("onSetDataCallback"),onApiSyncCall:X("onApiSyncCall"),onApiSyncCallback:X("onApiSyncCallback"),onApiCall:X("onApiCall"),onApiCallback:X("onApiCallback"),onError:X("onError")};d.__APPX_DEVTOOLS_GLOBAL_HOOK__.onSetData=function(t){try{if(e.onSetData)try{e.onSetData.call(d.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){y(e)}I(),W({method:a.SetData,params:F(t),ext:{origin:p.AppLog}})}catch(e){}},d.__APPX_DEVTOOLS_GLOBAL_HOOK__.onSetDataCallback=function(t){try{if(e.onSetDataCallback)try{e.onSetDataCallback.call(d.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){y(e)}W({method:a.SetDataCallback,params:t,ext:{origin:p.AppLog}})}catch(e){}},d.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiSyncCall=function(t){try{if(e.onApiSyncCall)try{e.onApiSyncCall.call(d.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){y(e)}W({method:a.ApiSyncCall,params:H(t),ext:{origin:p.AppLog}})}catch(e){}},d.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiSyncCallback=function(t){try{if(e.onApiSyncCallback)try{e.onApiSyncCallback.call(d.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){y(e)}W({method:a.ApiSyncCallback,params:H(t),ext:{origin:p.AppLog}})}catch(e){}},d.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiCall=function(t){try{if(e.onApiCall)try{e.onApiCall.call(d.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){y(e)}W({method:a.ApiCall,params:H(t),ext:{origin:p.AppLog}})}catch(e){}},d.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiCallback=function(t){try{if(e.onApiCallback)try{e.onApiCallback.call(d.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){y(e)}W({method:a.ApiCallback,params:H(t),ext:{origin:p.AppLog}})}catch(e){}},d.__APPX_DEVTOOLS_GLOBAL_HOOK__.onError=function(t){try{if(e.onError)try{e.onError.call(d.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){}!function(e){var t=new Error(e.formatted.message);t.stack=e.formatted.stack,setTimeout(G.bind(console,t))}(t)}catch(e){}},function(e,t){for(var n=["onPageLoad","onPageShow","onPageHide","onPageReady","onPageUnload","onPageUpdate"],o=0,r=n;o5,properties:i.slice(0,5).map((function(e){return o.mapObjectProperty(e,r[e])})).filter(Boolean)}};return e instanceof Error?(t="error",n=e.stack):e instanceof Date?(t="date",n=e.toString()):e instanceof RegExp?(t="regexp",n=e.toString()):e instanceof Promise&&(t="promise",n="Promise"),t&&(c.subtype=t,c.preview&&(c.preview.subtype=t)),n&&(c.description=n,c.preview&&(c.preview.description=n)),c},e.prototype.mapArray=function(e){var t="Array("+e.length+")";return{type:"object",subtype:"array",className:"Array",description:t,objectId:this.objectStore.save(e),preview:{type:"object",subtype:"array",description:t,overflow:!1,properties:this.mapArrayProperties(e)}}},e.prototype.mapArrayProperties=function(e){return e.map((function(e,t){if("function"==typeof e)return{name:String(t),type:"function",value:""};var n={name:String(t),type:typeof e,value:"object"==typeof e&&e?e.constructor&&e.constructor.name||"Object":String(e)};return null===e?n.subtype="null":Array.isArray(e)&&(n.subtype="array"),n}))},e.prototype.mapObjectProperty=function(e,t){if(t.get)return{name:e,type:"accessor"};if(!t.set){var n=t.value;switch(typeof n){case"object":return Array.isArray(n)?{name:e,type:"object",subtype:"array",value:"Array("+n.length+")"}:null===n?{name:e,type:"object",subtype:"null",value:"null"}:{name:e,type:"object",value:n.constructor?n.constructor.name:"Object"};case"function":return{type:"function",value:"",name:e};default:return{name:e,type:typeof n,value:String(n)}}}},e}(),z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype.mapFrom=function(e){var t=this;return e.split("\n").slice(2).map((function(e,n){return t.testType1(e)?t.extractType1(e):t.testType2(e)?t.extractType2(e):void 0})).filter((function(e){return null!=e}))},t}(function(){function e(){this.e1=/\s*at\s(\S+)\s(\S+)\:(\d+)\:(\d+)\)/,this.e2=/\s*at\s(\S+)\:(\d+)\:(\d+)/}return e.prototype.testType1=function(e){return this.e1.test(e)},e.prototype.testType2=function(e){return this.e2.test(e)},e.prototype.extractType1=function(e){var t=e.match(this.e1);return null==t?null:{functionName:t[1],url:t[2].slice(1),lineNumber:Number(t[3]),columnNumber:Number(t[4])}},e.prototype.extractType2=function(e){var t=e.match(this.e2);return null==t?null:{functionName:"",url:t[1].slice(1),lineNumber:Number(t[2]),columnNumber:Number(t[3])}},e}()),Q=function(){function e(){this.id=0,this.id2Object=new Map,this.object2Id=new Map}return e.prototype.save=function(e){if(this.object2Id.has(e))return this.object2Id.get(e);var t=this.getNextObjectId();return this.id2Object.set(t,e),this.object2Id.set(e,t),t},e.prototype.query=function(e){return this.id2Object.get(e)},e.prototype.clear=function(e){var t=this.id2Object.get(e);t&&(this.id2Object.delete(e),this.object2Id.delete(t))},e.prototype.clearAll=function(){this.id2Object.clear(),this.object2Id.clear()},e.prototype.getNextObjectId=function(){return this.id++,'{"injectedScriptId":1,"id":'+this.id+"}"},e}(),J=function(){function e(e,t){this.objectStore=e,this.objectMapper=t}return e.prototype.handle=function(e){var t=this.objectStore.query(e.objectId);return t?{result:this.mapObject(t,Boolean(e.ownProperties),Boolean(e.accessorPropertiesOnly))}:{result:[]}},e.prototype.mapObject=function(e,t,n){var o=this;if(t){var r=Object.getOwnPropertyDescriptors(e),i=Object.keys(r).filter((function(e){return!(n&&!r[e].get&&!r[e].set)})).map((function(e){return o.mapResultOne(e,r[e],!0)}));return e.__proto__&&i.push(this.mapResultOne("__proto__",{configurable:!0,enumerable:!1,writable:!0,value:e.__proto__},!0)),i}for(var a=[],s={},c=e,p=!1,u=!0,l=function(){var e=Object.getOwnPropertyDescriptors(c);if(Object.keys(e).forEach((function(t){if(!s[t]){s[t]=!0;var r=e[t];(!n||r.get||r.set)&&a.push(o.mapResultOne(t,r,u))}})),!p){var t=Object.getOwnPropertyDescriptor(c,"__proto__");t&&(p=!0,a.push(g.mapResultOne("__proto__",t,u)))}c=c.__proto__,u=!1},g=this;c;)l();return a},e.prototype.mapResultOne=function(e,t,n){var o={writable:t.writable,configurable:Boolean(t.configurable),enumerable:Boolean(t.enumerable),isOwn:n,name:String(e)};return"value"in t&&(o.value=this.objectMapper.mapFromOne(t.value)),t.get&&(o.get=this.objectMapper.mapFromOne(t.get)),t.set&&(o.set=this.objectMapper.mapFromOne(t.set)),o},e}(),$=function(){function e(){this.objectStore=new Q,this.objectMapper=new U(this.objectStore),this.callFramesMapper=new z,this.getPropertiesHandler=new J(this.objectStore,this.objectMapper)}return e.prototype.parseObject=function(e){return this.objectMapper.mapFromOne(e)},e.prototype.getProperties=function(e){return this.getPropertiesHandler.handle(e)},e.prototype.getObjectById=function(e){return this.objectStore.query(e)},e.prototype.consoleAPICalled=function(e,t,n){var o=e;return"warn"===e&&(o="warning"),{method:"Runtime.consoleAPICalled",params:{type:o,args:this.objectMapper.mapFrom(n),executionContextId:1,timestamp:Date.now(),stackTrace:{callFrames:this.callFramesMapper.mapFrom(t)}}}},e}();function Y(){var e="string"==typeof __BUGME_EXTERNAL_CHANNEL__&&__BUGME_EXTERNAL_CHANNEL__||"boolean"==typeof __BUGME_CONSOLE_ENABLE__&&__BUGME_CONSOLE_ENABLE__;console.log("[tinybugme] override console",e),e&&(V=new te).overrideConsole()}function Z(){return V}var ee,te=function(){function e(){this.executionContextId=1,this.messageBeforeAgentInit=[],this.webSocketCheckingLoop=!1,this.parser=new $,this.createExecutionContext()}return e.prototype.createExecutionContext=function(){this.sendMesasge({method:s.executionContextsCleared,params:{}}),this.sendMesasge({method:s.executionContextCreated,params:{context:{id:this.executionContextId,origin:"app://",name:"app"}}})},e.prototype.overrideConsole=function(){var e=this,t=this;Object.defineProperties(console,["debug","log","info","warn","error"].reduce((function(n,o){var r=console[o].bind(console),i=e;return n[o]={value:function(){var e=arguments;try{var n=/^(\[framework\]|dispatchEvent|onMessage push|unsupported protocol)/;if(e.length&&"string"==typeof e[0]&&n.test(e[0]))return r.apply(null,e);var a=new Error;a.stack&&t.sendMesasge(i.parser.consoleAPICalled(o,a.stack,e))}catch(e){}return r.apply(null,e)}},n}),{}))},e.prototype.sendMesasge=function(e){var t=M().getWorkerSocket();t?(this.flushPendingMessasges(),t.sendAfterReceivingMessage(e)):(this.messageBeforeAgentInit.push(e),this.checkWebSocketReady())},e.prototype.flushPendingMessasges=function(){if(this.messageBeforeAgentInit.length){var e=M().getWorkerSocket();e&&(this.messageBeforeAgentInit.forEach((function(t){e.sendAfterReceivingMessage(t)})),this.messageBeforeAgentInit=[])}},e.prototype.checkWebSocketReady=function(){var e=this;if(!this.webSocketCheckingLoop){this.webSocketCheckingLoop=!0;var t=setInterval((function(){M().getWorkerSocket()&&(clearInterval(t),e.flushPendingMessasges())}),1e3)}},e}();function ne(e){if(M().getAgentContext().silentMode)return!1;var t="";switch(e){case ee.Connecting:t="准备中";break;case ee.Connected:t="已连接";break;case ee.Reconnecting:t="重试中";break;case ee.Disconnected:t="已断开"}e===ee.Reconnecting&&(e=ee.Connecting),AFAppX.bridge.call("showRemoteDebugPanel",{status:e,text:"真机调试"+t,buttonTitle:"退出"})}!function(e){e.Connecting="connecting",e.Connected="connected",e.Disconnected="disconnected",e.Reconnecting="reconnecting"}(ee||(ee={}));var oe=Object.freeze({__proto__:null,enable:function(e){M().getWorkerSocket().send({id:e.id,result:{}})},getResponseBody:function(e){var t=e.params.requestId,n=M(),o=n.getNetworkRecorder(),r=o.getRequest(t);r?n.getWorkerSocket().send({id:e.id,result:{base64Encoded:r.isBase64Body,body:r.responseBody}}):n.getWorkerSocket().send({id:e.id,result:{}}),o.removeRequest(t)}});var re="function"==typeof __eval?__eval:"function"==typeof eval?eval:function(){};var ie=Object.freeze({__proto__:null,enable:function(e){M().getWorkerSocket().send({id:e.id,result:{}});var t=Z();t&&t.createExecutionContext()},getProperties:function(e){var t=Z();t&&M().getWorkerSocket().send({id:e.id,result:t.parser.getProperties(e.params)})},compileScript:function(e){M().getWorkerSocket().send({id:e.id,result:{}})},evaluate:function(e){var t=Z();if(t){var n=t.parser;try{var o=re(e.params.expression);M().getWorkerSocket().send({id:e.id,result:{result:n.parseObject(o)}})}catch(t){t.stack=t.name+": "+t.message,M().getWorkerSocket().send({id:e.id,result:{exceptionDetails:{columnNumber:20,exception:n.parseObject(t),exceptionId:1,lineNumber:0,text:"Uncaught"},result:n.parseObject(t)}})}}}});var ae=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){function n(e,t){var n=[],o=[];return null==t&&(t=function(e,t){return n[0]===t?"[Circular ~]":"[Circular ~."+o.slice(0,n.indexOf(t)).join(".")+"]"}),function(r,i){if(n.length>0){var a=n.indexOf(this);~a?n.splice(a+1):n.push(this),~a?o.splice(a,1/0,r):o.push(r),~n.indexOf(i)&&(i=t.call(this,r,i))}else n.push(i);return null==e?i:e.call(this,r,i)}}(e.exports=function(e,t,o,r){return JSON.stringify(e,n(t,r),o)}).getSerialize=n}));ae.getSerialize;var se=Object.freeze({__proto__:null,getPagesData:function(e){var t=d.getCurrentPages().filter(Boolean).map((function(e){return{viewId:e.$viewId,data:ae(e.data),route:e.route}}));M().getWorkerSocket().send({id:e.id,ext:e.ext,result:{data:t}})},setPageData:function(e){var t=e.params,n=void 0===t?{}:t,o=n.viewId,r=n.data,i=d.getCurrentPages().filter((function(e){return e&&""+e.$viewId===o}))[0];i&&r&&i.setData(r)}});var ce=Object.freeze({__proto__:null,getStorageInfo:function(e){var t=AFAppX.bridge.getStorageInfoSync(),n=t.keys.map((function(e){var t=AFAppX.bridge.getStorageSync({key:e}).data;return{key:e,value:t,type:typeof t}}));M().getWorkerSocket().send({id:e.id,ext:e.ext,result:{currentSize:t.currentSize,limitSize:t.limitSize,data:n}})},clearStorage:function(e){AFAppX.bridge.clearStorageSync()},removeStorage:function(e){var t=e.params,n=void 0===t?{}:t;n.key&&AFAppX.bridge.removeStorageSync({key:n.key})},setStorage:function(e){var t=e.params,n=void 0===t?{}:t;n.key&&AFAppX.bridge.setStorageSync({key:n.key,data:n.value})}});var pe=Object.freeze({__proto__:null,enable:function(){var e=M().getMessageQueue();e.setApplogEnabled(!0),e.sendQueuedMessages()}});var ue=Object.freeze({__proto__:null,Data:se,Storage:ce,Applog:pe,ping:function(e){M().getWorkerSocket().send({id:e.id,result:{}})},getSystemInfo:function(e){var t=AFAppX.bridge.getSystemInfoSync(),n={userAgent:M().getAgentContext().userAgent,sdkVersion:AFAppX.bridge.SDKVersion,alipayVersion:t.version,model:t.model,system:t.system};M().getWorkerSocket().send({id:e.id,result:n})},getStartupParams:function(e){var t=b();M().getWorkerSocket().send({id:e.id,result:t})}});var le=Object.freeze({__proto__:null,getResourceTree:function(e){M().getWorkerSocket().send({id:e.id,result:{}})}}),ge=Object.freeze({__proto__:null,Network:oe,Runtime:ie,Tiny:ue,Page:le}),fe=!1;if("undefined"!=typeof WebSocket&&WebSocket.OPEN){fe=!0;try{delete d.WebSocket}catch(_){}}var de=function(e){function t(t){var n=e.call(this,t)||this;return n.isMessageReceived=!1,n.isSocketOpenedOnce=!1,n.messageBeforeReceived=[],n.isDebugExited=!1,ne(ee.Connecting),n}return L(t,e),t.prototype.send=function(e){return this.sendSocketMessage(e)},t.prototype.sendAfterReceivingMessage=function(e){this.isMessageReceived?this.send(e):this.messageBeforeReceived.push("string"==typeof e?e:JSON.stringify(e))},t.prototype.exitDebug=function(){this.isDebugExited=!0,ne(ee.Disconnected),this.close(),!fe&&M().getAgentContext().isIOS&&[1,2].forEach((function(e){AFAppX.bridge.call("closeSocket",{socketTaskId:e})}))},t.prototype.onSocketOpen=function(){e.prototype.onSocketOpen.call(this),this.isSocketOpenedOnce=!0,clearInterval(this.reconnectInterval),this.send({method:i.Enable,params:{},ext:{origin:p.AppLog}}),this.send({method:n.DataChanged,ext:{origin:p.Data}})},t.prototype.onSocketClose=function(){e.prototype.onSocketClose.call(this),this.isDebugExited||this.reconnect()},t.prototype.onSocketError=function(e){this.isSocketOpenedOnce||M().getAgentContext().silentMode||(ne(ee.Disconnected),AFAppX.bridge.showToast({content:"本次真机调试已结束,请重新生成调试版本",duration:2e3,success:function(){}}))},t.prototype.onSocketMessage=function(e){var t,n=this;this.isMessageReceived||(this.isMessageReceived=!0,this.messageBeforeReceived.forEach((function(e){n.send(e)})),this.messageBeforeReceived=[]);try{t=JSON.parse(e)}catch(t){return void("CLIENT:JOIN"===e?ne(ee.Connected):"CLIENT:LEAVE"===e&&this.exitDebug())}var o=function(e){if(!e)return;for(var t=e.split("."),n=ge,o=0,r=t;o - 我的K币:{{0}}K币 + 我的K币:{{egoldNum}}K币 @@ -32,23 +32,26 @@ 购买须知 - + - - - + + + - 199.9元 + {{item.price}}元 - 37621K币 + {{item.egold}}K币 - - 多送20元K币 + + 多送{{item.giveegold}}K币 + + + {{item.poster}} @@ -59,26 +62,6 @@ - - - - - - {{backInfo.price || 0}} - - {{ backInfo.zbegold || 0 }} - - - - - {{ backInfo.egold || 0 }} - K币 - - - - - - - - + + \ No newline at end of file diff --git a/components/myPay/myPay.js b/components/myPay/myPay.js index 170bac0..55d241f 100644 --- a/components/myPay/myPay.js +++ b/components/myPay/myPay.js @@ -1,52 +1,147 @@ import { imageBasUrl } from '../../utils/config'; import { storagePaymentBack } from '../../utils/utils'; var plugin = requirePlugin("myPlugin"); +const { httpRequest } = getApp(); Component({ mixins: [], data: { imageBasUrl, backShow: false, - backInfo: {} + backInfo: {}, + payList: [], + egoldNum: 0, + payListId: '' }, props: { popupShow: true, onClosePopup: { type: Function, - value: () => { } + value: (mi) => { + + } } }, didMount() { - console.log(5465465465) + const paramenter = { + path: '/paysetting', + method: 'GET', + } + httpRequest(paramenter).then(res => { + if (res.status == 1 && Array.isArray(res.data.list)) { + const payListId = res.data.list[0].id; + this.setData({ + payList: res.data.list, + egoldNum: res.data.egoldNum, + payListId: payListId + }) + } + }) }, didUpdate() { }, didUnmount() { }, methods: { closePopup() { - const storageData = my.getStorageSync({ key: 'paymentBack' }).data; - if (storageData && storageData.paymentBack) { - storagePaymentBack(false); - this.props.onClosePopup(); - } else { - storagePaymentBack(true); - // this.http.get('/payback').then(res => { - // res.isBack = 1; - // this.backInfo = res; - // this.payList.unshift(res); - // }); - this.setData({ - backShow: true - }) - } + // const storageData = my.getStorageSync({ key: 'paymentBack' }).data; + // if (storageData && storageData.paymentBack) { + // storagePaymentBack(false); + this.props.onClosePopup({}); + // } else { + // storagePaymentBack(true); + // this.http.get('/payback').then(res => { + // res.isBack = 1; + // this.backInfo = res; + // this.payList.unshift(res); + // }); + // this.setData({ + // backShow: true + // }) + // } }, - payItem() { - // const bsPayItem = await this.http.get('/iosPayment'); - // const platform = uni.getSystemInfoSync().platform; - // if (platform === 'ios' && bsPayItem.status === 1) { - // this.fui.toast('暂不支持IOS支付'); - // return; - // } + payItem(ev) { + const item = ev.currentTarget.dataset.item; + this.setData({ + payListId: item.id + }) + plugin.tb.virtualTrade({ + itemId: item.item_id, + complete: (res) => { + // if (res.resultCode == '9000') { + const paramenter = { + path: '/taobaonotify', + method: 'POST', + body: { + orderId: res.orderId, + id: item.id, + resultCode: res.resultCode, + } + } + httpRequest(paramenter).then(result => { + let content = ''; + if (res.resultCode == '9000') { + content = '支付成功' + } else { + content = '支付失败' + } + my.showToast({ + type: 'none', + content: res.memo || content, + }); + this.props.onClosePopup({ resultCode: res.resultCode }); + }) + // } + } + // fail: (err) => { + // console.log(err, "errerr") + // if (res.resultCode == '9000') { + // const paramenter = { + // path: '/taobaonotify', + // method: 'POST', + // body: { + // orderId: res.orderId, + // id: item.id, + // resultCode: res.resultCode, + // } + // } + // httpRequest(paramenter).then(result => { + // console.log(result, paramenter, "taobaonotify=========") + // my.showToast({ + // type: 'none', + // content: '支付成功', + // }); + // this.props.onClosePopup({ resultCode: res.resultCode }); + // }) + // } + // }, + // success: (res) => { + // console.log(res, "[[[[[[res") + // if (res.resultCode == '9000') { + // const paramenter = { + // path: '/taobaonotify', + // method: 'POST', + // body: { + // orderId: res.orderId, + // id: item.id, + // resultCode: res.resultCode, + // } + // } + // httpRequest(paramenter).then(result => { + // console.log(result, paramenter, "taobaonotify=========") + // my.showToast({ + // type: 'none', + // content: '支付成功', + // }); + // this.props.onClosePopup({ resultCode: res.resultCode }); + // }) + // } else { + // my.showToast({ + // type: 'none', + // content: res.memo || '支付失败' + // }); + // } + // } + }) }, closeBackShow() { diff --git a/pages/addqywx/addqywx.acss b/pages/addqywx/addqywx.acss deleted file mode 100644 index df807d2..0000000 --- a/pages/addqywx/addqywx.acss +++ /dev/null @@ -1,40 +0,0 @@ -page{ - width: 100%; - height: 100%; -} - -._addqywx_page_html { - width: 100%; - height: 100vh; -} - -._addqywx_page_body { - position: relative; - width: 100%; - height: 100%; -} - -._addqywx_pa_bo_image { - width: 100%; - height: 100%; -} - -._addqywx_pa_bo_code { - position: absolute; - left: 40rpx; - bottom: 40rpx; - display: flex; - flex-direction: column; - align-items: center; - z-index: 2; -} - -._shouzhi_image { - width: 154rpx; - height: 48rpx; -} - -._code_image { - width: 220rpx; - height: 220rpx; -} \ No newline at end of file diff --git a/pages/addqywx/addqywx.axml b/pages/addqywx/addqywx.axml deleted file mode 100644 index d9821c5..0000000 --- a/pages/addqywx/addqywx.axml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/pages/addqywx/addqywx.js b/pages/addqywx/addqywx.js deleted file mode 100644 index 030c3f3..0000000 --- a/pages/addqywx/addqywx.js +++ /dev/null @@ -1,22 +0,0 @@ -import { imageBasUrl } from '../../utils/config'; -const { httpRequest } = getApp(); - -Page({ - data: { - imageBasUrl, - codeImage: '' - }, - onShow() { - // .get('/getGuidecode') - const paramenter = { - path: '/getGuidecode', - method: 'GET', - } - httpRequest(paramenter).then(res => { - console.log(res, "getGuidecode") - this.setData({ - codeImage: res.data.code, - }) - }) - } -}) \ No newline at end of file diff --git a/pages/addqywx/addqywx.json b/pages/addqywx/addqywx.json deleted file mode 100644 index f433381..0000000 --- a/pages/addqywx/addqywx.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "defaultTitle": "联系客服" -} \ No newline at end of file diff --git a/pages/binge/binge.acss b/pages/binge/binge.acss index 3e8aa1f..55efcea 100644 --- a/pages/binge/binge.acss +++ b/pages/binge/binge.acss @@ -28,7 +28,7 @@ page, } ._bin_bo_sign_in_btn >text{ - font-size: 18rpx; + font-size: 22rpx; line-height: 1; color: #fff; } @@ -39,7 +39,7 @@ page, ._step_my_vido_warp { width: 100%; - padding: 40rpx 0 0 30rpx; + padding: 30rpx 0 20rpx 20rpx; background-color: #fff; border-radius: 16rpx; } @@ -47,27 +47,25 @@ page, ._vido_warp_header { display: flex; justify-content: space-between; + align-items: center; margin-bottom: 30rpx; - padding-right: 30rpx; + padding-right: 20rpx; } -._vi_wa_he_title { - padding-left: 16rpx; - border-left: 4rpx solid #CE3636; -} +._vi_wa_he_title {} ._vi_wa_he_title >text { line-height: 1; - font-size: 32rpx; + font-size: 30rpx; font-weight: 600; color: #333; } ._vi_wa_he_edit_t >text { line-height: 1; - font-size: 30rpx; + font-size: 26rpx; font-weight: 500; - color: #1a1a1a; + color: #999; margin-left: 6rpx; } @@ -78,8 +76,62 @@ page, ._pursue_item { width: 33.33%; - padding-right: 30rpx; - margin-bottom: 30rpx; + padding-right: 20rpx; + margin-bottom: 20rpx; +} + +._pursue_item_li { + width: 100%; + overflow: hidden; + position: relative; +} + +._pursue_it_li_img { + width: 100%; + height: 280rpx; + position: relative; +} + +._pursue_it_li_img_b { + display: block; + width: 100%; + height: 100%; + border-radius: 12rpx; +} + +._pursue_it_li_name { + font-size: 30rpx; + color: #333; + line-height: 1; + margin-top: 20rpx; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +._pursue_it_li_order { + font-size: 24rpx; + color: #999; + line-height: 1; + margin-top: 20rpx; +} + +._pursue_item_li_del { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + display: flex; + justify-content: center; + align-items: center; + background-color: rgba(0, 0, 0, 0.4); + border-radius: 12rpx; +} + +._pursue_item_li_del_text { + font-size: 30rpx; + color: #fff; } .my_footer { diff --git a/pages/binge/binge.axml b/pages/binge/binge.axml index f452e0a..311ee5d 100644 --- a/pages/binge/binge.axml +++ b/pages/binge/binge.axml @@ -16,6 +16,7 @@ 我的追剧 + @@ -26,12 +27,30 @@ + - - - - + + + + + + + + + + 删除 + + + + + {{item.name}} + + + 观看至第{{item.history}}集 + + + @@ -55,8 +74,15 @@ - - + + + + + + + {{item.name}} + + diff --git a/pages/binge/binge.js b/pages/binge/binge.js index c4a5f5a..c17343f 100644 --- a/pages/binge/binge.js +++ b/pages/binge/binge.js @@ -22,7 +22,6 @@ Page({ // } } httpRequest(paramenter).then(res => { - console.log(res, "chasingdrama") if (res.status == 1) { const { data } = res; this.setData({ @@ -41,7 +40,6 @@ Page({ method: 'GET', } httpRequest(paramenter).then(res => { - console.log(res, "signin") if (res.status == 1) { const { data } = res; my.showToast({ @@ -70,7 +68,6 @@ Page({ } } httpRequest(paramenter).then(res => { - console.log(res, "chasingdramadel") const temp = bookcase.filter(r => r.id !== data.id); if (res.status == 1) { this.setData({ @@ -78,7 +75,7 @@ Page({ }) my.showToast({ content: '删除成功!', - duration: 3000, + duration: 1000, }); } }) @@ -86,9 +83,21 @@ Page({ toPathVideo(event) { const data = event.target.dataset.item; - my.navigateTo({ - url: `/pages/video/video?sid=${data.bookid || data.id}` - }); + const isEdit = this.data.isEdit; + if (isEdit) { + this.onDelItem(data); + } else { + my.navigateTo({ + url: `/pages/video/video?sid=${data.bookid || data.id}` + }); + } + }, + onHide() { + this.setData({ + isEdit: false + }) + } + }) \ No newline at end of file diff --git a/pages/give/give.acss b/pages/give/give.acss index 94d548e..faa0e89 100644 --- a/pages/give/give.acss +++ b/pages/give/give.acss @@ -11,16 +11,22 @@ page { flex-direction: column; justify-content: center; width: 100%; - height: 130rpx; + /* height: 130rpx; */ background-color: #fff; border-radius: 18rpx; - padding: 0 24rpx; + padding: 30rpx 24rpx; + margin-bottom: 30rpx; } ._g_li_wa_item { - display: flex; - justify-content: space-between; - align-items: center; + /* display: flex; */ + /* justify-content: space-between; */ + /* align-items: center; */ +} + +._g_wa_le_over { + line-height: 1; + margin-bottom: 20rpx; } ._g_wa_le_over >text { diff --git a/pages/give/give.axml b/pages/give/give.axml index c28a57a..2a065c2 100644 --- a/pages/give/give.axml +++ b/pages/give/give.axml @@ -7,20 +7,19 @@ - 余额: {{ item.over || 0 }} + 赠币余额: {{ item.over || 0 }} + + + 赠币数量: +{{ item.egold || 0 }} + + + 赠币时间: {{ item.addtime || 0 }} - +{{ item.egold || 0 }} - - - - - {{ item.addtime || "6666" }} - - - {{ item.text || "66" }} + 到期时间: {{ item.text || '' }} + @@ -33,4 +32,4 @@ -" \ No newline at end of file + \ No newline at end of file diff --git a/pages/give/give.js b/pages/give/give.js index 74b2fb6..14bd4c8 100644 --- a/pages/give/give.js +++ b/pages/give/give.js @@ -1,10 +1,30 @@ +const { httpRequest } = getApp(); + Page({ data: { giveList: [], - giveFlag: true + giveFlag: false }, - onLoad(query) { - console.log('page onLoad', query) - }, - onShow() { } + onShow() { + + my.showLoading({ + content: '加载中...', + }); + + const paramenter = { + path: '/getgivelist', + method: 'POST', + } + + httpRequest(paramenter).then(res => { + my.hideLoading(); + if (res.status == 1 && Array.isArray(res.data)) { + this.setData({ + giveList: res.data, + giveFlag: true + }) + } + }) + + } }) \ No newline at end of file diff --git a/pages/history/history.acss b/pages/history/history.acss index a2ea949..39485d0 100644 --- a/pages/history/history.acss +++ b/pages/history/history.acss @@ -2,6 +2,10 @@ page { background-color: #F1F4FA; } +._history_html { + background-color: #F1F4FA; +} + ._history_page_body { padding: 30rpx; } @@ -10,6 +14,7 @@ page { display: flex; background-color: #fff; border-radius: 18rpx; + margin-bottom: 30rpx; } ._bx_li_wa_left { @@ -17,8 +22,16 @@ page { } ._li_wa_le_image { - width: 236rpx; - height: 236rpx; + width: 206rpx; + height: 280rpx; + margin-right: 30rpx; +} + +._li_wa_le_image ._is_image_s { + display: block; + width: 100%; + height: 100%; + border-radius: 12rpx 0 0 12rpx; } ._bx_li_wa_right { @@ -36,20 +49,28 @@ page { color: #1a1a1a; } +._li_wa_ri_spectate { + margin-top: 30rpx; +} + ._li_wa_ri_spectate > text { line-height: 1; - font-size: 30rpx; + font-size: 26rpx; font-weight: 400; color: #666666; } ._li_wa_ri_spectate .order { - color: #333333; + color: #666666; +} + +._li_wa_ri_update { + margin-top: 30rpx; } ._li_wa_ri_update > text { line-height: 1; - font-size: 30rpx; + font-size: 26rpx; font-weight: 400; - color: #333333; + color: #666666; } diff --git a/pages/history/history.axml b/pages/history/history.axml index fe24370..49fc5a2 100644 --- a/pages/history/history.axml +++ b/pages/history/history.axml @@ -4,10 +4,10 @@ - + - + @@ -16,12 +16,12 @@ {{item.name || '-'}} - + 观看到 第{{ item.order || 0 }}集 - + 更新至{{ item.latestid }}集 diff --git a/pages/history/history.js b/pages/history/history.js index d8237a1..609d560 100644 --- a/pages/history/history.js +++ b/pages/history/history.js @@ -1,16 +1,33 @@ +const { httpRequest } = getApp(); + Page({ data: { historyList: [], - listFlag: true + listFlag: false }, - onLoad(query) { - console.log('page onLoad', query) + onShow() { + my.showLoading({ + content: '加载中...', + }); + const paramenter = { + path: '/history', + method: 'GET', + } + httpRequest(paramenter).then(res => { + my.hideLoading() + if (res.status == 1 && Array.isArray(res.data)) { + this.setData({ + historyList: res.data, + listFlag: true + }) + } + }) + }, - onShow() { }, toGetVideo(event) { const data = event.target.dataset.item; my.navigateTo({ - url: `/pages/video/index?sid=${data.id}&id=${data.chapterid || ""}`, + url: `/pages/video/video?sid=${data.sid}&id=${data.chapterid || ""}`, }); } }) \ No newline at end of file diff --git a/pages/index/components/recommend/recommend.acss b/pages/index/components/recommend/recommend.acss deleted file mode 100644 index 3af5a75..0000000 --- a/pages/index/components/recommend/recommend.acss +++ /dev/null @@ -1,191 +0,0 @@ - - -._banner_warp { - position: relative; - width: 100%; - height: 724rpx; -} - -._banner_swiper { - /* position: absolute;_bou_scr_ul_name - top: 0; */ - width: 100%; - height: 724rpx; -} - -._ba_swiper_item { - width: 100%; - height: 100%; -} - -._banner_search_warp { - display: flex; - align-items: center; - position: absolute; - top: 24rpx; - left: 24rpx; - width: 500rpx; - height: 80rpx; - padding-left:16rpx; - background: rgba(255, 255, 255, 0.2); - border-radius: 5px; - z-index: 2; -} - -._search_placeholder > text { - line-height: 1; - color:rgba(0, 0, 0, 0.5); - font-size: 28rpx; - margin-left: 16rpx; -} - -._vido_list_content { - padding: 30rpx 0; -} - -._v_li_con_item { - padding: 0 30rpx; -} - -._li_con_item_header { - display: flex; - justify-content: space-between; - align-items: center; - padding: 40rpx 0; -} - -._it_head_title { - padding-left: 16rpx; - border-left: 4rpx solid #CE3636; -} - -._it_head_title> text { - line-height: 1; - font-size: 32rpx; - color: #1a1a1a; - font-weight: 600; -} - -._it_head_exit > text{ - line-height: 1; - font-size: 26rpx; - color: #999; -} - -._it_boutique_warp { - width: 100%; - margin-bottom: 30rpx; -} - -.scroll_view_H { - display: flex; - width: 100%; -} - -._bou_wa_scr_H { - width: 200rpx; - margin-right: 20rpx; -} - -._bou_scr_ul_image { - width: 200rpx; - height: 298rpx; - border-radius: 16rpx; -} - -._bou_scr_ul_name { - width: 100%; - margin-top: 20rpx; -} - -._bou_scr_ul_name >text{ - display: block; - width: 100%; - line-height: 1; - color: #1a1a1a; - font-size: 34rpx; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -} - -._it_think_warp { - display: flex; - flex-wrap: wrap; - width: 100%; -} - -._think__wa_ul { - min-width: 50%; - margin-bottom: 30rpx; -} - -._think__wa_ul.active_left { - padding-left: 15rpx; -} - -._think__wa_ul.active_right { - padding-right: 15rpx; -} - -._think__ul_li { - width: 100%; - background-color: #fff; - border-radius: 16rpx; -} - -._think__li_image { - height: 460rpx; -} - -._think__li_name { - display: block; - width: 100%; - padding: 30rpx 20rpx; - line-height: 1; - color: #1a1a1a; - font-size: 34rpx; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -} - -._v_li_heat_item { - padding-left: 30rpx; -} - -._it_heat_warp { - display: flex; - flex-wrap: wrap; -} - -._heat_wa_ul { - width: 33.33%; - margin-bottom: 30rpx; -} - -._heat__ul_li { - padding-right: 30rpx; -} - -._heat__li_image { - width: 100%; - height: 300rpx; - background-color: pink; -} - -._heat__li_name >text { - display: block; - width: 100%; - margin-top: 20rpx; - line-height: 1; - color: #1a1a1a; - font-size: 34rpx; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -} - -._rem_my_footer { - margin-top: 50rpx; -} \ No newline at end of file diff --git a/pages/index/components/recommend/recommend.axml b/pages/index/components/recommend/recommend.axml deleted file mode 100644 index 8760dce..0000000 --- a/pages/index/components/recommend/recommend.axml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - 寻找你喜欢的短剧 - - - - - - - - - 精品短剧 - - - 超级无敌好看剧集 - - - - - - - - - - - {{item.name}} - - - - - - - - - - - 全网热播 - - - - - - - - - - - - {{item.name}} - - - - - - - - - - - 猜你想追 - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/pages/index/components/recommend/recommend.js b/pages/index/components/recommend/recommend.js deleted file mode 100644 index 71f3729..0000000 --- a/pages/index/components/recommend/recommend.js +++ /dev/null @@ -1,34 +0,0 @@ -Component({ - mixins: [], - data: {}, - props: { - pageDataInfo: { - bannerList: [], - module1: [], - module2: [], - module3: [], - } - }, - didMount() { }, - didUpdate() { }, - didUnmount() { }, - methods: { - bannerChange(event) { - - }, - getVideo(event) { - - }, - toPathVideo(event) { - const data = event.target.dataset.item; - my.navigateTo({ - url: `/pages/video/video?sid=${data.bookid || data.id}` - }); - }, - getSearch() { - my.navigateTo({ - url: '/pages/search/search' - }) - } - }, -}); \ No newline at end of file diff --git a/pages/index/components/recommend/recommend.json b/pages/index/components/recommend/recommend.json deleted file mode 100644 index 1b9f7f7..0000000 --- a/pages/index/components/recommend/recommend.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "component": true, - "usingComponents": { - "am-icon": "mini-antui/es/am-icon/index", - "my-footer": "/components/myFooter/myFooter" - } -} \ No newline at end of file diff --git a/pages/index/index.acss b/pages/index/index.acss index c73667e..64c40cb 100644 --- a/pages/index/index.acss +++ b/pages/index/index.acss @@ -120,7 +120,7 @@ page, ._idx_swiper_warp { padding: 0 40rpx; - margin-bottom: 40rpx; + margin-bottom: 30rpx; } ._banner_swiper { @@ -128,6 +128,11 @@ page, height: 300rpx; } +._ba_swiper_item { + width: 100%; + height: 300rpx; +} + ._is_swiper_img { display: block; width: 100%; @@ -183,7 +188,7 @@ page, ._idx_vi_i_w_li_w_cover { width: 100%; - height: 260rpx; + height: 280rpx; } ._idx_v_i_w_i_w_cov_img { diff --git a/pages/index/index.axml b/pages/index/index.axml index e728f14..ee4e0c7 100644 --- a/pages/index/index.axml +++ b/pages/index/index.axml @@ -54,11 +54,13 @@ - - - - - + + + + + + + @@ -107,7 +109,7 @@ - + @@ -130,6 +132,6 @@ - - + + \ No newline at end of file diff --git a/pages/index/index.js b/pages/index/index.js index b7a88ee..dc3acf4 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -1,6 +1,6 @@ Page({ data: { - baoxianFlag: true, + baoxianFlag: false, tabIndex: 0, history: {}, historyShow: true, @@ -14,7 +14,6 @@ Page({ }, onShow() { // 页面显示 - this.isGetList(); }, @@ -25,7 +24,6 @@ Page({ method: 'GET', } httpRequest(paramenter).then(res => { - console.log(res, "resres") if (res && res.status == 1) { const { data } = res; this.setData({ diff --git a/pages/index/index.json b/pages/index/index.json index 423c16c..5d93276 100644 --- a/pages/index/index.json +++ b/pages/index/index.json @@ -1,7 +1,6 @@ { "defaultTitle":"追剧", "usingComponents": { - "am-icon": "mini-antui/es/am-icon/index", - "recommend":"./components/recommend/recommend" + "am-icon": "mini-antui/es/am-icon/index" } } \ No newline at end of file diff --git a/pages/my/my.acss b/pages/my/my.acss index bb2a850..30f3da3 100644 --- a/pages/my/my.acss +++ b/pages/my/my.acss @@ -85,20 +85,21 @@ page { } ._b_mo_in_warp { - display: flex; + /* display: flex; */ width: 100%; - height: 188rpx; background: #fff; border-radius: 18rpx; - padding: 0 24rpx; + padding: 30rpx 24rpx; } ._mo_in_wa_left{ - flex: 1; - flex-shrink: 0; + /* flex: 1; */ + /* flex-shrink: 0; */ display: flex; justify-content: space-around; align-items: center; + width: 100%; + /* height: 188rpx; */ } ._in_wa_left_item { @@ -121,10 +122,16 @@ page { color: #666; } -._mo_in_wa_right { +/* ._mo_in_wa_right { display: flex; align-items: center; margin-left: 24rpx; +} */ + +._my_pay_warp { + display: flex; + justify-content: flex-end; + margin-top: 30rpx; } ._in_wa_ri_btn { diff --git a/pages/my/my.axml b/pages/my/my.axml index 374f100..ad2b4db 100644 --- a/pages/my/my.axml +++ b/pages/my/my.axml @@ -53,6 +53,14 @@ 我的K币 + + + {{ userInfo.zb || 0 }} + + + 我的赠币 + + {{ userInfo.vip_enddate || 0 }} @@ -62,14 +70,14 @@ - - + 立即充值 - + + diff --git a/pages/my/my.js b/pages/my/my.js index 1f3dfdc..6039d44 100644 --- a/pages/my/my.js +++ b/pages/my/my.js @@ -10,21 +10,20 @@ Page({ myToHistroy: myToHistroy, popupShow: false }, - onLoad(query) { - console.log('page onLoad', query) - }, onShow() { this.setData({ userInfo: getApp().globalData.userInfo, systemInfo: getApp().globalData.systemInfo, }) }, + async isGetUserInfo(showFlag = true) { - async isGetUserInfo() { + if (showFlag) { + my.showLoading({ + content: '刷新中...', + }); + } - my.showLoading({ - content: '刷新中...', - }); const paramenter = { path: '/user', method: 'GET', @@ -54,16 +53,15 @@ Page({ }, toPathOtherPage(event) { - console.log(event, "==========") const item = event.target.dataset.item; if (item.id == 4) { my.tb.openMessage({ sellerNick: "湖南秦九", success: (res) => { - console.log(res); + console.log(res, 'success'); }, fail: (res) => { - console.log(res); + console.log(res, 'fail'); }, }) } else { @@ -79,21 +77,30 @@ Page({ }) }, - // getPayG() { - // my.hideTabBar({ - // animation: true - // }) - // this.setData({ - // popupShow: true - // }) - // }, + getPayG() { + my.hideTabBar({ + animation: true, + complete: () => { + this.setData({ + popupShow: true + }) + } + }) - // onClosePopup() { - // this.setData({ - // popupShow: false - // }) - // my.showTabBar({ - // animation: true - // }) - // } + }, + + onClosePopup(mi) { + + this.setData({ + popupShow: false + }) + setTimeout(() => { + my.showTabBar({ + animation: true + }) + }, 300) + if (mi.resultCode == 9000) { + this.isGetUserInfo(false); + } + } }) \ No newline at end of file diff --git a/pages/transaction/transaction.acss b/pages/transaction/transaction.acss index 8ced41b..bcee0be 100644 --- a/pages/transaction/transaction.acss +++ b/pages/transaction/transaction.acss @@ -9,6 +9,7 @@ page { ._bo_da_li_warp { background-color: #fff; border-radius: 18rpx; + margin-bottom: 30rpx; } ._da_li_wa_header { @@ -24,8 +25,8 @@ page { ._da_li_wa_header ._is_round{ position: absolute; bottom: 0; - width: 60rpx; - height: 60rpx; + width: 40rpx; + height: 40rpx; border-radius: 50%; background-color: #F1F4FA; } @@ -47,13 +48,21 @@ page { color: #000000; } +._wa_he_title_err >text { + line-height: 1; + font-size: 36rpx; + font-weight: 700; + color: #ce3636; +} + ._da_li_wa_container { - padding: 50rpx 24rpx; + padding: 50rpx 24rpx 30rpx; } ._wa_con_info { display: flex; align-items: center; + margin-bottom: 20rpx; } ._goods_name { diff --git a/pages/transaction/transaction.axml b/pages/transaction/transaction.axml index f3db6e5..6bbae2b 100644 --- a/pages/transaction/transaction.axml +++ b/pages/transaction/transaction.axml @@ -4,18 +4,34 @@ - + - - 充值39.90元未支付 - + + + 充值{{item.money}}元已支付 + + + + + 充值{{item.money}}元未支付 + + + 订单号码: - GGYSJ_20231030111806653f206eef218197 + {{item.out_trade_no}} + + + 充值时间: + {{item.create_time}} + + + 充值金额: + {{item.money}}¥ diff --git a/pages/transaction/transaction.js b/pages/transaction/transaction.js index b4a8e5a..99829d0 100644 --- a/pages/transaction/transaction.js +++ b/pages/transaction/transaction.js @@ -1,10 +1,29 @@ +const { httpRequest } = getApp(); + Page({ data: { rechargeList: [], - rechargeFlag: true + rechargeFlag: false }, - onLoad(query) { - console.log('page onLoad', query) - }, - onShow() { } + onShow() { + my.showLoading({ + content: '加载中...', + }); + + const paramenter = { + path: '/rechargerecord', + method: 'POST', + } + + httpRequest(paramenter).then(res => { + my.hideLoading(); + if (res.status == 1 && Array.isArray(res.data)) { + this.setData({ + rechargeList: res.data, + rechargeFlag: true, + }) + } + }) + + } }) \ No newline at end of file diff --git a/pages/video/video.acss b/pages/video/video.acss index f52a776..9bef05c 100644 --- a/pages/video/video.acss +++ b/pages/video/video.acss @@ -20,10 +20,20 @@ page { .swiper_item { width: 100%; + height: 100vh; } .swiper_item_warp { + display: flex; + flex-direction: column; width: 100%; + height: 100vh; + position: relative; +} + +._video_pay_warp { + flex: 1; + flex-shrink: 0; position: relative; } @@ -32,6 +42,21 @@ page { height: 100%; } +._video_pay_bg_cover { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} + +._video_pay_bg_cover_img { + display: block; + width: 100%; + height: 100%; + z-index: 1; +} + ._swiper_video_cover { position: absolute; bottom: 180rpx; @@ -54,27 +79,38 @@ page { } .swiper_pay_modal { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; - background-color: #000; - width: 100%; - height: 100%; + z-index: 3; + background-color: rgba(0, 0, 0, 0.45); } -.sw_pay_mo_order >text { - font-size: 50rpx; +.sw_pay_mo_order { + font-size: 46rpx; font-weight: 700; color: #fff; + background-color: transparent; } .sw_pay_isAutoplay_tips { margin-top: 40rpx; + background-color: transparent; + font-size: 46rpx; + font-weight: 700; + color: #fff; } -.sw_pay_isAutoplay_tips >text { - font-size: 50rpx; +.sw_pay_isAutoplay_tips_support { + margin-top: 40rpx; + background-color: transparent; + font-size: 30rpx; font-weight: 700; color: #fff; } @@ -89,6 +125,7 @@ page { background-color: #FF2B2B; margin-top: 40rpx; border-radius: 16rpx; + color: #fff; } .sw_pay_isAutoplay_btn >text { @@ -97,11 +134,16 @@ page { } ._video_series { + padding-bottom: constant(safe-area-inset-bottom); + padding-bottom: env(safe-area-inset-bottom); +} + +._video_series_box { display: flex; justify-content: space-between; align-items: center; width: 100%; - height: 100rpx; + height: 140rpx; padding: 0 30rpx; } @@ -110,6 +152,18 @@ page { align-items: center; } +._video_series_right { + display: flex; + align-items: center; +} + +._video_series_right_text { + font-size: 32rpx; + color: #fff; + margin-right: 10rpx; + line-height: 1; +} + ._vi_ser_le_img { width: 88rpx; height: 56rpx; @@ -186,12 +240,16 @@ page { padding: 0 30rpx; } +._pop_order_con_tabs { + flex: 1; +} + ._pop_ord_hea_left { display: flex; } ._pop_ord_hea_le_title { - width: 360rpx; + max-width: 360rpx; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; @@ -207,14 +265,18 @@ page { } ._pop_ord_hea_le_all{ - margin-left: 4rpx; + margin-left: 8rpx; } ._pop_ord_hea_le_all>text { font-size: 26rpx; - color: #333; + color: #999; } + +._video_html .am-popup { + z-index: 99; +} /* ._pop_order_con_tabs { padding: 0 30rpx; } */ @@ -225,6 +287,11 @@ page { ._pop_order__tabs .am-tabs-bar-tab { padding: 0 30rpx; justify-content: flex-start; + width: auto !important; +} + +._pop_order__tabs .am-tabs-pane-wrap { + height: 100%; } ._pop_order__tabs .am-tabs-bar-tab, @@ -266,6 +333,14 @@ page { border-radius: 16rpx; } +.tab_c_list_ul_li.active { + background-color: #ff779e; +} + +.tab_c_list_ul_li.active text { + color: #fff; +} + .tab_c_list_ul_li text { font-size: 26rpx; color: #333; diff --git a/pages/video/video.axml b/pages/video/video.axml index be17ad2..54a28eb 100644 --- a/pages/video/video.axml +++ b/pages/video/video.axml @@ -1,57 +1,80 @@ - - + + + + + + + + + - - - - - - - - - - - 第几集 - - 当前剧集是付费剧集 - - - 立即充值 - - - - - - - - 追剧 - - - + + + + + - + + + 第 {{videoInfoObj.order}} 集 + 此剧为付费内容,您的K币不足 + 支持创作作者,解锁后继续观看 + 立即充值 + + - - + + + + + + + 此剧为付费内容,需要购全集 + 支持创作作者,解锁后继续观看 + 立即购买 ( {{videoInfoObj.allprice}}K币 ) + + + + + + + + + 追剧 + + + + + + + + + + + + + 第 {{videoInfoObj.order}} 集 + + + + + 选集 + + + + + + + + - - - - - - - 第 {{swiperOrder}} 集 - - - - - - - - + @@ -63,33 +86,41 @@ - - + - + + - - - {{index + idx + 1}} - - - + + + {{j.order}} + + + + + + + + + + + \ No newline at end of file diff --git a/pages/video/video.js b/pages/video/video.js index 0cb3065..93baac4 100644 --- a/pages/video/video.js +++ b/pages/video/video.js @@ -3,12 +3,11 @@ const { httpRequest } = getApp(); Page({ data: { - swiperItemHeight: 0, imageBasUrl, - // chasingDramasShow: false, - chasDraIconColor: '#fff', + // swiperItemHeight: 0, orderList: [], videoInfoObj: {}, + posterCover: '', activeTab: 0, orderPopupShow: false, systemInfo: {}, @@ -18,112 +17,23 @@ Page({ swiperCurrent: 0, swiperOrder: 0, sid: '', + popupShow: false, + batchAllOrder: 0, + batchAllList: [] }, // 获取其它信息 isOtherFn() { - my.createSelectorQuery().select('#_video_box').boundingClientRect().exec((r) => { - this.setData({ - swiperItemHeight: r[0].height - }) - }); + // my.createSelectorQuery().select('#_video_box').boundingClientRect().exec((r) => { + // this.setData({ + // swiperItemHeight: r[0].height + // }) + // }); this.setData({ userInfo: getApp().globalData.userInfo, systemInfo: getApp().globalData.systemInfo }) }, - // 处理显示的集数 - isSwiperListFn(orNum, ls, orInfo) { - // 总共显示集数 - let showOrder = 9; - // 平均前后的集数 - let halfNum = Math.ceil(showOrder / 2) - 1; - // 集数减一为,列表的索引 - const sum = orNum - 1; - // 当前的集数加上,平均前后的集数,不能超过总的集数 - const all = orNum + halfNum; - // 新的列表 - const list = []; - let swiperCurrent = 0; - - if (ls.length < showOrder) { - showOrder = ls.length; - halfNum = Math.ceil(ls.length / 2) - 1; - } - - if (all >= ls.length) { - - let digit = 0; - let first = halfNum; - // let after = halfNum; - let cunIdx = 0; - if (ls.length >= orNum) { - digit = ls.length - orNum; - first = (halfNum - digit) + halfNum; - } - - for (let y = 0; y < showOrder; y++) { - if (first == 0) { - list.push(orInfo); - swiperCurrent = y; - first = first - 1; - } else if (first > 0) { - list.push(ls[orNum - first]); - first = first - 1; - } else { - if (cunIdx == 0) { - list.push(ls[orNum]); - cunIdx = cunIdx + 1; - } else { - console.log(orNum + cunIdx, "orNum + cunIdx]") - list.push(ls[orNum + cunIdx]); - cunIdx = cunIdx + 1; - } - } - } - - } else if (orNum > halfNum) { - - let first = halfNum; - // let after = halfNum; - let cunIdx = 0; - for (let y = 0; y < showOrder; y++) { - if (first == 0) { - list.push(orInfo); - swiperCurrent = y; - first = first - 1; - } else if (first > 0) { - list.push(ls[orNum - first]); - first = first - 1; - } else { - if (cunIdx == 0) { - list.push(ls[orNum]); - cunIdx = cunIdx + 1; - } else { - list.push(ls[orNum + cunIdx]); - cunIdx = cunIdx + 1; - } - } - } - - } else { - - for (let y = 0; y < showOrder; y++) { - if (sum == y) { - list.push(orInfo); - swiperCurrent = y; - } else { - list.push(ls[y]) - } - } - - } - - this.setData({ - swiperList: list, - swiperCurrent - }) - }, // 处理弹框的集数 async handelOrder(infoObj) { const paramenter = { @@ -132,44 +42,82 @@ Page({ body: { sid: infoObj.sid, start: 1, - end: infoObj.total.length + end: infoObj.total } } const isBatchlist = await httpRequest(paramenter); - console.log(isBatchlist, "isBatchlist") - const num = 2; + const num = 30; let remain = 0; let temp = []; const mlist = []; - // if (Array.isArray(isBatchlist.data)) { - // vls.forEach((m, idx) => { - // if ((num * remain + num) < (idx + 1)) { - // remain += 1; - // temp = []; - // } - // temp.push(m); - // let obj = { - // firstNum: num * remain + 1, - // lastNum: idx + 1, - // title: `${num * remain + 1}-${idx + 1}`, - // temp: [...temp], - // } - // mlist[remain] = obj; - // }); + let orderObj = {}; + if (Array.isArray(isBatchlist.data)) { + isBatchlist.data.forEach((m, idx) => { + if ((num * remain + num) < m.order) { + remain += 1; + temp = []; + } + temp.push(m); + orderObj[remain] = { + firstNum: num * remain + 1, + lastNum: m.order, + title: `${num * remain + 1}-${m.order}`, + temp: temp + } + }); - // this.setData({ - // orderList: mlist - // }) - // } + Object.keys(orderObj).map((m) => { + mlist.push(orderObj[m]); + }) + this.setData({ + orderList: mlist, + batchAllOrder: isBatchlist.data.length, + batchAllList: isBatchlist.data, + }) + } + }, + + handelOrderIsVip(resData) { + const orderList = this.data.orderList; + const batchAllList = this.data.batchAllList; + // swiperList.splice(current, 1, resData); + if (resData.chackpay == 1) { + const ols = []; + orderList.forEach((j) => { + let jb = { + ...j + } + const yus = []; + j.temp.forEach((y) => { + let yobj = { + ...y, + } + if (yobj.id == resData.id) { + yobj.isvip = 0; + } + yus.push(yobj); + }) + jb.temp = yus; + ols.push(jb); + }) + let temp = [...batchAllList]; + temp[resData.order - 1].isvip = 0; + this.setData({ + batchAllList: temp + }) + + return ols; + } + return orderList; }, // 获取 剧情 - async isIosPaymentFn(sid) { - const paramenter = { - path: '/iosPayment', - method: 'GET', - } - const iosPayment = await httpRequest(paramenter); + async isVideoPaymentFn(sid) { + // const paramenter = { + // path: '/iosPayment', + // method: 'GET', + // } + // const iosPayment = await httpRequest(paramenter); // console.log(iosPayment, "iosPayment") const paramVideo = { path: '/videoread', @@ -180,56 +128,223 @@ Page({ } const videoRead = await httpRequest(paramVideo); - console.log(videoRead, "videoRead") + // console.log(videoRead, "videoRead") + if (Array.isArray(videoRead.data)) { + const videoInfoObj = videoRead.data[0]; - const swiperList = Array.from({ length: videoInfoObj.total }, (v, k) => k + 1); + // const swiperList = Array.from({ length: videoInfoObj.total }, (v, k) => { + // if (videoInfoObj.order == k + 1) { + // return { + // ...videoInfoObj, + // } + // } + // return { order: k + 1 } + // }); // console.log(swiperList, "swiperList") - this.isSwiperListFn(videoInfoObj.order, swiperList, videoInfoObj); - this.handelOrder(videoInfoObj); this.setData({ - iosPayment: iosPayment, - swiperOrder: videoInfoObj.order, - // swiperList: swiperList - videoInfoObj: videoInfoObj + // iosPayment: iosPayment, + // swiperOrder: videoInfoObj.order, + // swiperList: swiperList, + videoInfoObj: videoInfoObj, + // swiperCurrent: videoInfoObj.order - 1, + posterCover: videoInfoObj.videocover || videoInfoObj.cover }) + + this.handelOrder(videoInfoObj); + my.setNavigationBar({ title: videoInfoObj.title, }); + } }, + toPathPlayAllOrder() { + + const videoInfoObj = this.data.videoInfoObj; + const sid = this.data.sid; + + const paramVideo = { + path: '/buyall', + method: 'POST', + body: { + sid: sid, + id: videoInfoObj.id, + allprice: videoInfoObj.allprice + }, + errObj: { + 2: { + showToastFlag: true + } + } + } + + httpRequest(paramVideo).then(res => { + if (res.status == 1) { + my.showToast({ + type: 'none', + content: res.msg || '购买成功', + duration: 1000, + }) + this.isVideoPaymentFn(sid); + } + }).catch(err => { + if (err.status == 2) { + my.confirm({ + title: '温馨提示', + content: err.msg, + confirmButtonText: '去充值', + cancelButtonText: '取消', + success: (result) => { + if (result.confirm) { + this.setData({ + popupShow: true, + }) + } + }, + }); + } + }) + }, + + // handelswiperCurrent(ev) { + // const current = ev.detail.current; + // const swiperCurrent = this.data.swiperCurrent; + // const videoInfoObj = this.data.videoInfoObj; + // const sid = this.data.sid; + // const swiperList = this.data.swiperList; + // let id = ''; + // if (current > swiperCurrent) { + // id = videoInfoObj.nextid; + // } else { + // id = videoInfoObj.lastid; + // } + // const paramVideo = { + // path: '/videoread', + // method: 'POST', + // body: { + // sid: sid, + // id: id + // } + // } + + // httpRequest(paramVideo).then(res => { + // // swiperList.map() + // const resData = res.data[0] + // swiperList.splice(current, 1, resData); + + // this.setData({ + // swiperList: swiperList, + // swiperCurrent: current, + // videoInfoObj: resData, + // swiperOrder: resData.order + // }) + // }) + // }, + videoErrorFn(e) { console.log(e, "eee") }, + videoEndedFn() { + const videoInfoObj = this.data.videoInfoObj; + const sid = this.data.sid; + // const swiperList = this.data.swiperList; + const id = videoInfoObj.nextid; + // const current = videoInfoObj.order; + const paramVideo = { + path: '/videoread', + method: 'POST', + body: { + sid: sid, + id: id + } + } + + httpRequest(paramVideo).then(res => { + // swiperList.map() + const resData = res.data[0]; + const ols = this.handelOrderIsVip(resData); + // swiperList.splice(current, 1, resData); + this.setData({ + // swiperList: swiperList, + // swiperCurrent: current, + videoInfoObj: resData, + orderList: ols, + // swiperOrder: resData.order + }) + }) + }, + //显示 选择集数 selectEpisodesFn() { this.setData({ orderPopupShow: true }) }, + // 关闭 选择集数 closeOrderPopup() { this.setData({ orderPopupShow: false }) }, + // 切换 级数的 - handleTabClick(e) { + handleTabClick(ev) { // console.log(e, "handleTabClickhandleTabClick") this.setData({ - activeTab: e.index + activeTab: ev.index }) + }, - handleOrderCurrent(e) { - console.log(e, "handleOrderCurrent"); + + handleOrderCurrent(ev) { + const item = ev.target.dataset.item; + // const orderList = this.data.orderList; + // const batchAllOrder = this.data.batchAllOrder; + const batchAllList = this.data.batchAllList; + if (item.order != 1) { + const nextVideoObj = batchAllList[item.order - 2]; + if (nextVideoObj.isvip == 1) { + my.showToast({ + type: 'info', + content: '为了保证剧情连贯,请按顺序观看' + }) + return; + } + } + // const current = item.order - 1; + const sid = this.data.sid; + // const swiperList = this.data.swiperList; + const paramVideo = { + path: '/videoread', + method: 'POST', + body: { + sid: sid, + id: item.id + } + } + + httpRequest(paramVideo).then(res => { + // swiperList.map() + const resData = res.data[0]; + const ols = this.handelOrderIsVip(resData); + this.setData({ + // swiperList: swiperList, + // swiperCurrent: current, + videoInfoObj: resData, + // swiperOrder: resData.order, + orderPopupShow: false, + orderList: ols + }) + }) }, onLoad(query) { const sid = query.sid; - this.setData({ sid: sid }) @@ -238,16 +353,47 @@ Page({ onShow() { const sid = this.data.sid; this.isOtherFn(); - this.isIosPaymentFn(sid); - console.log("--------------") + this.isVideoPaymentFn(sid); }, - // 不追剧 - // noChasingDramasFn() { - // this.setData({ - // chasingDramasShow: false - // }) - // }, + toPathPlayPage() { + // my.navigateTo({ + // url: '/pages/recharge/recharge' + // }); + this.setData({ + popupShow: true, + }) + }, + + onClosePopup(mi) { + const videoInfoObj = this.data.videoInfoObj; + if (mi.resultCode == 9000 && videoInfoObj.chackpay == 2) { + const sid = this.data.sid; + const paramVideo = { + path: '/videoread', + method: 'POST', + body: { + sid: sid, + id: videoInfoObj.id + } + } + + httpRequest(paramVideo).then(res => { + const resData = res.data[0]; + const ols = this.handelOrderIsVip(resData); + this.setData({ + popupShow: false, + videoInfoObj: resData, + orderList: ols + }) + }) + + } else { + this.setData({ + popupShow: false, + }) + } + }, // 添加追剧 addChasingDramasFn() { const videoInfoObj = this.data.videoInfoObj; @@ -284,7 +430,7 @@ Page({ } httpRequest(paramenter).then(() => { my.showToast({ - icon: 'none', + type: 'none', content: '取消成功', duration: 1000, }); @@ -298,8 +444,5 @@ Page({ } - // this.setData({ - // chasDraIconColor: '#FF2B2B' - // }) }, }) \ No newline at end of file diff --git a/pages/video/video.json b/pages/video/video.json index 8cfd671..b2fdd94 100644 --- a/pages/video/video.json +++ b/pages/video/video.json @@ -8,6 +8,7 @@ "modal": "mini-antui/es/modal/index", "popup": "mini-antui/es/popup/index", "tabs": "mini-antui/es/tabs/index", - "tab-content": "mini-antui/es/tabs/tab-content/index" + "tab-content": "mini-antui/es/tabs/tab-content/index", + "my-pay": "/components/myPay/myPay" } } \ No newline at end of file diff --git a/pages/wxkf/wxkf.acss b/pages/wxkf/wxkf.acss deleted file mode 100644 index 363ba74..0000000 --- a/pages/wxkf/wxkf.acss +++ /dev/null @@ -1,33 +0,0 @@ -page { - width: 100%; - height: 100%; -} - -._wxkf_html { - display: flex; - justify-content: center; - align-items: center; - width: 100%; - height: 100%; -} - -._wxkf_page_body { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - width: 100%; - height: 100vh; -} - -._wxkf_image_bx { - width: 520rpx; - height: 520rpx; -} - -._wxkf_tips_t > text { - line-height: 1; - font-size: 50rpx; - color: #333; - font-weight: 500; -} \ No newline at end of file diff --git a/pages/wxkf/wxkf.axml b/pages/wxkf/wxkf.axml deleted file mode 100644 index d5679d0..0000000 --- a/pages/wxkf/wxkf.axml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - 长按识别二维码 - - - 添加客服 - - - \ No newline at end of file diff --git a/pages/wxkf/wxkf.js b/pages/wxkf/wxkf.js deleted file mode 100644 index 094fdf6..0000000 --- a/pages/wxkf/wxkf.js +++ /dev/null @@ -1,25 +0,0 @@ -const { httpRequest } = getApp(); - -Page({ - data: { - kfImg: '' - }, - onShow() { - this.getkefu(); - }, - getkefu() { - const paramenter = { - path: '/getkefu', - method: 'GET', - } - httpRequest(paramenter).then(res => { - console.log(res, "getkefu") - if (res.status == 1) { - const { data } = res; - this.setData({ - kfImg: data.wxkf, - }) - } - }) - } -}) \ No newline at end of file diff --git a/pages/wxkf/wxkf.json b/pages/wxkf/wxkf.json deleted file mode 100644 index 9e26dfe..0000000 --- a/pages/wxkf/wxkf.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/utils/httpRequest.js b/utils/httpRequest.js index 03bb726..6508d09 100644 --- a/utils/httpRequest.js +++ b/utils/httpRequest.js @@ -6,7 +6,7 @@ cloud.init({ env: 'test' }); -const httpRequest = async ({ path, method = 'GET', params = {}, body = {}, exts = {} }) => { +const httpRequest = async ({ path, method = 'GET', params = {}, body = {}, exts = {}, errObj = {} }) => { const dataUid = my.getStorageSync({ key: 'uid' }).data; let isBody = {}; @@ -51,24 +51,27 @@ const httpRequest = async ({ path, method = 'GET', params = {}, body = {}, exts ...exts, } }); - // console.log(JSON.stringify(result),"JSON.stringify(resul") + // console.log(JSON.stringify(result), "JSON.stringify(resul") if (JSON.stringify(result) != '{}' && result) { const isResult = JSON.parse(result); if (isResult.status == 1) { return isResult; } if (isResult.status == 2) { - my.showToast({ - content: isResult.msg, - duration: 3000, - }); + if (!errObj[isResult.status].showToastFlag) { + my.showToast({ + content: isResult.msg, + duration: 3000, + }); + } + return Promise.reject(isResult); } } return result; // console.log(JSON.stringify(result)); } catch (err) { - + console.log(err, 'httpRequest_err') } };