1 line
9.7 KiB
JavaScript
1 line
9.7 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2513f79c"],{"37ed":function(t,e,a){"use strict";a("54433")},"413fc":function(t,e,a){var o=a("24fb");e=o(!1),e.push([t.i,"#ADVideo[data-v-20512991]{position:relative;height:calc(100vh - 2.5rem);background:#000;overflow:hidden}.video-swipe[data-v-20512991]{z-index:2}.video[data-v-20512991],.video-swipe[data-v-20512991]{position:absolute;top:2.5rem;left:0;width:100%;height:calc(100vh - 2.5rem)}.video[data-v-20512991]{z-index:0;right:0;bottom:0;margin:auto}.view-ad_button[data-v-20512991]{display:block;width:12.8rem;height:2.2rem;line-height:2.2rem;color:#fff;text-align:center;font-size:.8rem;border-radius:.3rem;background:rgba(0,0,0,.3)}.view-ad_button[data-v-20512991]:active{-webkit-filter:brightness(95%);filter:brightness(95%)}.video-play-button[data-v-20512991]{position:absolute;z-index:9;top:0;bottom:0;right:0;left:0;margin:auto;height:70px;font-size:70px;color:hsla(0,0%,100%,.8)}.video-author[data-v-20512991]{position:relative;height:4rem;width:3.44rem}.video-author_avatar[data-v-20512991]{border:.13rem solid #fff}.video-author_follow[data-v-20512991]{margin:0 auto;width:1.1rem;height:1.1rem;line-height:1.1rem;color:#fff;font-size:.6rem;font-weight:700;text-align:center;border-radius:50%;background-color:#ef3532;-webkit-transform:translateY(-.9rem);transform:translateY(-.9rem)}.slidebar[data-v-20512991]{display:inline-block;height:22.5rem;text-align:center}.slidebar-list[data-v-20512991]{margin-top:1.94rem;color:#fff;font-size:.75rem;line-height:.75rem}.slidebar-item[data-v-20512991]:not(:last-child){margin-bottom:1.38rem}.slidebar-icon[data-v-20512991]{margin-bottom:.56rem;font-size:1.13rem;line-height:1.13rem}.award-popup[data-v-20512991]{width:84%;height:80%;text-align:center;background-image:url(https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/new_media/award_popup_bg2.png);background-color:transparent;background-size:contain;background-position:top;background-repeat:no-repeat}.award-popup-content[data-v-20512991]{padding:.94rem;width:12.5rem;height:14.06rem;color:#fff;font-size:1.06rem;background-image:-webkit-gradient(linear,left bottom,left top,from(#eb160a),to(#f96822));background-image:-webkit-linear-gradient(bottom,#eb160a,#f96822);background-image:linear-gradient(0deg,#eb160a,#f96822);border-radius:.64rem;-webkit-box-sizing:border-box;box-sizing:border-box}.award-popup-content[data-v-20512991],.award-popup-decoration[data-v-20512991]{position:absolute;top:0;right:0;left:0;bottom:0;margin:auto}.award-popup-decoration[data-v-20512991]{width:92%}.award-popup h1[data-v-20512991]{margin-top:2.48rem;line-height:1.06rem}.award-content[data-v-20512991]{margin-top:2.26rem;line-height:1.06rem}.award-content span[data-v-20512991]{font-weight:700;font-size:1.88rem}.award-confirm[data-v-20512991]{margin:2.32rem auto 0}",""]),t.exports=e},54433:function(t,e,a){var o=a("413fc");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var i=a("499e").default;i("ee62914e",o,!0,{sourceMap:!1,shadowMode:!1})},ea33:function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"ADVideo"}},[a("c-title",{staticStyle:{"z-index":"4"},attrs:{text:"广告详情"}}),a("div",{directives:[{name:"show",rawName:"v-show",value:!t.videoPlaying,expression:"!videoPlaying"}],staticClass:"iconfont video-play-button icon-member_look",on:{click:t.clickVideo}}),t.showAdContent?a("video",{ref:"video",staticClass:"video",attrs:{src:t.showAdContent.resources_url,poster:t.showAdContent.cover_picture,loop:"","webkit-playsinline":"true",controlslist:"nodownload",playsinline:"true","x5-video-player-type":"h5","x5-video-player-fullscreen":"true",preload:"metadata"},on:{canplay:t.videoCanPlay,error:t.videoLoadError,click:t.clickVideo}},[a("source",{attrs:{src:t.showAdContent.resources_url,type:"video/mp4"}})]):t._e(),a("van-swipe",{staticClass:"video-swipe",attrs:{vertical:"","show-indicators":!1,"initial-swipe":t.showVideoIndex,loop:!1},on:{change:t.swipeChange}},t._l(t.videos,(function(e,o){return a("van-swipe-item",{key:o,staticClass:"video-swipe-item",on:{click:t.clickVideo}})})),1),t.showAdContent?a("d-fixed-container",{staticStyle:{position:"absolute","z-index":"9",bottom:"7.16rem",right:"0.66rem","text-align":"right"},attrs:{bottom:"7.16rem",right:"0.66rem",fixed:!1}},[a("div",{staticClass:"slidebar"},[a("div",{staticClass:"video-author"},[a("van-image",{staticClass:"video-author_avatar",attrs:{src:t.showAdContent.avatar,round:"",width:"3.44rem",height:"3.44rem"}}),t.showAdContent.is_attention?t._e():a("div",{staticClass:"video-author_follow iconfont icon-life-game-plus",on:{click:t.followAuthor}}),t.showAdContent.is_attention?a("div",{staticClass:"video-author_follow iconfont icon-record_go",on:{click:t.unFollowAuthor}}):t._e()],1),a("content-statistics-bar",{staticClass:"slidebar-list",attrs:{data:t.showAdContent,fixed:!1,direction:"column",width:"100%!important",reload:t.reloadStatistics}})],1)]):t._e(),t.showAdContent?a("RewardButton",{staticStyle:{"z-index":"4"},attrs:{right:"0.98rem",bottom:"2.4rem",absolute:"",rewardName:t.showAdContent.reward_name,zIndex:9},on:{click:function(e){t.showRewardPopup=!0}}}):t._e(),t.adContent?a("d-fixed-container",{attrs:{bottom:"1.4rem",left:"1.04rem",zIndex:9}},[a("a",{directives:[{name:"show",rawName:"v-show",value:t.adContent.link,expression:"adContent.link"}],staticClass:"view-ad_button",staticStyle:{position:"relative","z-index":"9"},attrs:{href:t.adContent.link}},[t._v("点击查看")])]):t._e(),t.showAdContent?a("reward-popup",{attrs:{show:t.showRewardPopup,avatar:t.showAdContent.avatar,nickname:t.showAdContent.nickname,"content-id":t.showAdContent.id,rewardName:t.showAdContent.reward_name,rewardCredits:t.adContent.reward_button},on:{close:function(e){t.showRewardPopup=!1}}}):t._e(),a("van-popup",{staticClass:"award-popup",attrs:{position:"center"},model:{value:t.attention.showAwardPopup,callback:function(e){t.$set(t.attention,"showAwardPopup",e)},expression:"attention.showAwardPopup"}},[a("div",{staticClass:"award-popup-content"},[a("h1",[t._v("恭喜获得关注奖励")]),a("div",{staticClass:"award-content"},[a("span",[t._v(t._s(t.attention.awardCount))]),t._v(" "+t._s(t.attention.awardName)+" ")]),a("golden-button",{staticClass:"award-confirm",on:{click:function(e){t.attention.showAwardPopup=!1}}},[t._v("确认")])],1),a("img",{staticClass:"award-popup-decoration",attrs:{src:"https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/new_media/award_popup_bg1.png"}})])],1)},i=[],n=(a("4056"),a("44bf")),r=(a("a9e3"),a("d3b7"),a("159b"),a("98b0")),s=a("c8c0"),d=a("7999"),l=a("7a7f"),c=a("b0f9"),h=null,u={mounted:function(){this.fun.setWXTitle("广告详情"),this.$route.query.ad_id?(this.adId=Number(this.$route.query.ad_id),this.getAdContentDetails()):this.$toast("内容不存在")},deactivated:function(){this.pauseVideo(this.showVideoIndex)},data:function(){return{adId:null,adContent:null,showRewardPopup:!1,showVideoIndex:0,videos:[],showAdContent:null,reloadStatistics:!1,videoPlaying:!1,attention:{showAwardPopup:!1,awardCount:null,awardName:""}}},methods:{swipeChange:function(t){var e=this;h&&(h.clear(),h=null),this.pauseVideo(),this.showAdContent=this.videos[t],this.reloadStatistics=!0,h=this.$toast.loading({message:"视频加载中",duration:0}),this.$nextTick((function(){e.reloadStatistics=!1,e.videoPlaying=!1,e.clickVideo()}))},playVideo:function(){var t=this;this.$refs["video"]?this.$refs["video"].play():this.$nextTick((function(){t.$refs["video"].play()})),h&&(h.clear(),h=null)},pauseVideo:function(){this.$refs["video"]&&this.$refs["video"].pause(),h&&(h.clear(),h=null)},clickVideo:function(){this.videoPlaying?this.pauseVideo():this.playVideo(),this.videoPlaying=!this.videoPlaying},getVideoList:function(){var t=this;$http.get("plugin.new-media-advertising.frontend.media-advertisingt.get-list",{page:this.$route.query.page,advertisingt_type:this.$route.query.tab_type,genre:this.$route.query.content_type}).then((function(e){var a=e.data.list.data,o=e.result,i=e.msg;0!=o?(t.videos=a,a.forEach((function(e,a){e.id==t.adContent.id&&(t.showVideoIndex=a)}))):t.$toast(i)}))},videoCanPlay:function(){this.videoPlaying=!1,this.clickVideo(),h&&(h.clear(),h=null)},videoLoadError:function(){h&&(h.clear(),h=null),this.$toast("视频加载失败")},getAdContentDetails:function(){var t=this,e=this.$toast.loading({message:"加载中",duration:0});$http.get("plugin.new-media-advertising.frontend.media-advertisingt.advertisingt-info",{advertisingt_id:this.adId}).then((function(a){e.clear(),0!==a.result?(t.adContent=a.data,t.showAdContent=a.data,t.getVideoList()):t.$toast(a.msg)})).catch((function(){e.clear()}))},followAuthor:function(){var t=this;if(this.showAdContent.is_attention)this.unFollowAuthor();else{var e=this.$toast.loading({message:this.showAdContent.attention_name+"中",duration:0});$http.post("plugin.new-media-advertising.frontend.media-advertisingt.attention",{advertisingt_id:this.showAdContent.id}).then((function(a){e.clear(),0!=a.result?(a.data.is_reward&&(t.attention.awardName=a.data.rewardName,t.attention.awardCount=a.data.rewardValue,t.attention.showAwardPopup=!0),t.$toast(t.showAdContent.attention_name+"成功"),t.showAdContent.is_attention=!0):t.$toast(a.msg)}))}},unFollowAuthor:function(){var t=this,e=this.$toast.loading({message:this.showAdContent.attention_name+"关注中",duration:0});$http.post("plugin.new-media-advertising.frontend.media-advertisingt.cancel-attention",{advertisingt_member:this.showAdContent.member_id}).then((function(a){e.clear(),0!=a.result?(t.$toast("取消成功"),t.showAdContent.is_attention=!1):t.$toast(a.msg)}))}},components:{VanImage:n["a"],DFixedContainer:r["a"],RewardButton:s["a"],RewardPopup:d["a"],ContentStatisticsBar:c["a"],GoldenButton:l["a"]}},p=u,w=(a("37ed"),a("2877")),m=Object(w["a"])(p,o,i,!1,null,"20512991",null);e["default"]=m.exports}}]); |