"use strict";const e=require("../../../common/vendor.js"),r=require("../../../components/request.js"),o={data:()=>({userinfo:{},AnchorList:[],triggered:!1,modifyStreamerMessage:{}}),onLoad(){e.index.getStorage({key:"userinfo",success:e=>{this.userinfo=e.data,this.getAnchorList()}})},methods:{onRecompose(e){this.modifyStreamerMessage=e,this.$refs.modifyStreamer.open()},onExpurgate(o){r.request({url:"anchor/deleteMyAnchor",method:"POST",data:{id:o.id},userInfo:!0}).then((r=>{this.triggered=!1,200==r.code?(e.index.showToast({title:"删除成功",icon:"success",duration:2e3}),this.getAnchorList()):e.index.showToast({title:r.msg,icon:"success",duration:2e3})}))},getAnchorList(){r.request({url:"anchor/list",method:"POST",data:{id:this.userinfo.id},userInfo:!0}).then((e=>{this.triggered=!1,200==e.code?this.AnchorList=e.data:console.log(e.msg)}))},openPopupQuantity(){this.$refs.createModule.open()},onRefresherRefresh(){this.triggered=!0,this.getAnchorList()},onBack(){e.wx$1.navigateBack({delta:1})}},components:{anchorLibrary:()=>"./addStreamer/addStreamer.js",modifyStreamer:()=>"./modifyStreamer/modifyStreamer.js"}};if(!Array){(e.resolveComponent("uni-card")+e.resolveComponent("anchorLibrary")+e.resolveComponent("modifyStreamer"))()}const t=e._export_sfc(o,[["render",function(r,o,t,s,n,a){return e.e({a:e.o$1(((...e)=>a.onBack&&a.onBack(...e))),b:0!==n.AnchorList.length},0!==n.AnchorList.length?{c:e.f(n.AnchorList,((r,o,t)=>e.e({a:r.headerIcon,b:e.t(r.anchorId),c:2===r.gender},(r.gender,{}),{d:e.t(1===r.gender?"男":"女"),e:1===r.gender?1:"",f:2===r.gender?1:"",g:e.t(r.country),h:e.o$1((e=>a.onRecompose(r)),o),i:e.o$1((e=>a.onExpurgate(r)),o),j:o,k:"fcaf8a28-0-"+t}))),d:e.o$1(((...e)=>a.onRefresherRefresh&&a.onRefresherRefresh(...e))),e:n.triggered}:{},{f:e.o$1((e=>a.openPopupQuantity())),g:e.sr("createModule","fcaf8a28-1"),h:e.o$1(a.getAnchorList),i:e.sr("modifyStreamer","fcaf8a28-2"),j:e.o$1(a.getAnchorList),k:e.p({message:n.modifyStreamerMessage})})}],["__scopeId","data-v-fcaf8a28"]]);wx.createPage(t);
