=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;P(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:A(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e},n("7a82"),n("a4d3"),n("e01a"),n("d3b7"),n("d28b"),n("3ca3"),n("ddb0"),n("b636"),n("944a"),n("0c47"),n("23dc"),n("3410"),n("d9e2"),n("d401"),n("14d9"),n("159b"),n("131a"),n("26e9"),n("fb6a");var r=function(e){return e&&e.__esModule?e:{default:e}}(n("53ca"))},caa4:function(e,t,n){"use strict";(function(e){n("7a82");var r=n("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n("3835")),i=r(n("c7eb")),o=r(n("1da1"));n("e25e"),n("baa5"),n("e9c4");var s=r(n("4d24")),u=uni.getSystemInfoSync().windowWidth,c=uni.getSystemInfoSync().windowHeight,l={components:{pop:s.default},data:function(){return{loadFlag:!0,loginShow:!1,detail:{},staticUrl:"",adIntegral:0,downShow:!1,downIntegral:0,downTitle:"",downBtn:"",adShow:!1,isColl:!1,isZan:!1,zanStatus:!0,collStatus:!0,cssTran:!1,indexCurrent:1,activeCurrent:0,id:0,mid:0,isplaytext:"",price:0,signShow:!1,signTitle:"",w:u,h:c}},onLoad:function(e){this.staticUrl=this.configs.staticUrl;this.indexCurrent=parseInt(0)+1,this.activeCurrent=parseInt(0),this.loadFlag=!1,e.id&&(this.id=e.id,this.getinfo(this.id))},onShow:function(){},onHide:function(){},onUnload:function(){},methods:{getinfo:function(e){var t=this;uni.showLoading({title:"加载中"});var n={};n.id=e,n.mid=this.mid,uni.getStorageSync("userinfo").token&&(n.token=uni.getStorageSync("userinfo").token,this.isLogin=!0),uni.request({url:this.configs.webUrl+"/api/video/infotp",data:n,success:function(e){uni.hideLoading(),uni.getStorageSync("userinfo").token&&e.data.isvip>1?t.price=e.data.vipprice:t.price=e.data.price,e.data.pricebuy=t.price,t.detail=e.data,t.adLoad(),e.data.isvip>1?1*e.data.vipprice==0&&(t.isplaytext="VIP免费"):1*e.data.price==0&&(t.isplaytext="免费视频")},fail:function(e,t){uni.hideLoading()}})},getIsZan:function(){var t=this;return(0,o.default)((0,i.default)().mark((function n(){var r;return(0,i.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,e.callFunction({name:"query_count",data:{dbName:"wx_cover",filter:{_id:t.detail._id,"zan.user_id":t.vuex_user._id}}});case 2:r=n.sent,t.zanStatus=!1,r.result>0&&(t.isZan=!0);case 5:case"end":return n.stop()}}),n)})))()},getIsColl:function(){var t=this;return(0,o.default)((0,i.default)().mark((function n(){var r;return(0,i.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,e.callFunction({name:"query_count",data:{dbName:"wx_cover",filter:{_id:t.detail._id,"coll.user_id":t.vuex_user._id}}});case 2:r=n.sent,t.collStatus=!1,r.result>0&&(t.isColl=!0);case 5:case"end":return n.stop()}}),n)})))()},opdownloadFile:function(){var e=this;uni.showLoading({title:"正在保存图片"});var t=e.detail.images[e.indexCurrent-1];t.substring(t.lastIndexOf(".")+1),(new Date).valueOf();console.log(t),uni.downloadFile({url:t,success:function(t){var n=t.tempFilePath;console.log(t),uni.saveImageToPhotosAlbum({filePath:n,success:function(e){uni.hideLoading(),uni.showModal({title:"温馨提示",content:"保存成功",showCancel:!1,success:function(e){e.confirm}})},fail:function(t){t.errMsg&&(console.log(t.errMsg),uni.showModal({title:"提示",content:"无权限,请打开下载权限后再试!",showCancel:!1,success:function(t){t.confirm&&uni.openSetting({success:function(t){t.authSetting["scope.writePhotosAlbum"]?uni.saveImageToPhotosAlbum({filePath:n,success:function(t){uni.hideLoading(),e.adShow=!0}}):uni.showModal({title:"温馨提示",content:"授权失败,请稍后重新获取",showCancel:!1})}})}})),uni.hideLoading()}})},fail:function(e){console.log(e)}})},winClick:function(){if(!uni.getStorageSync("userinfo").id)return uni.showModal({title:"温馨提示",content:"请先登后下载",showCancel:!0,confirmText:"确定",success:function(e){e.confirm?uni.navigateTo({url:"/pages/login/login"}):e.cancel}}),!1;0==this.detail.isplay?this.$refs.pop.show():this.opdownloadFile()},backClick:function(){uni.navigateBack()},collectClick:function(){this.isColl=!0,uni.showToast({icon:"none",title:"收藏成功",mask:!0,duration:1e3})},zanClick:function(){this.isZan=!0,uni.showToast({icon:"none",title:"点赞成功",mask:!0,duration:1e3})},cssClick:function(){this.cssTran=!this.cssTran},swiperChange:function(e){this.indexCurrent=e.detail.current+1},adClick:function(){var e=3,t=0;if(uni.getStorageSync("config").mrcs&&uni.getStorageSync("config").mrcsjr&&(e=uni.getStorageSync("config").mrcs,t=uni.getStorageSync("config").mrcsjr),t>=e)return uni.showModal({title:"温馨提示",content:"每日只能看"+e+"次",showCancel:!1,confirmText:"确定",success:function(e){e.confirm||e.cancel}}),!1},adLoad:function(){console.log(this.detail.videoids);var e=this;wx.createRewardedVideoAd&&(null.onError((function(e){console.log("videoAd onError",e)})),null.onClose((function(t){e.downShow=!1,t&&t.isEnded||void 0===t?(e.admoney(),console.log("看完广告")):(uni.showToast({icon:"none",title:"播放中途退出,获取失败",mask:!0,duration:1e3}),console.log("中途退出"))})))},userIntegral:function(){var t=this;return(0,o.default)((0,i.default)().mark((function n(){var r,a;return(0,i.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r=t,uni.showLoading({mask:!0,title:"加载中..."}),n.next=4,e.callFunction({name:"user_integral",data:{userId:r.vuex_user._id}});case 4:a=n.sent,uni.hideLoading(),a.result.success&&(r.getUser(),r.signTitle="观看成功
获得"+a.result.integral+"积分
",r.signShow=!0);case 7:case"end":return n.stop()}}),n)})))()},watchOpen:function(){},watchClose:function(){},admoney:function(){var e=this;return(0,o.default)((0,i.default)().mark((function t(){var n,r,o,s,u,c;return(0,i.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e,r={},uni.getStorageSync("userinfo").token&&(r.token=uni.getStorageSync("userinfo").token),t.next=5,e.$httpas.get("/api/user/admoney",r);case 5:if(o=t.sent,s=(0,a.default)(o,2),u=s[0],c=s[1],e.$httpas.errorCheck(u,c)){t.next=11;break}return t.abrupt("return");case 11:1===c.data.code?(uni.setStorage({key:"config",data:c.data.data}),uni.showModal({title:"温馨提示",content:"获取成功 是否马上兑换",showCancel:!0,confirmText:"兑换",success:function(e){e.confirm?n.duihss():e.cancel}})):uni.showToast({title:"获取失败",icon:"none"});case 12:case"end":return t.stop()}}),t)})))()},duihss:function(){var e=this,t=this,n=this.detail;n.sum=1,n.buytype="余额",n.lx=1,n.smid=0,n.namet=n.name,n.pricebuy=n.price,n.token=uni.getStorageSync("userinfo").token,n.uid=uni.getStorageSync("userinfo").id,console.log(n),uni.request({url:this.configs.webUrl+"/api/pay/videopay",data:n,success:function(r){"微信"==n.buytype?"wxxcx"==e.wxlx&&1==r.data.code?e.wxxcx(r.data.data):window.open(r.data.data,"_self"):"余额"==n.buytype&&(1==r.data.code?uni.showModal({title:"提示",content:"兑换成功",showCancel:!1,success:function(n){t.getinfo(e.id),t.$refs.pop.close(),t.opdownloadFile()}}):"余额不足"==r.data.msg?uni.showModal({title:"提示",content:"余额不足,看广告可以获取",showCancel:!0,confirmText:"看广告",success:function(e){t.adClick()}}):uni.showModal({title:"提示",content:r.data.msg,showCancel:!1,success:function(e){uni.navigateBack()}}))},fail:function(e,t){console.log("fail"+JSON.stringify(e))}})},getUserInfo:function(){var e=this;wx.getUserProfile({desc:"更新您的个人信息",success:function(t){e.name=t.userInfo.nickName,e.avatar=t.userInfo.avatarUrl,e.wxlogin()},fail:function(e){uni.showToast({icon:"none",title:"授权失败",duration:1500})}})},wxlogin:function(){var e=this;return(0,o.default)((0,i.default)().mark((function t(){var n;return(0,i.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:n=e,uni.showLoading({title:"登录中..."}),uni.login({provider:"weixin",success:function(e){var t=e.code;n.wxloginres(t)}});case 3:case"end":return t.stop()}}),t)})))()},wxloginres:function(t){var n=this;return(0,o.default)((0,i.default)().mark((function r(){var a,o,s;return(0,i.default)().wrap((function(r){while(1)switch(r.prev=r.next){case 0:return a=n,o=uni.getStorageSync("userId"),r.next=4,e.callFunction({name:"user_authorize",data:{name:a.name,avatar:a.avatar,mptype:void 0,code:t,userId:o}});case 4:s=r.sent,s.result.success?(a.$u.vuex("vuex_user",s.result.data),a.getIsZan(),a.getIsColl(),uni.showToast({icon:"none",mask:!0,title:"登录成功",duration:1500}),uni.removeStorageSync("userId")):uni.showToast({icon:"none",mask:!0,title:s.result.msg,duration:1500}),a.loginShow=!1;case 7:case"end":return r.stop()}}),r)})))()}},onShareAppMessage:function(e){var t=this;return setTimeout((function(){t.adShow=!1}),2e3),{title:"送你一张超级好看的壁纸~",imageUrl:t.detail.images[t.indexCurrent-1],path:"/pages/index/index?userId="+t.vuex_user._id+"&detailId="+t.detail._id+"&index="+(t.indexCurrent-1)}},onShareTimeline:function(e){return{title:"我等风也等你,近听水无声~",imageUrl:"/static/share_bg.jpg",path:"/pages/index/index"}}};t.default=l}).call(this,n("a9ff")["default"])},d967:function(e,t,n){"use strict";n("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},n("d3b7"),n("f8c9"),n("4ae1")},db90:function(e,t,n){"use strict";n("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},n("a4d3"),n("e01a"),n("d3b7"),n("d28b"),n("3ca3"),n("ddb0"),n("a630")},f4b3:function(e,t,n){"use strict";var r=n("23e7"),a=n("d039"),i=n("7b0b"),o=n("c04e"),s=a((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}));r({target:"Date",proto:!0,arity:1,forced:s},{toJSON:function(e){var t=i(this),n=o(t,"number");return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},f4b3d:function(e,t,n){"use strict";var r=n("3892"),a=n.n(r);a.a},f58a:function(e,t,n){var r=n("4bd7");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var a=n("4f06").default;a("122005d5",r,!0,{sourceMap:!1,shadowMode:!1})},fa95:function(e,t,n){"use strict";n("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},n("c975"),n("d401"),n("d3b7"),n("25f0")}}]);