(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-manage-categoryEdit"],{"1ba1":function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("af30"),a={data:function(){return{StatusBar:this.StatusBar,CustomBar:this.CustomBar,NavBar:this.StatusBar+this.CustomBar,AppStyle:this.$store.state.AppStyle,type:"add",token:"",id:0,name:"",order:""}},onPullDownRefresh:function(){},onShow:function(){},onLoad:function(t){t.type&&(this.type=t.type),t.id&&(this.id=t.id,this.getSectionInfo()),i.localStorage.getItem("token")&&(this.token=i.localStorage.getItem("token"))},methods:{back:function(){uni.navigateBack({delta:1})},addCategory:function(){var t=this;if(""==t.name||""==t.order)return uni.showToast({title:"请完成表单填写",icon:"none",duration:1e3,position:"bottom"}),!1;var e={name:t.name,order:t.order,type:"sort",token:t.token};uni.showLoading({title:"加载中"}),t.$Net.request({url:t.$API.addSection(),data:t.$API.removeObjectEmptyKey(e),header:{"Content-Type":"application/x-www-form-urlencoded"},method:"get",dataType:"json",success:function(e){if(setTimeout((function(){uni.hideLoading()}),1e3),uni.showToast({title:e.data.msg,icon:"none"}),1==e.data.code)setTimeout((function(){t.back()}),1e3)},fail:function(t){setTimeout((function(){uni.hideLoading()}),1e3),uni.showToast({title:"网络开小差了哦",icon:"none"}),uni.stopPullDownRefresh()}})},getSectionInfo:function(){var t=this;t.$Net.request({url:t.$API.sectionInfo(),data:{id:t.id},header:{"Content-Type":"application/x-www-form-urlencoded"},method:"get",dataType:"json",success:function(e){1==e.data.code&&(t.name=e.data.data.name,t.order=e.data.data.orderKey)},fail:function(t){uni.showToast({title:"网络开小差了哦",icon:"none"})}})},editCategory:function(){var t=this;if(""==t.name||""==t.order)return uni.showToast({title:"请完成表单填写",icon:"none",duration:1e3,position:"bottom"}),!1;var e={id:t.id,name:t.name,order:t.order,type:"sort",token:t.token};uni.showLoading({title:"加载中"}),t.$Net.request({url:t.$API.editSection(),data:t.$API.removeObjectEmptyKey(e),header:{"Content-Type":"application/x-www-form-urlencoded"},method:"get",dataType:"json",success:function(e){if(setTimeout((function(){uni.hideLoading()}),1e3),uni.showToast({title:e.data.msg,icon:"none"}),1==e.data.code)setTimeout((function(){t.back()}),1e3)},fail:function(t){setTimeout((function(){uni.hideLoading()}),1e3),uni.showToast({title:"网络开小差了哦",icon:"none"}),uni.stopPullDownRefresh()}})}}};e.default=a},"9ef1":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:"user",class:t.$store.state.AppStyle,staticStyle:{"background-color":"#f6f6f6"}},[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"}]},["add"==t.type?[t._v("添加圈子大类")]:[t._v("圈子大类编辑")]],2),"edit"==t.type?n("v-uni-view",{staticClass:"action",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.editCategory.apply(void 0,arguments)}}},[n("v-uni-button",{staticClass:"cu-btn round bg-blue"},[t._v("保存")])],1):t._e(),"add"==t.type?n("v-uni-view",{staticClass:"action",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.addCategory.apply(void 0,arguments)}}},[n("v-uni-button",{staticClass:"cu-btn round bg-blue"},[t._v("提交")])],1):t._e()],1)],1),n("v-uni-view",{style:[{padding:t.NavBar+"px 10px 0px 10px"}]}),n("v-uni-form",["edit"==t.type?n("v-uni-view",{staticClass:"cu-form-group margin-top"},[n("v-uni-view",{staticClass:"title"},[t._v("ID")]),n("v-uni-input",{attrs:{name:"input",disabled:!0,value:t.id}})],1):t._e(),n("v-uni-view",{staticClass:"cu-form-group margin-top"},[n("v-uni-view",{staticClass:"title"},[t._v("名称")]),n("v-uni-input",{attrs:{name:"input",type:"text"},model:{value:t.name,callback:function(e){t.name=e},expression:"name"}})],1),n("v-uni-view",{staticClass:"cu-form-group margin-top"},[n("v-uni-view",{staticClass:"title"},[t._v("排序")]),n("v-uni-input",{attrs:{name:"input",type:"number",placeholder:"数值越大,排序越高"},model:{value:t.order,callback:function(e){t.order=e},expression:"order"}})],1)],1)],1)},a=[]},abdf:function(t,e,n){"use strict";n.r(e);var i=n("9ef1"),a=n("cbe2");for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);var u=n("828b"),s=Object(u["a"])(a["default"],i["b"],i["c"],!1,null,"9cbbb9dc",null,!1,i["a"],void 0);e["default"]=s.exports},cbe2:function(t,e,n){"use strict";n.r(e);var i=n("1ba1"),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}}]);