(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["content"],{"0d0e":function(e,t,a){},"0fc8":function(e,t,a){},"2b0e8":function(e,t,a){"use strict";a.r(t);a("b0c0");var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-row",{staticClass:"row-item-search"},[t("a-form",{staticClass:"search-form",attrs:{form:e.searchForm,layout:"inline"},on:{submit:e.handleSearch}},[t("a-form-item",{attrs:{label:"文件名称"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["fileName"],expression:"['fileName']"}],attrs:{placeholder:"请输入文件名称"}})],1),t("a-form-item",{attrs:{label:"文件分组"}},[t("a-tree-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["groupId",{initialValue:-1}],expression:"['groupId', { initialValue: -1 }]"}],attrs:{treeDefaultExpandAll:"",allowClear:"",treeData:e.groupListTreeSelect,dropdownStyle:{maxHeight:"500px",overflow:"auto"}}})],1),t("a-form-item",{attrs:{label:"存储方式"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["storage",{initialValue:""}],expression:"['storage', { initialValue: '' }]"}]},[t("a-select-option",{attrs:{value:""}},[e._v("全部")]),e._l(e.StorageEnum.data,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.value}},[e._v(e._s(a.name))])}))],2)],1),t("a-form-item",{attrs:{label:"上传来源"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["channel",{initialValue:-1}],expression:"['channel', { initialValue: -1 }]"}]},[t("a-select-option",{attrs:{value:-1}},[e._v("全部")]),e._l(e.ChannelEnum.data,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.value}},[e._v(e._s(a.name))])}))],2)],1),t("a-form-item",{staticClass:"search-btn"},[t("a-button",{attrs:{type:"primary",icon:"search","html-type":"submit"}},[e._v("搜索")])],1),t("a-form-item",{staticClass:"search-btn"},[t("a-button",{on:{click:e.handleReset}},[e._v("重置")])],1)],1)],1),t("div",{staticClass:"row-item-tab clearfix"},[t("div",{staticClass:"tab-list fl-l"},[t("a-radio-group",{attrs:{defaultValue:e.queryParam.fileType},on:{change:e.handleTabs}},[t("a-radio-button",{attrs:{value:-1}},[e._v("全部")]),e._l(e.FileTypeEnum.data,(function(a,r){return t("a-radio-button",{key:r,attrs:{value:a.value}},[e._v(e._s(a.name))])}))],2)],1),e.selectedRowKeys.length?t("div",{staticClass:"button-group"},[t("a-button-group",[t("a-button",{attrs:{icon:"swap"},on:{click:e.handleBatchMove}},[e._v("移动")]),t("a-button",{attrs:{icon:"delete"},on:{click:e.handleBatchDelete}},[e._v("删除")])],1)],1):e._e()])],1),t("s-table",{ref:"table",attrs:{rowKey:"file_id",loading:e.isLoading,columns:e.columns,data:e.loadData,rowSelection:e.rowSelection,pageSize:15,scroll:{x:1300}},scopedSlots:e._u([{key:"preview_url",fn:function(e,a){return t("span",{},[t("div",{staticClass:"preview-box"},[t("a",{attrs:{href:a.external_url,target:"_blank"}},[t("img",{attrs:{src:e}})])])])}},{key:"file_name",fn:function(a){return t("span",{},[t("p",{staticClass:"oneline-hide"},[e._v(e._s(a))])])}},{key:"storage",fn:function(a){return t("span",{},[t("a-tag",[e._v(e._s(e.StorageEnum[a].name))])],1)}},{key:"file_type",fn:function(a){return t("span",{},[t("a-tag",[e._v(e._s(e.FileTypeEnum[a].name))])],1)}},{key:"action",fn:function(a,r){return t("span",{},[t("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(t){return e.handleEdit(r)}}},[e._v("编辑")]),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(t){return e.handleDelete(r)}}},[e._v("删除")])])}}])}),t("MoveGroupForm",{ref:"MoveGroupForm",attrs:{groupList:e.groupListTree},on:{handleSubmit:e.handleRefresh}}),t("EditForm",{ref:"EditForm",attrs:{groupList:e.groupListTree},on:{handleSubmit:e.handleRefresh}})],1)},i=[],n=a("5530"),o=(a("d3b7"),a("99af"),a("159b"),a("2518")),l=a("9aca"),s=a("2af9"),d=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:420,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[e.groupTreeData.length?t("a-tree",{attrs:{selectable:!0,blockNode:!0,treeData:e.groupTreeData,autoExpandParent:!0},on:{select:e.onSelect}}):e._e()],1)],1)},c=[],u={props:{groupList:{type:Array,required:!0}},data:function(){return{title:"移动到分组",labelCol:{xs:{span:24},sm:{span:7}},wrapperCol:{xs:{span:24},sm:{span:13}},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),filesIds:{},groupTreeData:[],selectedKeys:[]}},methods:{show:function(e){this.visible=!0,this.filesIds=e,this.getList()},getList:function(){this.groupTreeData.length<=0&&(this.groupTreeData=[{title:"未分组",key:0,value:0}].concat(this.groupList))},onSelect:function(e){this.selectedKeys=e},handleSubmit:function(e){e.preventDefault(),this.selectedKeys.length?this.onFormSubmit():this.handleCancel()},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(){var e=this;this.confirmLoading=!0,o["d"]({groupId:this.selectedKeys[0],fileIds:this.filesIds}).then((function(t){e.$message.success(t.message),e.handleCancel(),e.$emit("handleSubmit")})).finally((function(){return e.confirmLoading=!1}))}}},m=u,f=a("2877"),p=Object(f["a"])(m,d,c,!1,null,null,null),h=p.exports,v=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:"编辑文件",width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"文件名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["file_name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['file_name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),t("a-form-item",{attrs:{label:"上级分组",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-tree-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["group_id"],expression:"['group_id']"}],attrs:{treeData:e.groupTreeData,dropdownStyle:{maxHeight:"400px",overflow:"auto"},allowClear:""}})],1)],1)],1)],1)},b=[],g=a("2ef0"),C=a.n(g),w={props:{groupList:{type:Array,required:!0}},data:function(){return{title:"",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),record:{},groupTreeData:[]}},methods:{edit:function(e){this.visible=!0,this.record=e,this.getGroupList(),this.setFieldsValue()},setFieldsValue:function(){var e=this,t=this.$nextTick,a=this.form.setFieldsValue;t((function(){a(C.a.pick(e.record,["file_name","group_id"]))}))},getGroupList:function(){this.groupTreeData.length<=0&&(this.groupTreeData=[{title:"未分组",key:0,value:0}].concat(this.groupList))},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){e||(a.status=a.status?1:0,t.onFormSubmit(a))}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,o["b"]({fileId:this.record["file_id"],form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(e){t.confirmLoading=!1}))}}},_=w,y=Object(f["a"])(_,v,b,!1,null,null,null),x=y.exports,S=a("b7ea"),L=a("71b5"),F=a("c9cc"),k={name:"Index",components:{STable:s["d"],MoveGroupForm:h,EditForm:x},data:function(){var e=this;return{FileTypeEnum:S["a"],StorageEnum:L["a"],ChannelEnum:F["a"],searchForm:this.$form.createForm(this),queryParam:{fileType:-1},isLoading:!1,columns:[{title:"文件ID",dataIndex:"file_id"},{title:"文件预览",dataIndex:"preview_url",scopedSlots:{customRender:"preview_url"}},{title:"文件名称",width:"260px",dataIndex:"file_name",scopedSlots:{customRender:"file_name"}},{title:"存储方式",dataIndex:"storage",scopedSlots:{customRender:"storage"}},{title:"文件类型",dataIndex:"file_type",scopedSlots:{customRender:"file_type"}},{title:"文件大小(字节)",dataIndex:"file_size"},{title:"文件后缀",dataIndex:"file_ext"},{title:"上传时间",width:"180px",dataIndex:"create_time"},{title:"操作",dataIndex:"action",width:"150px",fixed:"right",scopedSlots:{customRender:"action"}}],selectedRowKeys:[],loadData:function(t){return o["c"](Object(n["a"])(Object(n["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))},groupListTree:[],groupListTreeSelect:[]}},created:function(){this.getGroupList()},computed:{rowSelection:function(){return{selectedRowKeys:this.selectedRowKeys,onChange:this.onSelectChange}}},methods:{onSelectChange:function(e){this.selectedRowKeys=e},handleTabs:function(e){this.queryParam.fileType=e.target.value,this.handleRefresh()},handleSearch:function(e){var t=this;e.preventDefault(),this.searchForm.validateFields((function(e,a){e||(t.queryParam=Object(n["a"])(Object(n["a"])({},t.queryParam),a),t.handleRefresh())}))},handleReset:function(){this.selectedRowKeys=[],this.searchForm.resetFields()},getGroupList:function(){var e=this;this.isLoading=!0,l["d"]().then((function(t){var a=t.data.list,r=e.formatTreeData(a);e.groupListTree=r,e.groupListTreeSelect=[{title:"全部",key:-1,value:-1},{title:"未分组",key:0,value:0}].concat(r)})).finally((function(){return e.isLoading=!1}))},formatTreeData:function(e){var t=this,a=[];return e.forEach((function(e){var r={title:e.name,key:e.group_id,value:e.group_id};e.children&&e.children.length&&(r["children"]=t.formatTreeData(e["children"])),a.push(r)})),a},handleEdit:function(e){this.$refs.EditForm.edit(e)},handleDelete:function(e){this.onDelete([e["file_id"]])},handleBatchDelete:function(){this.onDelete(this.selectedRowKeys)},onDelete:function(e){var t=this,a=this.$confirm({title:"您确定要删除该文件吗?",content:"删除后不可恢复,请谨慎操作",onOk:function(){return o["a"]({fileIds:e}).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).catch((function(){return!0})).finally((function(e){return a.destroy()}))}})},handleBatchMove:function(){this.$refs.MoveGroupForm.show(this.selectedRowKeys)},handleRefresh:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedRowKeys=[],this.$refs.table.refresh(e)}}},I=k,q=(a("7d8b"),Object(f["a"])(I,r,i,!1,null,"3a09562e",null));t["default"]=q.exports},3226:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-button",{directives:[{name:"action",rawName:"v-action:add",arg:"add"}],attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")])],1),e.isLoading?e._e():t("a-table",{attrs:{rowKey:"category_id",columns:e.columns,dataSource:e.categoryList,defaultExpandAllRows:!0,expandIconColumnIndex:1,pagination:!1,loading:e.isLoading},scopedSlots:e._u([{key:"img_url",fn:function(a){return t("span",{},[a?t("a",{attrs:{title:"点击查看原图",href:a,target:"_blank"}},[t("img",{attrs:{height:"50",src:a,alt:"分类图片"}})]):e._e()])}},{key:"status",fn:function(a){return t("span",{},[t("a-tag",{attrs:{color:a?"green":""}},[e._v(e._s(a?"显示":"隐藏"))])],1)}},{key:"action",fn:function(a,r){return t("span",{},[t("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(t){return e.handleEdit(r)}}},[e._v("编辑")]),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(t){return e.handleDelete(r)}}},[e._v("删除")])])}}],null,!1,3797687364)}),t("AddForm",{ref:"AddForm",on:{handleSubmit:e.handleRefresh}}),t("EditForm",{ref:"EditForm",on:{handleSubmit:e.handleRefresh}})],1)},i=[],n=(a("d3b7"),a("89a2")),o=a("2af9"),l=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:"编辑商品分类",width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"分类名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),t("a-form-item",{attrs:{label:"分类图片",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["img_id",{rules:[{required:!0,message:"请选择分类图片"}]}],expression:"['img_id', { rules: [{ required: true, message: '请选择分类图片' }] }]"}]})],1),t("a-form-item",{attrs:{label:"状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"用户端是否展示"}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:1,rules:[{required:!0}]}],expression:"['status', { initialValue: 1, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:1}},[e._v("显示")]),t("a-radio",{attrs:{value:0}},[e._v("隐藏")])],1)],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入至少1个数字"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入至少1个数字' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},s=[],d={components:{SelectImage:o["i"]},data:function(){return{title:"",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this)}},methods:{add:function(){this.visible=!0},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){e||t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,n["a"]({form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(e){t.confirmLoading=!1}))}}},c=d,u=a("2877"),m=Object(u["a"])(c,l,s,!1,null,null,null),f=m.exports,p=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:"编辑商品分类",width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"分类名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),t("a-form-item",{attrs:{label:"分类图片",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["img_id",{rules:[{required:!0,message:"请选择分类图片"}]}],expression:"['img_id', { rules: [{ required: true, message: '请选择分类图片' }] }]"}],attrs:{defaultList:e.record.catImg?[e.record.catImg]:[]}})],1),t("a-form-item",{attrs:{label:"状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"用户端是否展示"}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:1,rules:[{required:!0}]}],expression:"['status', { initialValue: 1, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:1}},[e._v("显示")]),t("a-radio",{attrs:{value:0}},[e._v("隐藏")])],1)],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入至少1个数字"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入至少1个数字' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},h=[],v=a("88bc"),b=a.n(v),g={components:{SelectImage:o["i"]},data:function(){return{title:"",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),record:{}}},methods:{edit:function(e){this.visible=!0,this.record=e,this.setFieldsValue()},setFieldsValue:function(){var e=this,t=this.$nextTick,a=this.form.setFieldsValue;t((function(){a(b()(e.record,["name","status","sort","img_id"]))}))},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){e||t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,n["c"]({categoryId:this.record["category_id"],form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(e){t.confirmLoading=!1}))}}},C=g,w=Object(u["a"])(C,p,h,!1,null,null,null),_=w.exports,y={name:"Index",components:{STable:o["d"],AddForm:f,EditForm:_},data:function(){return{categoryList:[],queryParam:{},isLoading:!1,columns:[{title:"分类ID",dataIndex:"category_id"},{title:"分类名称",dataIndex:"name"},{title:"分类图片",dataIndex:"img_url",scopedSlots:{customRender:"img_url"}},{title:"状态",dataIndex:"status",scopedSlots:{customRender:"status"}},{title:"排序",dataIndex:"sort"},{title:"添加时间",dataIndex:"create_time"},{title:"操作",dataIndex:"action",width:"180px",scopedSlots:{customRender:"action"}}]}},created:function(){this.getCategoryList(!0)},methods:{getCategoryList:function(e){var t=this;e&&(this.isLoading=!0),n["d"]().then((function(e){t.categoryList=e.data.list})).finally((function(){return t.isLoading=!1}))},handleAdd:function(){this.$refs.AddForm.add()},handleEdit:function(e){this.$refs.EditForm.edit(e)},handleDelete:function(e){var t=this,a=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return n["b"]({categoryId:e["category_id"]}).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).finally((function(e){return a.destroy()}))}})},handleRefresh:function(){this.getCategoryList()}}},x=y,S=Object(u["a"])(x,r,i,!1,null,null,null);t["default"]=S.exports},"33ba":function(e,t,a){},"4a98":function(e,t,a){"use strict";a.r(t);a("b0c0");var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-row",{staticClass:"row-item-search"},[t("a-form",{staticClass:"search-form",attrs:{form:e.searchForm,layout:"inline"},on:{submit:e.handleSearch}},[t("a-form-item",{attrs:{label:"会员昵称"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["search"],expression:"['search']"}],attrs:{placeholder:"请输入会员昵称"}})],1),t("a-form-item",{attrs:{label:"余额变动场景"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["scene",{initialValue:0}],expression:"['scene', { initialValue: 0 }]"}]},[t("a-select-option",{attrs:{value:0}},[e._v("全部")]),e._l(e.SceneEnum.data,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.value}},[e._v(e._s(a.name))])}))],2)],1),t("a-form-item",{attrs:{label:"变动时间"}},[t("a-range-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["betweenTime"],expression:"['betweenTime']"}],attrs:{format:"YYYY-MM-DD"}})],1),t("a-form-item",{staticClass:"search-btn"},[t("a-button",{attrs:{type:"primary",icon:"search","html-type":"submit"}},[e._v("搜索")])],1)],1)],1)],1),t("s-table",{ref:"table",attrs:{rowKey:"log_id",loading:e.isLoading,columns:e.columns,data:e.loadData,pageSize:15},scopedSlots:e._u([{key:"user",fn:function(e){return t("span",{},[t("UserItem",{attrs:{user:e}})],1)}},{key:"scene",fn:function(a){return t("span",{},[t("a-tag",[e._v(e._s(e.SceneEnum[a].name))])],1)}}])})],1)},i=[],n=a("5530"),o=a("b775"),l={log:"/user.balance/log"};function s(e){return Object(o["b"])({url:l.log,method:"get",params:e})}var d=a("ab09"),c=a("fe7e"),u={name:"Index",components:{STable:d["b"],UserItem:d["d"]},data:function(){var e=this;return{SceneEnum:c["a"],searchForm:this.$form.createForm(this),queryParam:{},isLoading:!1,columns:[{title:"ID",dataIndex:"log_id"},{title:"会员信息",dataIndex:"user",scopedSlots:{customRender:"user"}},{title:"余额变动场景",dataIndex:"scene",scopedSlots:{customRender:"scene"}},{title:"变动金额",dataIndex:"money"},{title:"描述/说明",dataIndex:"describe"},{title:"管理员备注",dataIndex:"remark"},{title:"变动时间",dataIndex:"create_time"}],loadData:function(t){return s(Object(n["a"])(Object(n["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))}}},created:function(){},methods:{handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)},handleSearch:function(e){var t=this;e.preventDefault(),this.searchForm.validateFields((function(e,a){e||(t.queryParam=Object(n["a"])(Object(n["a"])({},t.queryParam),a),t.handleRefresh(!0))}))}}},m=u,f=(a("9f39"),a("2877")),p=Object(f["a"])(m,r,i,!1,null,"2466693d",null);t["default"]=p.exports},"53d2":function(e,t,a){},"5c39":function(e,t,a){"use strict";a("33ba")},"66c9":function(e,t,a){"use strict";a.r(t);a("b0c0");var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-row",{staticClass:"row-item-search"},[t("a-form",{staticClass:"search-form",attrs:{form:e.searchForm,layout:"inline"},on:{submit:e.handleSearch}},[t("a-form-item",{attrs:{label:"会员昵称/订单号"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["search"],expression:"['search']"}],attrs:{placeholder:"请输入会员昵称/订单号"}})],1),t("a-form-item",{attrs:{label:"充值方式"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["recharge_type",{initialValue:0}],expression:"['recharge_type', { initialValue: 0 }]"}]},[t("a-select-option",{attrs:{value:0}},[e._v("全部")]),e._l(e.RechargeTypeEnum.data,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.value}},[e._v(e._s(a.name))])}))],2)],1),t("a-form-item",{attrs:{label:"支付状态"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["pay_status",{initialValue:0}],expression:"['pay_status', { initialValue: 0 }]"}]},[t("a-select-option",{attrs:{value:0}},[e._v("全部")]),t("a-select-option",{attrs:{value:10}},[e._v("待支付")]),t("a-select-option",{attrs:{value:20}},[e._v("已支付")])],1)],1),t("a-form-item",{attrs:{label:"付款时间"}},[t("a-range-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["betweenTime"],expression:"['betweenTime']"}],attrs:{format:"YYYY-MM-DD"}})],1),t("a-form-item",{staticClass:"search-btn"},[t("a-button",{attrs:{type:"primary",icon:"search","html-type":"submit"}},[e._v("搜索")])],1)],1)],1)],1),t("s-table",{ref:"table",attrs:{rowKey:"order_id",loading:e.isLoading,columns:e.columns,data:e.loadData,pageSize:15},scopedSlots:e._u([{key:"user",fn:function(e){return t("span",{},[t("UserItem",{attrs:{user:e}})],1)}},{key:"order_plan",fn:function(a){return t("span",{},[a?t("a-tag",[e._v(e._s(a.plan_name))]):t("span",[e._v("--")])],1)}},{key:"recharge_type",fn:function(a){return t("span",{},[t("a-tag",[e._v(e._s(e.RechargeTypeEnum[a].name))])],1)}},{key:"pay_status",fn:function(a){return t("span",{},[t("a-tag",{attrs:{color:20==a?"green":""}},[e._v(e._s(20==a?"已支付":"待支付"))])],1)}}])})],1)},i=[],n=a("5530"),o=a("b775"),l={order:"/user.recharge/order"};function s(e){return Object(o["b"])({url:l.order,method:"get",params:e})}var d=a("ab09"),c=a("5c06"),u=new c["a"]([{key:"PENDING",name:"待支付",value:10},{key:"SUCCESS",name:"支付成功",value:20}]),m=new c["a"]([{key:"CUSTOM",name:"自定义金额",value:10},{key:"PLAN",name:"套餐充值",value:20}]),f={name:"Index",components:{STable:d["b"],UserItem:d["d"]},data:function(){var e=this;return{PayStatusEnum:u,RechargeTypeEnum:m,searchForm:this.$form.createForm(this),queryParam:{},isLoading:!1,columns:[{title:"ID",dataIndex:"order_id"},{title:"会员信息",dataIndex:"user",scopedSlots:{customRender:"user"}},{title:"订单号",dataIndex:"order_no"},{title:"充值方式",dataIndex:"recharge_type",scopedSlots:{customRender:"recharge_type"}},{title:"套餐名称",dataIndex:"order_plan",scopedSlots:{customRender:"order_plan"}},{title:"支付金额",dataIndex:"pay_price"},{title:"赠送金额",dataIndex:"gift_money"},{title:"支付状态",dataIndex:"pay_status",scopedSlots:{customRender:"pay_status"}},{title:"付款时间",dataIndex:"pay_time"},{title:"创建时间",dataIndex:"create_time"}],loadData:function(t){return s(Object(n["a"])(Object(n["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))}}},created:function(){},methods:{handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)},handleSearch:function(e){var t=this;e.preventDefault(),this.searchForm.validateFields((function(e,a){e||(t.queryParam=Object(n["a"])(Object(n["a"])({},t.queryParam),a),t.handleRefresh(!0))}))}}},p=f,h=(a("7c13"),a("2877")),v=Object(h["a"])(p,r,i,!1,null,"e7f9db82",null);t["default"]=v.exports},"71b5":function(e,t,a){"use strict";var r=a("5c06");t["a"]=new r["a"]([{key:"LOCAL",name:"本地",value:"local"},{key:"QINIU",name:"七牛云",value:"qiniu"},{key:"ALIYUN",name:"阿里云",value:"aliyun"},{key:"QCLOUD",name:"腾讯云",value:"qcloud"},{key:"EXTERNAL",name:"外部链接",value:"external"}])},"7bed":function(e,t,a){},"7c13":function(e,t,a){"use strict";a("0fc8")},"7d8b":function(e,t,a){"use strict";a("53d2")},"88bc":function(e,t,a){(function(t){var a=1/0,r=9007199254740991,i="[object Arguments]",n="[object Function]",o="[object GeneratorFunction]",l="[object Symbol]",s="object"==typeof t&&t&&t.Object===Object&&t,d="object"==typeof self&&self&&self.Object===Object&&self,c=s||d||Function("return this")();function u(e,t,a){switch(a.length){case 0:return e.call(t);case 1:return e.call(t,a[0]);case 2:return e.call(t,a[0],a[1]);case 3:return e.call(t,a[0],a[1],a[2])}return e.apply(t,a)}function m(e,t){var a=-1,r=e?e.length:0,i=Array(r);while(++a0&&a(l)?t>1?_(l,t-1,a,r,i):f(i,l):r||(i[i.length]=l)}return i}function y(e,t){return e=Object(e),x(e,t,(function(t,a){return a in e}))}function x(e,t,a){var r=-1,i=t.length,n={};while(++r-1&&e%1==0&&e<=r}function R(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function O(e){return!!e&&"object"==typeof e}function V(e){return"symbol"==typeof e||O(e)&&v.call(e)==l}var j=S((function(e,t){return null==e?{}:y(e,m(_(t,1),F))}));e.exports=j}).call(this,a("c8ba"))},"89a2":function(e,t,a){"use strict";a.d(t,"d",(function(){return n})),a.d(t,"a",(function(){return o})),a.d(t,"c",(function(){return l})),a.d(t,"b",(function(){return s}));var r=a("b775"),i={list:"/content.article.category/list",add:"/content.article.category/add",edit:"/content.article.category/edit",delete:"/content.article.category/delete"};function n(e){return Object(r["b"])({url:i.list,method:"get",params:e})}function o(e){return Object(r["b"])({url:i.add,method:"post",data:e})}function l(e){return Object(r["b"])({url:i.edit,method:"post",data:e})}function s(e){return Object(r["b"])({url:i.delete,method:"post",data:e})}},"935f":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-button",{directives:[{name:"action",rawName:"v-action:add",arg:"add"}],attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")])],1),t("s-table",{ref:"table",attrs:{rowKey:"id",loading:e.isLoading,columns:e.columns,data:e.loadData,pageSize:15},scopedSlots:e._u([{key:"content",fn:function(a){return t("span",{},[t("p",{staticClass:"twoline-hide",staticStyle:{width:"420px"}},[e._v(e._s(a))])])}},{key:"action",fn:function(a,r){return t("span",{},[t("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(t){return e.handleEdit(r)}}},[e._v("编辑")]),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],staticStyle:{"margin-right":"8px"},on:{click:function(t){return e.handleDelete(r)}}},[e._v("删除")]),t("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],on:{click:function(t){return e.handleView(r)}}},[e._v("查看")])])}}])}),t("AddForm",{ref:"AddForm",on:{handleSubmit:e.handleRefresh}}),t("EditForm",{ref:"EditForm",on:{handleSubmit:e.handleRefresh}}),t("ViewForm",{ref:"ViewForm",on:{handleSubmit:e.handleRefresh}})],1)},i=[],n=a("5530"),o=(a("d3b7"),a("b775")),l={list:"/content.agreement/list",add:"/content.agreement/add",edit:"/content.agreement/edit",delete:"/content.agreement/delete"};function s(e){return Object(o["b"])({url:l.list,method:"get",params:e})}function d(e){return Object(o["b"])({url:l.add,method:"post",data:e})}function c(e){return Object(o["b"])({url:l.edit,method:"post",data:e})}function u(e){return Object(o["b"])({url:l.delete,method:"post",data:e})}var m=a("2af9"),f=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"协议名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"请输入协议名称"}]}],expression:"['name', { rules: [{ required: true, message: '请输入协议名称' }] }]"}]})],1),t("a-form-item",{attrs:{label:"协议类型",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["type",{rules:[{required:!0,message:"请输入协议类型"}]}],expression:"['type', { rules: [{ required: true, message: '请输入协议类型' }] }]"}]})],1),t("a-form-item",{attrs:{label:"协议内容",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("Ueditor",{directives:[{name:"decorator",rawName:"v-decorator",value:["content",{rules:[{required:!0,message:"文章内容不能为空"}]}],expression:"['content', { rules: [{ required: true, message: '文章内容不能为空' }] }]"}]})],1)],1)],1)],1)},p=[],h=a("88bc"),v=a.n(h),b={components:{SelectRegion:m["k"],Ueditor:m["p"]},data:function(){return{title:"编辑富文本管理",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this)}},methods:{add:function(){this.visible=!0},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){!e&&t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,d({form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){return t.confirmLoading=!1}))}}},g=b,C=a("2877"),w=Object(C["a"])(g,f,p,!1,null,null,null),_=w.exports,y=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"协议名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"请输入协议名称"}]}],expression:"['name', { rules: [{ required: true, message: '请输入协议名称' }] }]"}]})],1),t("a-form-item",{attrs:{label:"协议类型",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["type",{rules:[{required:!0,message:"请输入联系人姓名"}]}],expression:"['type', { rules: [{ required: true, message: '请输入联系人姓名' }] }]"}]})],1),t("a-form-item",{attrs:{label:"协议内容",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("Ueditor",{directives:[{name:"decorator",rawName:"v-decorator",value:["content",{rules:[{required:!0,message:"文章内容不能为空"}]}],expression:"['content', { rules: [{ required: true, message: '文章内容不能为空' }] }]"}]})],1)],1)],1)],1)},x=[],S={components:{SelectRegion:m["k"],Ueditor:m["p"]},data:function(){return{title:"编辑富文本管理",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),record:{}}},methods:{edit:function(e){this.visible=!0,this.record=e,this.setFieldsValue()},setFieldsValue:function(){var e=this.record,t=this.form.setFieldsValue;this.$nextTick((function(){t(v()(e,["name","type","content"]))}))},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){!e&&t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,c({agreementId:this.record.id,form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){return t.confirmLoading=!1}))}}},L=S,F=Object(C["a"])(L,y,x,!1,null,null,null),k=F.exports,I=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,footer:null},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("div",{staticClass:"content"},[t("p",{staticClass:"recordContent",domProps:{innerHTML:e._s(e.record.content)}})]),t("div",{staticClass:"kong"})])},q=[],$={components:{SelectRegion:m["k"]},data:function(){return{title:"查看富文本管理",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),record:{}}},methods:{edit:function(e){this.visible=!0,this.record=e,this.setFieldsValue()},setFieldsValue:function(){var e=this.record,t=this.form.setFieldsValue;this.$nextTick((function(){t(v()(e,["type","content"]))}))},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){!e&&t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,c({agreementId:this.record.id,form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){return t.confirmLoading=!1}))}}},N=$,D=(a("5c39"),Object(C["a"])(N,I,q,!1,null,"3a6a9c49",null)),R=D.exports,O={name:"Index",components:{STable:m["d"],AddForm:_,EditForm:k,ViewForm:R},data:function(){var e=this;return{queryParam:{},isLoading:!1,columns:[{title:"ID",dataIndex:"id"},{title:"协议名称",dataIndex:"name"},{title:"协议类型",dataIndex:"type"},{title:"更新时间",dataIndex:"update_time"},{title:"添加时间",dataIndex:"create_time"},{title:"操作",dataIndex:"action",width:"180px",scopedSlots:{customRender:"action"}}],loadData:function(t){return s(Object(n["a"])(Object(n["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))}}},created:function(){},methods:{handleAdd:function(){this.$refs.AddForm.add()},handleEdit:function(e){this.$refs.EditForm.edit(e)},handleDelete:function(e){var t=this,a=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return u({agreementId:e.id}).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).finally((function(e){return a.destroy()}))}})},handleView:function(e){this.$refs.ViewForm.edit(e)},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)},onSearch:function(){this.handleRefresh(!0)}}},V=O,j=Object(C["a"])(V,r,i,!1,null,null,null);t["default"]=j.exports},"98bf":function(e,t,a){"use strict";a.r(t);a("b0c0");var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-row",{staticClass:"row-item-search"},[t("a-form",{staticClass:"search-form",attrs:{form:e.searchForm,layout:"inline"},on:{submit:e.handleSearch}},[t("a-form-item",{attrs:{label:"文章标题"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["title"],expression:"['title']"}],attrs:{placeholder:"请输入文章标题"}})],1),t("a-form-item",{attrs:{label:"文章分类"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["categoryId",{initialValue:-1}],expression:"['categoryId', { initialValue: -1 }]"}]},[t("a-select-option",{attrs:{value:-1}},[e._v("全部")]),e._l(e.categoryList,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.category_id}},[e._v(e._s(a.name))])}))],2)],1),t("a-form-item",{attrs:{label:"状态"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:-1}],expression:"['status', { initialValue: -1 }]"}]},[t("a-select-option",{attrs:{value:-1}},[e._v("全部")]),t("a-select-option",{attrs:{value:1}},[e._v("显示")]),t("a-select-option",{attrs:{value:0}},[e._v("隐藏")])],1)],1),t("a-form-item",{staticClass:"search-btn"},[t("a-button",{attrs:{type:"primary",icon:"search","html-type":"submit"}},[e._v("搜索")])],1)],1)],1),t("div",{staticClass:"row-item-tab clearfix"},[t("a-button",{directives:[{name:"action",rawName:"v-action:add",arg:"add"}],attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")])],1)],1),t("s-table",{ref:"table",attrs:{rowKey:"article_id",loading:e.isLoading,columns:e.columns,data:e.loadData,pageSize:15,scroll:{x:1400}},scopedSlots:e._u([{key:"image_url",fn:function(e){return t("span",{},[t("a",{attrs:{title:"点击查看原图",href:e,target:"_blank"}},[t("img",{attrs:{height:"50",src:e,alt:"封面图"}})])])}},{key:"stitle",fn:function(a){return t("span",{},[t("p",{staticClass:"twoline-hide",staticStyle:{width:"270px"}},[e._v(e._s(a))])])}},{key:"category",fn:function(a){return t("span",{},[e._v(e._s(a.name))])}},{key:"status",fn:function(a){return t("span",{},[t("a-tag",{attrs:{color:a?"green":""}},[e._v(e._s(a?"显示":"隐藏"))])],1)}},{key:"action",fn:function(a,r){return t("span",{},[t("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(t){return e.handleEdit(r)}}},[e._v("编辑")]),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(t){return e.handleDelete(r)}}},[e._v("删除")])])}}])}),t("AddForm",{ref:"AddForm",attrs:{categoryList:e.categoryList},on:{handleSubmit:e.handleRefresh}}),t("EditForm",{ref:"EditForm",attrs:{categoryList:e.categoryList},on:{handleSubmit:e.handleRefresh}})],1)},i=[],n=a("5530"),o=(a("d3b7"),a("b775")),l={list:"/content.article/list",detail:"/content.article/detail",add:"/content.article/add",edit:"/content.article/edit",delete:"/content.article/delete"};function s(e){return Object(o["b"])({url:l.list,method:"get",params:e})}function d(e){return Object(o["b"])({url:l.detail,method:"get",params:e})}function c(e){return Object(o["b"])({url:l.add,method:"post",data:e})}function u(e){return Object(o["b"])({url:l.edit,method:"post",data:e})}function m(e){return Object(o["b"])({url:l.delete,method:"post",data:e})}var f=a("89a2"),p=a("2af9"),h=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:780,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"文章标题",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["title",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['title', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),t("a-form-item",{attrs:{label:"文章分类",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["category_id",{rules:[{required:!0,message:"请选择1个商品分类"}]}],expression:"['category_id', { rules: [{ required: true, message: '请选择1个商品分类' }] }]"}]},e._l(e.categoryList,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.category_id}},[e._v(e._s(a.name))])})),1)],1),t("a-form-item",{attrs:{label:"列表显示方式",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["show_type",{initialValue:10,rules:[{required:!0}]}],expression:"['show_type', { initialValue: 10, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:10}},[e._v("小图模式")]),t("a-radio",{attrs:{value:20}},[e._v("大图模式")])],1),t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("小图模式建议封面图尺寸:300 * 188")]),t("p",{staticClass:"extra"},[e._v("大图模式建议封面图尺寸:750 * 455")])])],1),t("a-form-item",{attrs:{label:"封面图",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["image_id",{rules:[{required:!0,message:"请选择1个封面图"}]}],expression:"['image_id', { rules: [{ required: true, message: '请选择1个封面图' }] }]"}],attrs:{defaultList:e.record.image?[e.record.image]:[]}})],1),t("a-form-item",{attrs:{label:"文章内容",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("Ueditor",{directives:[{name:"decorator",rawName:"v-decorator",value:["content",{rules:[{required:!0,message:"文章内容不能为空"}]}],expression:"['content', { rules: [{ required: true, message: '文章内容不能为空' }] }]"}]})],1),t("a-form-item",{attrs:{label:"虚拟阅读量",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"用户看到的阅读量 = 实际阅读量 + 虚拟阅读量"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["virtual_views",{initialValue:100}],expression:"['virtual_views', { initialValue: 100 }]"}],attrs:{min:0}})],1),t("a-form-item",{attrs:{label:"状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"用户端是否展示"}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:1,rules:[{required:!0}]}],expression:"['status', { initialValue: 1, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:1}},[e._v("显示")]),t("a-radio",{attrs:{value:0}},[e._v("隐藏")])],1)],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入至少1个数字"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入至少1个数字' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},v=[],b=a("88bc"),g=a.n(b),C={components:{SelectImage:p["i"],Ueditor:p["p"]},props:{categoryList:{type:Array,required:!0}},data:function(){return{title:"编辑文章",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),articleId:null,record:{}}},methods:{edit:function(e){this.visible=!0,this.articleId=e,this.getDetail()},getDetail:function(){var e=this;this.confirmLoading=!0,d({articleId:this.articleId}).then((function(t){e.record=t.data.detail,e.setFieldsValue()})).finally((function(t){e.confirmLoading=!1}))},setFieldsValue:function(){var e=this,t=this.form.setFieldsValue;this.$nextTick((function(){t(g()(e.record,["title","show_type","category_id","image_id","content","sort","status","virtual_views"]))}))},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){!e&&t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.record={},this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,u({articleId:this.articleId,form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(e){t.confirmLoading=!1}))}}},w=C,_=a("2877"),y=Object(_["a"])(w,h,v,!1,null,null,null),x=y.exports,S=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:780,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"文章标题",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["title",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['title', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),t("a-form-item",{attrs:{label:"文章分类",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["category_id",{rules:[{required:!0,message:"请选择1个商品分类"}]}],expression:"['category_id', { rules: [{ required: true, message: '请选择1个商品分类' }] }]"}]},e._l(e.categoryList,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.category_id}},[e._v(e._s(a.name))])})),1)],1),t("a-form-item",{attrs:{label:"列表显示方式",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["show_type",{initialValue:10,rules:[{required:!0}]}],expression:"['show_type', { initialValue: 10, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:10}},[e._v("小图模式")]),t("a-radio",{attrs:{value:20}},[e._v("大图模式")])],1),t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("小图模式建议封面图尺寸:300 * 188")]),t("p",{staticClass:"extra"},[e._v("大图模式建议封面图尺寸:750 * 455")])])],1),t("a-form-item",{attrs:{label:"封面图",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["image_id",{rules:[{required:!0,message:"请选择1个封面图"}]}],expression:"['image_id', { rules: [{ required: true, message: '请选择1个封面图' }] }]"}]})],1),t("a-form-item",{attrs:{label:"文章内容",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("Ueditor",{directives:[{name:"decorator",rawName:"v-decorator",value:["content",{rules:[{required:!0,message:"文章内容不能为空"}]}],expression:"['content', { rules: [{ required: true, message: '文章内容不能为空' }] }]"}]})],1),t("a-form-item",{attrs:{label:"虚拟阅读量",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"用户看到的阅读量 = 实际阅读量 + 虚拟阅读量"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["virtual_views",{initialValue:100}],expression:"['virtual_views', { initialValue: 100 }]"}],attrs:{min:0}})],1),t("a-form-item",{attrs:{label:"状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"用户端是否展示"}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:1,rules:[{required:!0}]}],expression:"['status', { initialValue: 1, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:1}},[e._v("显示")]),t("a-radio",{attrs:{value:0}},[e._v("隐藏")])],1)],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入至少1个数字"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入至少1个数字' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},L=[],F={components:{SelectImage:p["i"],Ueditor:p["p"]},props:{categoryList:{type:Array,required:!0}},data:function(){return{title:"新增文章",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this)}},methods:{add:function(){this.visible=!0},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){!e&&t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,c({form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(e){t.confirmLoading=!1}))}}},k=F,I=Object(_["a"])(k,S,L,!1,null,null,null),q=I.exports,$=[{title:"ID",dataIndex:"article_id"},{title:"封面图",dataIndex:"image_url",scopedSlots:{customRender:"image_url"}},{title:"文章标题",dataIndex:"title",width:"320px",scopedSlots:{customRender:"stitle"}},{title:"所属分类",dataIndex:"category",scopedSlots:{customRender:"category"}},{title:"状态",dataIndex:"status",scopedSlots:{customRender:"status"}},{title:"排序",dataIndex:"sort"},{title:"创建时间",width:"180px",dataIndex:"create_time"},{title:"更新时间",width:"180px",dataIndex:"update_time"},{title:"操作",dataIndex:"action",width:"150px",fixed:"right",scopedSlots:{customRender:"action"}}],N={name:"Index",components:{ContentHeader:p["a"],STable:p["d"],AddForm:q,EditForm:x},data:function(){var e=this;return{expand:!1,searchForm:this.$form.createForm(this),categoryList:[],queryParam:{},isLoading:!1,columns:$,loadData:function(t){return s(Object(n["a"])(Object(n["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))}}},created:function(){this.getCategoryList()},methods:{getCategoryList:function(){var e=this;this.isLoading=!0,f["d"]().then((function(t){e.categoryList=t.data.list})).finally((function(){return e.isLoading=!1}))},handleSearch:function(e){var t=this;e.preventDefault(),this.searchForm.validateFields((function(e,a){e||(t.queryParam=Object(n["a"])(Object(n["a"])({},t.queryParam),a),t.handleRefresh(!0))}))},handleDelete:function(e){var t=this,a=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return m({articleId:e.article_id}).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).finally((function(e){return a.destroy()}))}})},handleAdd:function(){this.$refs.AddForm.add()},handleEdit:function(e){this.$refs.EditForm.edit(e.article_id)},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)}}},D=N,R=(a("eb68"),Object(_["a"])(D,r,i,!1,null,"5d53112c",null));t["default"]=R.exports},"9f39":function(e,t,a){"use strict";a("0d0e")},bae3:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-button",{directives:[{name:"action",rawName:"v-action:add",arg:"add"}],attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")])],1),e.isLoading?e._e():t("a-table",{attrs:{rowKey:"group_id",columns:e.columns,dataSource:e.groupList,defaultExpandAllRows:!0,expandIconColumnIndex:1,pagination:!1,loading:e.isLoading},scopedSlots:e._u([{key:"action",fn:function(a,r){return t("span",{},[t("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(t){return e.handleEdit(r)}}},[e._v("编辑")]),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(t){return e.handleDelete(r)}}},[e._v("删除")])])}}],null,!1,1130629880)}),t("AddForm",{ref:"AddForm",attrs:{groupList:e.groupList},on:{handleSubmit:e.handleRefresh}}),t("EditForm",{ref:"EditForm",attrs:{groupList:e.groupList},on:{handleSubmit:e.handleRefresh}})],1)},i=[],n=(a("d3b7"),a("9aca")),o=a("2af9"),l=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:"新增文件分组",width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"分组名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),t("a-form-item",{attrs:{label:"上级分组",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-tree-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["parent_id",{initialValue:0}],expression:"['parent_id', { initialValue: 0 }]"}],attrs:{treeData:e.groupListTree,dropdownStyle:{maxHeight:"400px",overflow:"auto"},allowClear:""}})],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入至少1个数字"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入至少1个数字' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},s=[],d=(a("99af"),a("159b"),a("b0c0"),{props:{groupList:{type:Array,required:!0}},data:function(){return{title:"",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),groupListTree:[]}},methods:{add:function(){this.visible=!0,this.getGroupList()},getGroupList:function(){var e=this.groupList;this.groupListTree=[{title:"顶级分组",key:0,value:0}].concat(this.formatTreeData(e))},formatTreeData:function(e){var t=this,a=[];return e.forEach((function(e){var r={title:e.name,key:e.group_id,value:e.group_id};e.children&&e.children.length&&(r["children"]=t.formatTreeData(e["children"],r.disabled)),a.push(r)})),a},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){e||t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,n["a"]({form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(e){t.confirmLoading=!1}))}}}),c=d,u=a("2877"),m=Object(u["a"])(c,l,s,!1,null,null,null),f=m.exports,p=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:"编辑文件分组",width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"分组名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),t("a-form-item",{attrs:{label:"上级分组",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-tree-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["parent_id"],expression:"['parent_id']"}],attrs:{treeData:e.groupListTree,dropdownStyle:{maxHeight:"400px",overflow:"auto"},allowClear:""}})],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入至少1个数字"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入至少1个数字' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},h=[],v=(a("caad"),a("2532"),a("2ef0")),b=a.n(v),g={props:{groupList:{type:Array,required:!0}},data:function(){return{title:"",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),record:{},groupListTree:[]}},methods:{edit:function(e){this.visible=!0,this.record=e,this.getGroupList(),this.setFieldsValue()},setFieldsValue:function(){var e=this,t=this.$nextTick,a=this.form.setFieldsValue;t((function(){a(b.a.pick(e.record,["name","parent_id","sort"]))}))},getGroupList:function(){var e=this.groupList,t=this.formatTreeData(e);t.unshift({title:"顶级分组",key:0,value:0}),this.groupListTree=t},formatTreeData:function(e){var t=this,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=[];return e.forEach((function(e){var i={title:e.name,key:e.group_id,value:e.group_id};([e.group_id,e.parent_id].includes(t.record.group_id)||!0===a)&&(i.disabled=!0),e.children&&e.children.length&&(i["children"]=t.formatTreeData(e["children"],i.disabled)),r.push(i)})),r},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){e||t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,n["c"]({groupId:this.record["group_id"],form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(e){t.confirmLoading=!1}))}}},C=g,w=Object(u["a"])(C,p,h,!1,null,null,null),_=w.exports,y={name:"Index",components:{STable:o["d"],AddForm:f,EditForm:_},data:function(){return{groupList:[],queryParam:{},isLoading:!1,columns:[{title:"分组ID",dataIndex:"group_id"},{title:"分组名称",dataIndex:"name"},{title:"排序",dataIndex:"sort"},{title:"添加时间",dataIndex:"create_time"},{title:"操作",dataIndex:"action",width:"180px",scopedSlots:{customRender:"action"}}]}},created:function(){this.getGroupList()},methods:{getGroupList:function(){var e=this;this.isLoading=!0,n["d"]().then((function(t){e.groupList=t.data.list})).finally((function(){return e.isLoading=!1}))},handleAdd:function(){this.$refs.AddForm.add()},handleEdit:function(e){this.$refs.EditForm.edit(e)},handleDelete:function(e){var t=this,a=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return n["b"]({groupId:e["group_id"]}).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).finally((function(e){return a.destroy()}))}})},handleRefresh:function(){this.getGroupList()}}},x=y,S=Object(u["a"])(x,r,i,!1,null,null,null);t["default"]=S.exports},d1d6:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-button",{directives:[{name:"action",rawName:"v-action:add",arg:"add"}],attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")])],1),t("s-table",{ref:"table",attrs:{rowKey:"help_id",loading:e.isLoading,columns:e.columns,data:e.loadData,pageSize:15},scopedSlots:e._u([{key:"content",fn:function(a){return t("span",{},[t("p",{staticClass:"twoline-hide",staticStyle:{width:"420px"}},[e._v(e._s(a))])])}},{key:"action",fn:function(a,r){return t("span",{},[t("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(t){return e.handleEdit(r)}}},[e._v("编辑")]),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(t){return e.handleDelete(r)}}},[e._v("删除")])])}}])}),t("AddForm",{ref:"AddForm",on:{handleSubmit:e.handleRefresh}}),t("EditForm",{ref:"EditForm",on:{handleSubmit:e.handleRefresh}})],1)},i=[],n=a("5530"),o=(a("d3b7"),a("b775")),l={list:"/content.help/list",detail:"/content.help/detail",add:"/content.help/add",edit:"/content.help/edit",delete:"/content.help/delete"};function s(e){return Object(o["b"])({url:l.list,method:"get",params:e})}function d(e){return Object(o["b"])({url:l.add,method:"post",data:e})}function c(e){return Object(o["b"])({url:l.edit,method:"post",data:e})}function u(e){return Object(o["b"])({url:l.delete,method:"post",data:e})}var m=a("2af9"),f=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"帮助标题",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["title",{rules:[{required:!0,message:"请输入联系人姓名"}]}],expression:"['title', { rules: [{ required: true, message: '请输入联系人姓名' }] }]"}]})],1),t("a-form-item",{attrs:{label:"帮助内容",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["content",{rules:[{required:!0,message:"请输入帮助内容"}]}],expression:"['content', { rules: [{ required: true, message: '请输入帮助内容' }] }]"}],attrs:{autoSize:{minRows:4}}})],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入排序值"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入排序值' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},p=[],h=a("88bc"),v=a.n(h),b={components:{SelectRegion:m["k"]},data:function(){return{title:"新增帮助",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this)}},methods:{add:function(){this.visible=!0},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){!e&&t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,d({form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){return t.confirmLoading=!1}))}}},g=b,C=a("2877"),w=Object(C["a"])(g,f,p,!1,null,null,null),_=w.exports,y=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"帮助标题",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["title",{rules:[{required:!0,message:"请输入联系人姓名"}]}],expression:"['title', { rules: [{ required: true, message: '请输入联系人姓名' }] }]"}]})],1),t("a-form-item",{attrs:{label:"帮助内容",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["content",{rules:[{required:!0,message:"请输入帮助内容"}]}],expression:"['content', { rules: [{ required: true, message: '请输入帮助内容' }] }]"}],attrs:{autoSize:{minRows:4}}})],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入排序值"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入排序值' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},x=[],S={components:{SelectRegion:m["k"]},data:function(){return{title:"编辑帮助",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),record:{}}},methods:{edit:function(e){this.visible=!0,this.record=e,this.setFieldsValue()},setFieldsValue:function(){var e=this.record,t=this.form.setFieldsValue;this.$nextTick((function(){t(v()(e,["title","content","sort"]))}))},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){!e&&t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,c({helpId:this.record.help_id,form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){return t.confirmLoading=!1}))}}},L=S,F=Object(C["a"])(L,y,x,!1,null,null,null),k=F.exports,I={name:"Index",components:{STable:m["d"],AddForm:_,EditForm:k},data:function(){var e=this;return{queryParam:{},isLoading:!1,columns:[{title:"帮助ID",dataIndex:"help_id"},{title:"标题",dataIndex:"title"},{title:"内容",dataIndex:"content",scopedSlots:{customRender:"content"}},{title:"排序",dataIndex:"sort"},{title:"更新时间",dataIndex:"update_time"},{title:"操作",dataIndex:"action",width:"180px",scopedSlots:{customRender:"action"}}],loadData:function(t){return s(Object(n["a"])(Object(n["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))}}},created:function(){},methods:{handleAdd:function(){this.$refs.AddForm.add()},handleEdit:function(e){this.$refs.EditForm.edit(e)},handleDelete:function(e){var t=this,a=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return u({helpId:e.help_id}).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).finally((function(e){return a.destroy()}))}})},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)},onSearch:function(){this.handleRefresh(!0)}}},q=I,$=Object(C["a"])(q,r,i,!1,null,null,null);t["default"]=$.exports},d7e9:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-button",{directives:[{name:"action",rawName:"v-action:add",arg:"add"}],attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")])],1),t("s-table",{ref:"table",attrs:{rowKey:"id",loading:e.isLoading,columns:e.columns,data:e.loadData,pageSize:15},scopedSlots:e._u([{key:"image_url",fn:function(e){return t("span",{},[t("a",{attrs:{title:"点击查看原图",href:e,target:"_blank"}},[t("img",{attrs:{height:"50",src:e,alt:"封面图"}})])])}},{key:"status",fn:function(a){return t("span",{},[t("a-tag",{attrs:{color:10==a?"green":""}},[e._v(e._s(a?"显示":"隐藏"))])],1)}},{key:"action",fn:function(a,r){return t("span",{},[t("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(t){return e.handleEdit(r)}}},[e._v("编辑")]),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(t){return e.handleDelete(r)}}},[e._v("删除")])])}}])}),t("AddForm",{ref:"AddForm",on:{handleSubmit:e.handleRefresh}}),t("EditForm",{ref:"EditForm",on:{handleSubmit:e.handleRefresh}})],1)},i=[],n=a("5530"),o=(a("d3b7"),a("b775")),l={list:"/content.banner/list",detail:"/content.banner/detail",add:"/content.banner/add",edit:"/content.banner/edit",delete:"/content.banner/delete"};function s(e){return Object(o["b"])({url:l.list,method:"get",params:e})}function d(e){return Object(o["b"])({url:l.add,method:"post",data:e})}function c(e){return Object(o["b"])({url:l.edit,method:"post",data:e})}function u(e){return Object(o["b"])({url:l.delete,method:"post",data:e})}var m=a("2af9"),f=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:780,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"轮播图标题",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"请输入轮播图标题"}]}],expression:"['name', { rules: [{ required: true, message: '请输入轮播图标题' }] }]"}],attrs:{placeholder:"请输入轮播图标题"}})],1),t("a-form-item",{attrs:{label:"轮播图",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["image_id",{rules:[{required:!0,message:"请选择1个轮播图"}]}],expression:"['image_id', { rules: [{ required: true, message: '请选择1个轮播图' }] }]"}]})],1),t("a-form-item",{attrs:{label:"跳转地址",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectActive",{directives:[{name:"decorator",rawName:"v-decorator",value:["redirect_url",{rules:[{required:!1,message:"请选择跳转地址"}]}],expression:"['redirect_url', { rules: [{ required: false, message: '请选择跳转地址' }] }]"}],staticStyle:{width:"100%",overflow:"auto"}})],1),t("a-form-item",{attrs:{label:"状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"用户端是否展示"}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:10,rules:[{required:!0}]}],expression:"['status', { initialValue: 10, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:10}},[e._v("显示")]),t("a-radio",{attrs:{value:20}},[e._v("隐藏")])],1)],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入排序值"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入排序值' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},p=[],h=a("88bc"),v=a.n(h),b={components:{SelectImage:m["i"],SelectActive:m["e"]},data:function(){return{title:"新增轮播图",labelCol:{span:3},wrapperCol:{span:19},visible:!1,confirmLoading:!1,form:this.$form.createForm(this)}},methods:{add:function(){this.visible=!0},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){!e&&t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,d({form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){return t.confirmLoading=!1}))}}},g=b,C=a("2877"),w=Object(C["a"])(g,f,p,!1,null,null,null),_=w.exports,y=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"轮播图标题",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"请输入轮播图标题"}]}],expression:"['name', { rules: [{ required: true, message: '请输入轮播图标题' }] }]"}],attrs:{placeholder:"请输入轮播图标题"}})],1),t("a-form-item",{attrs:{label:"轮播图",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["image_id",{rules:[{required:!0,message:"请选择1个轮播图"}]}],expression:"['image_id', { rules: [{ required: true, message: '请选择1个轮播图' }] }]"}],attrs:{defaultList:e.record.image?[e.record.image]:[]}})],1),t("a-form-item",{attrs:{label:"跳转地址",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectActive",{directives:[{name:"decorator",rawName:"v-decorator",value:["redirect_url",{rules:[{required:!1,message:"请选择跳转地址"}]}],expression:"['redirect_url', { rules: [{ required: false, message: '请选择跳转地址' }] }]"}],staticStyle:{width:"100%",overflow:"auto"},attrs:{defaultList:e.record.activeInfo?[e.record.activeInfo]:[]}})],1),t("a-form-item",{attrs:{label:"状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"用户端是否展示"}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:10,rules:[{required:!0}]}],expression:"['status', { initialValue: 10, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:10}},[e._v("显示")]),t("a-radio",{attrs:{value:20}},[e._v("隐藏")])],1)],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入排序值"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入排序值' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},x=[],S={components:{SelectImage:m["i"],SelectActive:m["e"]},data:function(){return{title:"编辑轮播图",labelCol:{span:3},wrapperCol:{span:19},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),record:{}}},methods:{edit:function(e){this.visible=!0,this.record=e,this.setFieldsValue()},setFieldsValue:function(){var e=this.record,t=this.form.setFieldsValue;this.$nextTick((function(){t(v()(e,["name","image_id","redirect_url","status","sort"]))}))},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){!e&&t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,c({bannerId:this.record.id,form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){return t.confirmLoading=!1}))}}},L=S,F=Object(C["a"])(L,y,x,!1,null,null,null),k=F.exports,I={name:"Index",components:{STable:m["d"],AddForm:_,EditForm:k},data:function(){var e=this;return{queryParam:{},isLoading:!1,columns:[{title:"ID",dataIndex:"id"},{title:"名称",dataIndex:"name"},{title:"图片",dataIndex:"image_url",scopedSlots:{customRender:"image_url"}},{title:"跳转地址",dataIndex:"redirect_url"},{title:"状态",dataIndex:"status",scopedSlots:{customRender:"status"}},{title:"排序",dataIndex:"sort"},{title:"创建时间",width:"180px",dataIndex:"create_time"},{title:"更新时间",width:"180px",dataIndex:"update_time"},{title:"操作",dataIndex:"action",width:"180px",scopedSlots:{customRender:"action"}}],loadData:function(t){return s(Object(n["a"])(Object(n["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))}}},created:function(){},methods:{handleAdd:function(){this.$refs.AddForm.add()},handleEdit:function(e){this.$refs.EditForm.edit(e)},handleDelete:function(e){var t=this,a=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return u({bannerId:e.id}).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).finally((function(e){return a.destroy()}))}})},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)},onSearch:function(){this.handleRefresh(!0)}}},q=I,$=Object(C["a"])(q,r,i,!1,null,null,null);t["default"]=$.exports},eb68:function(e,t,a){"use strict";a("7bed")},fe7e:function(e,t,a){"use strict";var r=a("5c06");t["a"]=new r["a"]([{key:"RECHARGE",name:"用户充值",value:10},{key:"CONSUME",name:"用户消费",value:20},{key:"ADMIN",name:"管理员操作",value:30},{key:"REFUND",name:"订单退款",value:40},{key:"DEALER",name:"开通分销商",value:70},{key:"MEMBER",name:"开通用户",value:80}])}}]);