1 line
12 KiB
JavaScript
1 line
12 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-47a2df4e"],{"81f0e":function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"liveAuthorization"}},[i("c-title",{attrs:{hide:!1,text:"直播授权码"}}),i("div",{staticClass:"tabsVant"},[i("van-tabs",{on:{change:t.changeActive},model:{value:t.active,callback:function(e){t.active=e},expression:"active"}},[i("van-tab",{attrs:{title:"已购买授权码"}}),i("van-tab",{attrs:{title:"可出售授权码"}})],1)],1),0==t.active?t._l(t.info,(function(e,a){return i("div",{key:a,staticClass:"haveBuy"},[i("div",{staticClass:"BuyTop"},[i("i",{staticClass:"iconfont icon-fontclass-maikefeng"}),i("span",[t._v(t._s(e.level_name))])]),i("div",{staticClass:"bottom",on:{click:function(i){return t.tapActivate(e)}}},[i("div",{class:[2==e.type?"BuyBottom":"BuyBottomT"]},[t._v(t._s(e.type_name))])])])})):t._e(),1==t.active?[i("div",{staticClass:"listCard"},[i("div",{staticClass:"cardLis"},[i("swiper",{attrs:{options:t.swiperOption}},t._l(t.info,(function(e,a){return i("swiper-slide",{key:a},[i("div",{staticClass:"lisbox"},[i("div",{staticClass:"left"},[i("div",{staticClass:"leftTop"},[i("i",{staticClass:"iconfont icon-fontclass-maikefeng"}),i("span",[t._v(t._s(e.level_name))])]),i("div",{staticClass:"leftBottom"},[i("span",[t._v("数量:"+t._s(e.code_num))])])]),i("div",{staticClass:"right",on:{click:t.goDetail}},[i("span",[t._v("明细")])])])])})),1)],1),t.info.length>0?i("div",{staticClass:"btnSale"},[i("div",{staticClass:"btnLeft",on:{click:t.tapSele}},[t._v("出售")]),i("div",{staticClass:"btnRight",on:{click:t.tapCode}},[t._v("待收款码")])]):t._e()])]:t._e(),i("van-popup",{attrs:{position:"bottom",closeable:""},model:{value:t.saleboxShow,callback:function(e){t.saleboxShow=e},expression:"saleboxShow"}},[i("div",{staticClass:"saleMx"},[i("div",{staticClass:"txt"},[t._v("授权码出售")]),i("div",{staticClass:"search"},[i("van-field",{attrs:{type:"number",placeholder:"请输入授权码出售价格(单价:元)"},model:{value:t.money,callback:function(e){t.money=e},expression:"money"}})],1),i("div",{staticClass:"istxy"},[t._v("限单个出售")]),i("div",{staticClass:"sureBtn",on:{click:t.sureBtnTap}},[t._v("确定")])])])],2)},o=[],n=(i("e7e5"),i("d399")),r=(i("14d9"),i("99af"),i("6968")),l=i("2b57"),s=i("ac0d"),c={components:{cTitle:r["a"],yzWechatShareImg:l["a"]},mixins:[s["a"]],data:function(){var t=this;return{isLoadMore:!0,page:1,total_page:0,money:"",saleboxShow:!1,active:0,current:0,activation:!1,popShow:!1,showWechatshar:!1,swiperOption:{loop:!1,initialSlide:0,direction:"horizontal",observer:!0,watchOverflow:!0,autoHeight:!0,autoplay:!1,pagination:!1,slidesOffsetBefore:25,slidesOffsetAfter:35,slidesPerView:"auto",spaceBetween:10,on:{slideChangeTransitionEnd:function(e){t.onChange(this.realIndex)}}},info:[]}},activated:function(){this.getData(),this.init()},methods:{init:function(){this.isLoadMore=!0,this.page=1,this.total_page=0,this.info=[],this.saleboxShow=!1,this.current=0},tapActivate:function(t){var e=this;"1"==t.type&&$http.get("plugin.room.frontend.code.activationCode",{id:t.id},"加载中").then((function(t){1==t.result&&e.getData()}),(function(t){}))},onChange:function(t){this.current=t},changeActive:function(t){this.init(),this.getData()},goDetail:function(){this.$router.push(this.fun.getUrl("liveAuthorization_detail",{}))},tapCode:function(){var t=this.info[this.current].level_id;this.$router.push(this.fun.getUrl("liveAuthorization_collection",{id:t},{}))},tapSele:function(){this.saleboxShow=!0},sureBtnTap:function(){var t=this.info[this.current].id,e=this.info[this.current].level_id;0!=this.info[this.current].code_num?this.fun.isTextEmpty(this.money)?Object(n["a"])("请输入出售价格"):(this.sendLogs(t),this.$router.push(this.fun.getUrl("liveAuthorization_collection",{id:e},{}))):Object(n["a"])("授权码数量不足")},sendLogs:function(t){var e=this,i={money:e.money,id:t};$http.get("plugin.room.frontend.code.generatePoster",i,"加载中").then((function(t){t.result}),(function(t){}))},getData:function(){var t,e=this;1==e.active?t="plugin.room.frontend.code.salabilityCode":0==e.active&&(t="plugin.room.frontend.code.purchasedCode"),$http.get(t,{},"加载中").then((function(t){1==t.result&&("1"==e.active?e.info=t.data:"0"==e.active&&(e.info=t.data.data,e.isLoadMore=!0,e.total_page=t.data.last_page,e.total_page||(e.total_page=0)))}),(function(t){}))},getMoreData:function(){var t=this;t.isLoadMore=!1;var e={page:1};t.page>=t.total_page?t.loading=!0:(t.page=t.page+1,e.page=t.page,$http.get("plugin.room.frontend.code.salabilityCode",e,"加载中").then((function(e){if(t.isLoadMore=!0,t.loading=!1,1!==e.result)return t.page=t.page-1,t.loading=!0,void(t.isLoadMore=!1);var i=e.data.data;t.info=t.info.concat(i)}),(function(t){})))}}},d=c,u=d,f=(i("8e59"),i("2877")),b=Object(f["a"])(u,a,o,!1,null,"1c98e0ba",null);e["default"]=b.exports},"8e59":function(t,e,i){"use strict";i("d983")},a43d:function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,"#liveAuthorization[data-v-1c98e0ba] .van-popup{background-color:transparent}#liveAuthorization .saleMx[data-v-1c98e0ba]{width:100%;height:15.63rem;background-color:#fff;border-radius:.5rem .5rem 0 0;overflow:hidden}#liveAuthorization .saleMx .txt[data-v-1c98e0ba]{font-size:1rem;color:#202020;text-align:center;margin-top:1.63rem}#liveAuthorization .saleMx .search[data-v-1c98e0ba]{width:19.44rem;margin:0 auto;border:.1rem solid #c9c9c9;border-radius:.31rem;margin-top:2rem}#liveAuthorization .saleMx .istxy[data-v-1c98e0ba]{text-align:left;margin-left:1.97rem;font-size:.69rem;color:#f14e4e;margin-top:.59rem;margin-bottom:2.7rem}#liveAuthorization .saleMx .sureBtn[data-v-1c98e0ba]{width:19.44rem;height:2.19rem;background-color:#f14e4e;border-radius:1.09rem;font-size:.94rem;color:#fff;text-align:center;line-height:2.19rem;margin:0 auto}#liveAuthorization .btnTop[data-v-1c98e0ba]{width:100%;height:7.63rem;-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around;background-color:#fff}#liveAuthorization .btnTop[data-v-1c98e0ba],#liveAuthorization .btnTop .boxBtn[data-v-1c98e0ba]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}#liveAuthorization .btnTop .boxBtn[data-v-1c98e0ba]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}#liveAuthorization .btnTop .boxBtn i[data-v-1c98e0ba]{font-size:3rem}#liveAuthorization .cancel[data-v-1c98e0ba]{height:2.84rem;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;background-color:#fff}#liveAuthorization .cancel[data-v-1c98e0ba],#liveAuthorization .haveBuy[data-v-1c98e0ba]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}#liveAuthorization .haveBuy[data-v-1c98e0ba]{margin:0 .94rem;height:7.5rem;background-image:url(https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/liveCardBj.png);background-repeat:no-repeat;background-size:cover;border-radius:.25rem;margin-top:.97rem;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;padding:.97rem .91rem .97rem .94rem}#liveAuthorization .haveBuy .BuyTop[data-v-1c98e0ba]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}#liveAuthorization .haveBuy .BuyTop .icon-fontclass-maikefeng[data-v-1c98e0ba]{font-size:1.3rem;color:#fff}#liveAuthorization .haveBuy .BuyTop span[data-v-1c98e0ba]{margin-left:.3rem;font-size:1.06rem;color:#fff}#liveAuthorization .haveBuy .bottom[data-v-1c98e0ba]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}#liveAuthorization .haveBuy .bottom .BuyBottom[data-v-1c98e0ba]{background-color:#c1c1c1}#liveAuthorization .haveBuy .bottom .BuyBottom[data-v-1c98e0ba],#liveAuthorization .haveBuy .bottom .BuyBottomT[data-v-1c98e0ba]{width:3.75rem;height:1.5rem;border-radius:.19rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;font-size:.81rem;color:#fff}#liveAuthorization .haveBuy .bottom .BuyBottomT[data-v-1c98e0ba]{background-color:#f22f2f}#liveAuthorization .listCard[data-v-1c98e0ba]{padding:.97rem 0 0 0;-webkit-box-sizing:border-box;box-sizing:border-box}#liveAuthorization .listCard .btnSale[data-v-1c98e0ba]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;margin-top:2.47rem}#liveAuthorization .listCard .btnSale .btnLeft[data-v-1c98e0ba]{background-color:#f14e4e;margin-left:1.72rem}#liveAuthorization .listCard .btnSale .btnLeft[data-v-1c98e0ba],#liveAuthorization .listCard .btnSale .btnRight[data-v-1c98e0ba]{width:9.38rem;height:2.06rem;border-radius:.31rem;font-size:.94rem;color:#fff;line-height:2.06rem}#liveAuthorization .listCard .btnSale .btnRight[data-v-1c98e0ba]{background-color:#ec9729;margin-right:1.72rem}#liveAuthorization .listCard .swiper-slide[data-v-1c98e0ba]{width:20.31rem;height:7.5rem}#liveAuthorization .listCard .lisbox[data-v-1c98e0ba]{width:20.31rem;height:7.5rem;border-radius:.25rem;background-image:url(https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/liveCardBj.png);background-repeat:no-repeat;background-size:cover;padding-top:.97rem;padding-left:.94rem;padding-right:.97rem;padding-bottom:.81rem}#liveAuthorization .listCard .lisbox[data-v-1c98e0ba],#liveAuthorization .listCard .lisbox .left[data-v-1c98e0ba]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}#liveAuthorization .listCard .lisbox .left[data-v-1c98e0ba]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}#liveAuthorization .listCard .lisbox .left .leftTop .icon-fontclass-maikefeng[data-v-1c98e0ba]{font-size:1.3rem;color:#fff}#liveAuthorization .listCard .lisbox .left .leftTop span[data-v-1c98e0ba]{margin-left:.3rem;font-size:1.06rem;color:#fff}#liveAuthorization .listCard .lisbox .left .leftBottom[data-v-1c98e0ba]{text-align:left;font-size:.81rem;color:#fff}#liveAuthorization .listCard .lisbox .right[data-v-1c98e0ba]{font-size:.94rem;color:#fff}",""]),t.exports=e},ac0d:function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));var a=document.documentElement,o=document.body,n={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return a&&a.scrollTop?t=a.scrollTop:o&&(t=o.scrollTop),t},getClientHeight:function(){var t=0;return t=o.clientHeight&&a.clientHeight?Math.min(o.clientHeight,a.clientHeight):Math.max(o.clientHeight,a.clientHeight),t},getScrollHeight:function(){return Math.max(o.scrollHeight,a.scrollHeight)},handleScroll:function(){this.otherScroll();var t=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=t>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}},d983:function(t,e,i){var a=i("a43d");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var o=i("499e").default;o("c211352e",a,!0,{sourceMap:!1,shadowMode:!1})}}]); |