You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
4.3 KiB
1 lines
4.3 KiB
webpackJsonp([32],{EdGj:function(e,t){},"H+zg":function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o("mvHQ"),l=o.n(r),i=o("Gu7T"),s=o.n(i),n=o("Xxa5"),a=o.n(n),u=o("exGp"),g=o.n(u),c={data:function(){return{subForm:{login_type:"",icp:"",login_title:"",login_logo:[],login_left:[],copyright:""},subFormRules:{login_type:{required:!0,type:"number",message:"请选择备案类型",trigger:"blur"},icp:{required:!0,validator:this.$reg.isNoEmpty,text:"备案号",reg_type:2,trigger:"blur"},login_title:{required:!0,type:"string",message:"请输入站点名称",trigger:"blur"},login_logo:{required:!0,type:"array",message:"请选择站点 Logo",trigger:"blur"},login_left:{required:!0,type:"array",message:"请选择站点左侧图片",trigger:"blur"},copyright:{required:!0,type:"string",message:"请输入站点版权信息",trigger:"blur"}}}},created:function(){this.getFormInfo()},methods:{getFormInfo:function(){var e=this;return g()(a.a.mark(function t(){var o,r,l,i;return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$api.system.configInfo();case 2:if(o=t.sent,r=o.code,l=o.data,200===r){t.next=7;break}return t.abrupt("return");case 7:for(i in l.login_logo=l.login_logo?[{url:l.login_logo}]:[],l.login_left=l.login_left?[{url:l.login_left}]:[],e.subForm)e.subForm[i]=l[i];case 10:case"end":return t.stop()}},t,e)}))()},getCover:function(e,t){this.subForm[t]=e},selectedFiles:function(e,t){var o;(o=this.subForm[t]).push.apply(o,s()(e))},moveFiles:function(e,t){this.subForm[t]=e},submitForm:function(){var e=this;this.$refs.subForm.validate(function(t){if(t){var o=JSON.parse(l()(e.subForm));o.login_logo=o.login_logo[0].url,o.login_left=o.login_left[0].url,e.$api.system.configUpdate(o).then(function(t){200===t.code&&e.$message.success(e.$t("tips.successSub"))})}})}}},m={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"lb-system-wechat"},[o("top-nav"),e._v(" "),o("div",{staticClass:"page-main"},[o("el-form",{ref:"subForm",staticClass:"config-form",attrs:{model:e.subForm,rules:e.subFormRules,"label-width":"140px"},nativeOn:{submit:function(e){e.preventDefault()}}},[o("el-form-item",{attrs:{label:"站点名称",prop:"login_title"}},[o("el-input",{attrs:{maxlength:"10","show-word-limit":"",placeholder:"请输入站点名称"},model:{value:e.subForm.login_title,callback:function(t){e.$set(e.subForm,"login_title",t)},expression:"subForm.login_title"}})],1),e._v(" "),o("el-form-item",{attrs:{label:"站点 Logo",prop:"login_logo"}},[o("lb-cover",{attrs:{fileList:e.subForm.login_logo},on:{selectedFiles:function(t){return e.getCover(t,"login_logo")}}})],1),e._v(" "),o("el-form-item",{attrs:{label:"左侧图片",prop:"login_left"}},[o("lb-cover",{attrs:{fileList:e.subForm.login_left},on:{selectedFiles:function(t){return e.getCover(t,"login_left")}}})],1),e._v(" "),o("el-form-item",{attrs:{label:"备案类型",prop:"login_type"}},[o("el-radio-group",{model:{value:e.subForm.login_type,callback:function(t){e.$set(e.subForm,"login_type",t)},expression:"subForm.login_type"}},[o("el-radio",{attrs:{label:1}},[e._v("ICP备案/许可证号")]),e._v(" "),o("el-radio",{attrs:{label:2}},[e._v("网站联网备案号")])],1),e._v(" "),o("lb-tool-tips",[e._v("用于登录页面展示,以百度备案号为例:\n "),o("div",{staticClass:"mt-sm"},[e._v("ICP备案/许可证号:京ICP证030173号")]),e._v(" "),o("div",{staticClass:"mt-sm"},[e._v("网站联网备案号:京公网安备 11000002000001号")])])],1),e._v(" "),o("el-form-item",{attrs:{label:"备案号",prop:"icp"}},[o("el-input",{attrs:{maxlength:"50","show-word-limit":"",placeholder:"请输入备案号"},model:{value:e.subForm.icp,callback:function(t){e.$set(e.subForm,"icp",t)},expression:"subForm.icp"}})],1),e._v(" "),o("el-form-item",{attrs:{label:"版权信息",prop:"copyright"}},[o("el-input",{attrs:{"show-word-limit":"",placeholder:"请输入站点版权信息"},model:{value:e.subForm.copyright,callback:function(t){e.$set(e.subForm,"copyright",t)},expression:"subForm.copyright"}})],1),e._v(" "),o("el-form-item",[o("lb-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(e._s(e.$t("action.submit")))])],1)],1)],1)],1)},staticRenderFns:[]};var p=o("VU/8")(c,m,!1,function(e){o("EdGj")},"data-v-c0f1cdce",null);t.default=p.exports}}); |