bztang-admin/addons/yun_shop/static/app/js/chunk-3e8a2c31.dd9e2a5d.js

1 line
16 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3e8a2c31"],{"24ff":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{style:{height:e.innerHeight+"px"},attrs:{id:"foreshow"}},[a("div",{staticClass:"header",style:{backgroundImage:"url("+e.info.cover+")"}}),a("div",{staticClass:"title set-pc-style"},[a("i",{staticClass:"iconfont icon-back",on:{click:function(t){return e.goto()}}}),a("span",[e._v("预告")])]),a("div",{staticClass:"content",style:{width:3==e.fun.getPhoneEnv()?"375px":""}},[a("div",{staticClass:"member-head"},[a("div",{staticClass:"left"},[a("img",{attrs:{src:this.$store.state.temp.mailInfo&&this.$store.state.temp.mailInfo.logo,alt:""}})]),a("div",{staticClass:"right"},[a("p",{staticClass:"name overflow"},[e._v(e._s(e.info.nickname))]),a("div",{staticStyle:{display:"flex"}},[a("p",{staticClass:"share",on:{click:e.shareMessage}},[e._v("分享")]),a("p",{staticClass:"build",on:{click:e.getPoster}},[e._v("生成海报")])])])]),a("div",{staticClass:"number_time"},[e.fun.getTimeDifference(e.info.live_time)&&0==e.info.status?[a("p",{staticStyle:{"font-weight":"bold"}},[e._v("距离开播仅剩: ")]),a("van-count-down",{attrs:{time:e.fun.getTimeDifference(e.info.live_time),format:"DD 天 HH 时 mm 分 ss 秒"},on:{finish:e.finishtime}})]:a("p",{staticClass:"active_time"},[e._v("等待主播开播...")])],2),e._m(0)]),a("van-overlay",{attrs:{show:e.show},on:{click:function(t){e.show=!1}}}),a("div",{staticClass:"popupClass2",style:{top:e.show?"50%":"-100%"},on:{touchmove:function(e){e.stopPropagation()}}},[a("div",{directives:[{name:"show",rawName:"v-show",value:e.loadingImg,expression:"loadingImg"}],staticClass:"popup-box"},[a("div",{staticClass:"code",attrs:{id:"code_box"}},[a("div",{staticClass:"shop_top"},[a("div",{staticClass:"shop_name"},[e._v(e._s(e.$store.state.temp&&e.$store.state.temp.mailInfo&&e.$store.state.temp.mailInfo.name))])]),a("div",{staticClass:"bgBox"},[a("img",{staticClass:"bg",staticStyle:{"object-fit":"cover"},attrs:{src:"data:image/png;base64,"+e.info.image,alt:""}}),a("div",{staticClass:"anchorInfo"},[a("img",{attrs:{src:e.base64Datas[0],alt:""}}),a("div",{staticClass:"nickname"},[e._v(e._s(e.info.nickname))])]),a("div",{staticClass:"live_status"},[e._v(" "+e._s(0==e.info.status?"预告":1==e.info.status?"直播中":"回放中")+" ")])]),a("div",{staticClass:"posterBottom"},[a("div",{staticClass:"l_info"},[a("div",{staticClass:"titless"},[e._v(e._s(e.info.title))]),a("div",{staticClass:"live_time"},[e._v("直播时间"+e._s(e.info.start_at))]),a("div",{staticClass:"share_meber"},[a("img",{attrs:{src:e.base64Datas[1],alt:""}}),a("div",{staticClass:"m_nickname"},[e._v(e._s(e.nameEllipsis))]),e._v(" 的分享 ")])]),a("div",{staticClass:"r_info"},[a("img",{attrs:{src:e.base64Datas[2],alt:""}}),a("p",[e._v("长按识别或者保存图片")])])])])]),a("div",{directives:[{name:"show",rawName:"v-show",value:!e.loadingImg,expression:"!loadingImg"}],staticStyle:{width:"19.375rem",margin:"0 auto","border-radius":"8px"}},[a("img",{staticStyle:{width:"19.375rem","border-radius":"8px"},attrs:{id:"thecanvas"}})]),a("div",{staticClass:"closeBox",on:{click:function(t){e.show=!1}}},[a("i",{staticClass:"iconfont icon-close11"})])])],1)},o=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"tipstype"},[a("div",{staticClass:"left"}),a("div",{staticClass:"center"},[e._v("敬 请 期 待")]),a("div",{staticClass:"right"})])}],s=a("c7eb"),r=a("1da1"),n=(a("14d9"),a("d3b7"),a("99af"),a("c0e9")),l=a.n(n),d=document.body.clientHeight,c={data:function(){return{innerHeight:d,star_time:null,time:"",Day:"01",Hour:"03",Min:"32",Sec:"34",stop:!1,show:!1,loadingImg:!0,dataURL:"",info:{avatar:null,nickname:null,qr_code:null,cover:null},isSetNotice:!1,end:null,PosterData:{},posterImg:[],base64Datas:[]}},activated:function(){var e=this.$route.query,t=e.CAT,a=e.STAT,i=e.REC,o=e.RId;this.RId=o,this.CAT=t||"",this.STAT=a||"",this.REC=i||"",this.initData(),this.getData()},deactivated:function(){this.pollStautsTimer&&clearInterval(this.pollStautsTimer)},methods:{initData:function(){this.time="",this.Day="",this.Hour="",this.Min="",this.Sec="",this.show=!1,this.isSetNotice=!1,this.info={avatar:null,nickname:null,qr_code:null,cover:null},this.star_time=null,this.end=null,this.PosterData={},this.posterImg=[],this.base64Datas=[],this.loadingImg=!0},getData:function(){var e=this;$http.post("plugin.share-room.frontend.controllers.index.room-notice",{room_id:this.RId},"").then((function(t){if(1===t.result){if(e.info=t.data,1==t.data.status)return e.$toast("已开播,正在为您跳至直播间!"),e.$router.push(e.fun.getUrl("shareRoomPlayer",{},{RId:e.RId,CAT:e.CAT,STAT:1,REC:e.REC}));if(2==t.data.status)return e.$toast("直播已结束,正在为您跳至主播页面!"),e.$router.push(e.fun.getUrl("shareRoomPlayer",{},{RId:e.RId,CAT:e.CAT,STAT:2,REC:e.REC}));e.fun.wxShare("",{},{title:e.info.member.nickname,imgUrl:e.info.cover,description:"邀请您进入直播间"})}else e.$toast(t.msg)})).catch((function(e){}))},getPoster:function(){var e=this;if(!this.loadingImg&&this.dataURL)return this.show=!0;this.powerToast=this.$toast({duration:-1,message:"正在为您生成海报中,请稍后"}),$http.post("plugin.share-room.frontend.controllers.index.room-post",{room_id:this.RId},"").then((function(t){var a;1===t.result?(e.posterImg.push(null===(a=e.$store.state.temp.mailInfo)||void 0===a?void 0:a.logo,e.info.member.avatar,t.data.qr_code),e.loop()):e.$toast(t.msg)})).catch((function(e){}))},loop:function(){var e=this;return Object(r["a"])(Object(s["a"])().mark((function t(){var a;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:a=0;case 1:if(!(a<e.posterImg.length)){t.next=7;break}return t.next=4,e.onloadImg(e.posterImg[a],a);case 4:a++,t.next=1;break;case 7:e.$nextTick((function(){setTimeout((function(){e.saveImg()}),1e3),setTimeout((function(){e.loadingImg=!1}),3e3)}));case 8:case"end":return t.stop()}}),t)})))()},onloadImg:function(e,t,a){var i=this;return new Promise((function(t,a){var o=new Image;o.setAttribute("crossOrigin","anonymous");var s=e;o.src="".concat(s,"?").concat(Date.now());var r=i;o.onload=function(){var e=document.createElement("canvas");e.width=o.width,e.height=o.height;var a=e.getContext("2d");a.drawImage(o,0,0,o.width,o.height);var i=.8,s=e.toDataURL("image/png",i);r.base64Datas.push(s),t()},o.onerror=function(){r.base64Datas.push(""),t()}}))},showPoster:function(){this.dataURL&&(this.show=!0),this.powerToast&&this.powerToast.clear()},shareMessage:function(){this.$dialog.alert({message:"请生成海报或点击右上角分享"})},saveImg:function(){this.dataURL=null;var e=document.getElementById("code_box"),t=this;l()(e,{useCORS:!0,backgroundColor:null}).then((function(e){t.dataURL=e.toDataURL("image/png"),document.getElementById("thecanvas").setAttribute("src",t.dataURL),t.showPoster()}))},goto:function(){this.$router.push(this.fun.getUrl("shareRoomList"))},finishtime:function(){var e=this;this.pollStautsTimer=setInterval((function(){e.pollingLiveStatus()}),15e3)},pollingLiveStatus:function(){var e=this;return Object(r["a"])(Object(s["a"])().mark((function t(){var a,i,o;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,$http.get("plugin.share-room.frontend.controllers.index.room-notice",{room_id:e.RId},"加载中");case 2:if(a=t.sent,i=a.result,o=a.data,1!=i||1!=o.status){t.next=9;break}return e.pollStautsTimer&&clearInterval(e.pollStautsTimer),e.$toast("已开播,正在为您跳至直播间!"),t.abrupt("return",e.$router.push(e.fun.getUrl("shareRoomPlayer",{},{RId:e.RId,CAT:e.CAT,STAT:1,REC:e.REC})));case 9:case"end":return t.stop()}}),t)})))()}},computed:{nameEllipsis:function(){if(this.info.member&&this.info.member.nickname)return this.info.member.nickname.length>4?this.info.member.nickname.substring(0,4)+"...":this.info.member.nickname}},components:{}},m=c,p=m,f=(a("4fc1"),a("2877")),h=Object(f["a"])(p,i,o,!1,null,"3ae9e3cd",null);t["default"]=h.exports},"4fc1":function(e,t,a){"use strict";a("8f7e")},"8f7e":function(e,t,a){var i=a("c793");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=a("499e").default;o("272a4aa8",i,!0,{sourceMap:!1,shadowMode:!1})},c793:function(e,t,a){var i=a("24fb");t=i(!1),t.push([e.i,'#foreshow[data-v-3ae9e3cd]{width:100%;position:relative}.header[data-v-3ae9e3cd]{width:100%;height:100%;background-size:contain;background-position:top;background-repeat:no-repeat}.title[data-v-3ae9e3cd]{position:fixed;top:0;left:0;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;color:#fff;font-size:17px;font-weight:700;padding:.5rem}.title span[data-v-3ae9e3cd]{width:80%;line-height:2rem}.title i[data-v-3ae9e3cd]{font-weight:700;font-size:18px;-webkit-box-flex:0;-webkit-flex:0 0 10%;-ms-flex:0 0 10%;flex:0 0 10%;line-height:2rem}.content[data-v-3ae9e3cd]{position:fixed;bottom:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:100%;height:66%;background:#fff;border-radius:1.5rem 1.5rem 0 0}.member-head[data-v-3ae9e3cd]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding:1rem}.member-head .left[data-v-3ae9e3cd]{width:4rem;height:4rem}.member-head .left img[data-v-3ae9e3cd]{height:100%;width:100%;border-radius:50%}.member-head .name[data-v-3ae9e3cd]{font-weight:700;font-size:16px;text-align:left;width:15rem}.member-head .right[data-v-3ae9e3cd]{margin-left:.5rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-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:.2rem 0}.member-head .share[data-v-3ae9e3cd]{background-color:#ff7e00;color:#fff;border-radius:15px;padding:.2rem .6rem}.member-head .build[data-v-3ae9e3cd]{background-color:#6105de;color:#fff;border-radius:15px;padding:.2rem .5rem;margin-left:.5rem}.number_time[data-v-3ae9e3cd]{margin:1.5rem auto;color:#333;font-size:15px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.number_time[data-v-3ae9e3cd],.number_time .active_time[data-v-3ae9e3cd],.number_time .active_time span[data-v-3ae9e3cd]{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;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}.number_time .active_time span[data-v-3ae9e3cd]{font-size:20px;background-color:#e71a1a;color:#fff;padding:.3rem;border-radius:10px}.number_time .active_time em[data-v-3ae9e3cd]{font-weight:700;display:inline-block;padding:0 .5rem}.hope[data-v-3ae9e3cd]{margin:0 auto 1.5rem auto;line-height:2rem}.hope[data-v-3ae9e3cd]:before{margin-right:.5rem}.hope[data-v-3ae9e3cd]:after,.hope[data-v-3ae9e3cd]:before{height:1px;width:7rem;vertical-align:middle;background-color:#eee;content:"";display:inline-block}.hope[data-v-3ae9e3cd]:after{margin-left:.5rem}.button[data-v-3ae9e3cd]{border:1px solid #e71a1a;color:#e71a1a;width:15rem;height:3rem;border-radius:.734rem;text-align:center;margin:0 auto;line-height:3rem;font-size:17px;font-weight:700}.popupClass2[data-v-3ae9e3cd]{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:19.375rem;z-index:999}.popupClass2 .popup-box[data-v-3ae9e3cd]{width:19.375rem;margin:0 auto;overflow:hidden;border-radius:8px}.popupClass2 .code[data-v-3ae9e3cd]{width:19.375rem;background-color:#fff;border-radius:8px;padding-top:.5rem;padding-bottom:1rem}.popupClass2 .code .shop_top[data-v-3ae9e3cd]{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;height:1.75rem;margin-bottom:.5rem}.popupClass2 .code .shop_top .shop_icon[data-v-3ae9e3cd]{width:1.75rem;height:1.75rem;border-radius:100%;margin:0}.popupClass2 .code .shop_top .shop_name[data-v-3ae9e3cd]{height:1.75rem;line-height:1.75rem;margin-left:1rem;font-size:.875rem;color:#000}.popupClass2 .code .bgBox[data-v-3ae9e3cd]{position:relative;margin:0 auto;width:17.5rem}.popupClass2 .code .bgBox .bg[data-v-3ae9e3cd]{width:17.5rem;max-height:18rem;display:block;-o-object-fit:cover;object-fit:cover}.popupClass2 .code .bgBox .anchorInfo[data-v-3ae9e3cd]{position:absolute;top:.6rem;left:.6rem;background:rgba(0,0,0,.4);color:#fff;height:1.375rem;line-height:1.375rem;border-radius:.875rem;padding-right:.375rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.popupClass2 .code .bgBox .anchorInfo img[data-v-3ae9e3cd]{width:1.375rem;height:1.375rem;border-radius:100%;margin-right:.25rem}.popupClass2 .code .bgBox .anchorInfo .nickname[data-v-3ae9e3cd]{max-width:5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.popupClass2 .code .bgBox .live_status[data-v-3ae9e3cd]{position:absolute;top:.6rem;right:.6rem;color:#fff;width:4rem;height:1.375rem;line-height:1.375rem;background-color:#ff7200;border-radius:.656rem}.popupClass2 .code .posterBottom[data-v-3ae9e3cd]{width:17.5rem;margin:0 auto;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;text-align:left}.popupClass2 .code .posterBottom .l_info[data-v-3ae9e3cd]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.popupClass2 .code .posterBottom .l_info .titless[data-v-3ae9e3cd]{width:11rem;height:2.5rem;line-height:1.25rem;color:#000;font-size:.875rem;text-align:left;margin-top:1.375rem;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2}.popupClass2 .code .posterBottom .l_info .live_time[data-v-3ae9e3cd]{font-size:10px;color:#ff7200;margin-top:1.875rem}.popupClass2 .code .posterBottom .l_info .share_meber[data-v-3ae9e3cd]{color:#666;margin-top:.875rem;height:1.5rem;line-height:1.5rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.popupClass2 .code .posterBottom .l_info .share_meber img[data-v-3ae9e3cd]{width:1.5rem;height:1.5rem;border-radius:100%;margin:0;vertical-align:top;margin-right:.25rem}.popupClass2 .code .posterBottom .l_info .share_meber .m_nickname[data-v-3ae9e3cd]{max-width:5rem;overflow:hidden}.popupClass2 .code .posterBottom .r_info[data-v-3ae9e3cd]{margin-top:1.375rem;text-align:right}.popupClass2 .code .posterBottom .r_info img[data-v-3ae9e3cd]{width:5.969rem;height:5.656rem;-o-object-fit:contain;object-fit:contain}.popupClass2 .code .posterBottom .r_info p[data-v-3ae9e3cd]{font-size:.625rem}.popupClass2 .closeBox[data-v-3ae9e3cd]{width:2rem;height:2rem;line-height:2rem;border:.125rem solid #fff;border-radius:100%;color:#fff;position:absolute;left:50%;bottom:-2.5rem;margin-left:-1rem;z-index:999}.popupClass2 .closeBox i[data-v-3ae9e3cd]{font-size:1rem}#foreshow .tipstype[data-v-3ae9e3cd]{height:1.125rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:space-evenly;-webkit-justify-content:space-evenly;-ms-flex-pack:space-evenly;justify-content:space-evenly;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;line-height:1.125rem;color:#000;font-size:.75rem;margin-bottom:1.5rem}#foreshow .tipstype .left[data-v-3ae9e3cd],#foreshow .tipstype .right[data-v-3ae9e3cd]{width:6.25rem;height:1px;background-color:rgba(0,0,0,.2)}',""]),e.exports=t}}]);