(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/diy-live/diy-live"],{"3dd0":function(t,e,n){"use strict";n.r(e);var i=n("e856"),a=n("b011");for(var u in a)"default"!==u&&function(t){n.d(e,t,(function(){return a[t]}))}(u);n("a82f"),n("8c28");var o,l=n("f0c5"),c=Object(l["a"])(a["default"],i["b"],i["c"],!1,null,"74734345",null,!1,i["a"],o);e["default"]=c.exports},"62b4":function(t,e,n){},"76f2":function(t,e,n){},"8c28":function(t,e,n){"use strict";var i=n("76f2"),a=n.n(i);a.a},a82f:function(t,e,n){"use strict";var i=n("62b4"),a=n.n(i);a.a},b011:function(t,e,n){"use strict";n.r(e);var i=n("e7be"),a=n.n(i);for(var u in i)"default"!==u&&function(t){n.d(e,t,(function(){return i[t]}))}(u);e["default"]=a.a},e7be:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={components:{},name:"diy-live",props:{value:{type:Object,default:function(){return{}}}},data:function(){return{liveInfo:{banner:"",anchor_img:""}}},created:function(){this.getLiveInfo()},methods:{getLiveInfo:function(){var t=this;this.$api.sendRequest({url:"/live/api/live/info",success:function(e){0==e.code&&e.data?(t.liveInfo=e.data,t.getLiveStatus()):t.liveInfo=null}})},entryRoom:function(t){wx.navigateTo({url:"plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=".concat(t)})},getLiveStatus:function(){var t=this,e=requirePlugin("live-player-plugin");e.getLiveStatus({room_id:this.liveInfo.roomid}).then((function(e){var n=e.liveStatus;n&&n!=t.liveInfo.live_status&&t.changeLiveStatus(n)})).catch((function(t){console.log("get live status",t)}));var n=setInterval((function(){e.getLiveStatus({room_id:t.liveInfo.roomid}).then((function(e){var i=e.liveStatus;i&&i!=t.liveInfo.live_status&&t.changeLiveStatus(i),t.$util.inArray(i,[103,104,106,107])&&clearInterval(n)})).catch((function(t){console.log("get live status",t)}))}),6e4)},changeLiveStatus:function(t){var e=this;this.$api.sendRequest({url:"/live/api/live/modifyLiveStatus",data:{room_id:this.liveInfo.roomid,status:t},success:function(t){0==t.code&&e.getLiveInfo()}})}}};e.default=i},e856:function(t,e,n){"use strict";var i,a=function(){var t=this,e=t.$createElement,n=(t._self._c,t.$util.img(t.liveInfo.banner)),i=t.$util.img("upload/uniapp/live_default_banner.png"),a=t.$util.img(t.liveInfo.anchor_img),u=t.$util.getDefaultImage();t._isMounted||(t.e0=function(e){t.liveInfo.banner=t.$util.img("upload/uniapp/live_default_banner.png")},t.e1=function(e){t.liveInfo.anchor_img=t.$util.getDefaultImage().default_headimg}),t.$mp.data=Object.assign({},{$root:{g0:n,g1:i,g2:a,g3:u}})},u=[];n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return u})),n.d(e,"a",(function(){return i}))}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'components/diy-live/diy-live-create-component',
    {
        'components/diy-live/diy-live-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('543d')['createComponent'](__webpack_require__("3dd0"))
        })
    },
    [['components/diy-live/diy-live-create-component']]
]);
