(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-manage-moderator"],{"5ae6":function(t,e,n){"use strict";n.r(e);var i=n("793e"),a=n("5b45");for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);var s=n("828b"),c=Object(s["a"])(a["default"],i["b"],i["c"],!1,null,"1fb65f89",null,!1,i["a"],void 0);e["default"]=c.exports},"5b45":function(t,e,n){"use strict";n.r(e);var i=n("9620"),a=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=a.a},"793e":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"userpost",class:t.AppStyle},[n("v-uni-view",{staticClass:"header",style:[{height:t.CustomBar+"px"}]},[n("v-uni-view",{staticClass:"cu-bar bg-white",style:{height:t.CustomBar+"px","padding-top":t.StatusBar+"px"}},[n("v-uni-view",{staticClass:"action",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.back.apply(void 0,arguments)}}},[n("v-uni-text",{staticClass:"cuIcon-back"})],1),n("v-uni-view",{staticClass:"content text-bold",style:[{top:t.StatusBar+"px"}]},[t._v("圈主管理")]),t.resOf?t._e():n("v-uni-view",{staticClass:"action",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.setModerator()}}},[n("v-uni-button",{staticClass:"cu-btn round bg-blue"},[t._v("添加圈主")])],1)],1)],1),n("v-uni-view",{style:[{padding:t.NavBar+"px 10px 0px 10px"}]}),n("v-uni-form",[t.resOf?t._e():n("v-uni-view",{staticClass:"cu-form-group margin-top",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toSection()}}},[n("v-uni-view",{staticClass:"title"},[t._v("选择圈子")]),n("v-uni-view",{staticClass:"picker"},[n("v-uni-text",{staticClass:"text-green"},[t._v(t._s(t.curSection.name))]),n("v-uni-text",{staticClass:"cuIcon-right"})],1)],1)],1),n("v-uni-view",{staticClass:"cu-list menu-avatar userList",staticStyle:{"margin-top":"20upx"}},t._l(t.moderators,(function(e,i){return n("v-uni-view",{key:i,staticClass:"cu-item"},[n("v-uni-view",{staticClass:"cu-avatar round lg",style:{"background-image":"url("+e.userJson.avatar+")"}}),n("v-uni-view",{staticClass:"content"},[n("v-uni-view",{staticClass:"text-grey"},[[t._v(t._s(e.userJson.name))]],2),n("v-uni-view",{staticClass:"text-gray text-sm flex"},[n("v-uni-view",{staticClass:"text-cut"},[t._v(t._s(t.restrictList[e.purview-1].name))])],1)],1),n("v-uni-view",{staticClass:"action goUserIndex"},[n("v-uni-view",{staticClass:"cu-btn text-red",on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.deleteModerator(e.id)}}},[t._v("卸任")])],1)],1)})),1)],1)},a=[]},9620:function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("95d0"),a={data:function(){return{StatusBar:this.StatusBar,CustomBar:this.CustomBar,NavBar:this.StatusBar+this.CustomBar,AppStyle:this.$store.state.AppStyle,moderators:[],curSection:{name:"",id:0},resOf:!1,restrictList:[{id:1,name:"审核员"},{id:2,name:"执行员"},{id:3,name:"小圈主"},{id:4,name:"圈主"},{id:5,name:"圈子管理员"}]}},onShow:function(){i.localStorage.getItem("curSection")&&(this.curSection=JSON.parse(i.localStorage.getItem("curSection")),this.getSectionInfo(),i.localStorage.removeItem("curSection"))},onLoad:function(t){t.id&&(this.resOf=!0,this.curSection.id=t.id,this.getSectionInfo()),i.localStorage.getItem("token")&&(this.token=i.localStorage.getItem("token"))},methods:{back:function(){uni.navigateBack({delta:1})},toSection:function(){uni.navigateTo({url:"/pages/forum/section?type=1"})},setModerator:function(){uni.navigateTo({url:"/pages/manage/setModerator"})},deleteModerator:function(t){var e=this,n="";if(i.localStorage.getItem("userinfo")){var a=JSON.parse(i.localStorage.getItem("userinfo"));n=a.token}var o={id:t,token:n};uni.showModal({title:"确定要卸任该圈主吗",success:function(t){t.confirm?(uni.showLoading({title:"加载中"}),e.$Net.request({url:e.$API.deleteModerator(),data:o,header:{"Content-Type":"application/x-www-form-urlencoded"},method:"get",dataType:"json",success:function(t){setTimeout((function(){uni.hideLoading()}),1e3),1==t.data.code?(uni.showToast({title:"操作成功，请等待缓存刷新",icon:"none"}),e.getSectionInfo()):uni.showToast({title:t.data.msg,icon:"none"})},fail:function(t){setTimeout((function(){uni.hideLoading()}),1e3),uni.showToast({title:"网络开小差了哦",icon:"none"})}})):t.cancel&&console.log("用户点击取消")}})},getSectionInfo:function(){var t=this,e="";if(i.localStorage.getItem("userinfo")){var n=JSON.parse(i.localStorage.getItem("userinfo"));e=n.token}t.$Net.request({url:t.$API.sectionInfo(),data:{id:t.curSection.id,token:e},header:{"Content-Type":"application/x-www-form-urlencoded"},method:"get",dataType:"json",success:function(e){1==e.data.code&&(t.moderators=e.data.data.moderators)},fail:function(t){uni.showToast({title:"网络开小差了哦",icon:"none"})}})}}};e.default=a}}]);