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
2.6 KiB
1 lines
2.6 KiB
webpackJsonp([74],{gZig:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=r("mvHQ"),s=r.n(o),a=r("Gu7T"),n=r.n(a),i=r("Xxa5"),u=r.n(i),p=r("exGp"),l=r.n(p),c={data:function(){return{subForm:{app_logo:[],app_text:""},subFormRules:{app_logo:{required:!0,type:"array",message:"请上传应用图标",trigger:"blur"},app_text:{required:!0,type:"string",message:"请输入应用名称",trigger:"blur"}}}},created:function(){this.getFormInfo()},methods:{getFormInfo:function(){var e=this;return l()(u.a.mark(function t(){var r,o,s,a;return u.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$api.system.configInfo();case 2:if(r=t.sent,o=r.code,s=r.data,200===o){t.next=7;break}return t.abrupt("return");case 7:for(a in s.app_logo=s.app_logo?[{url:s.app_logo}]:[],e.subForm)e.subForm[a]=s[a];case 9:case"end":return t.stop()}},t,e)}))()},getCover:function(e,t){this.subForm[t]=e},selectedFiles:function(e,t){var r;(r=this.subForm[t]).push.apply(r,n()(e))},moveFiles:function(e,t){this.subForm[t]=e},submitForm:function(){var e=this;this.$refs.subForm.validate(function(t){if(t){var r=JSON.parse(s()(e.subForm));r.app_logo=r.app_logo[0].url,e.$api.system.configUpdate(r).then(function(t){200===t.code&&e.$message.success(e.$t("tips.successSub"))})}})}}},m={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"lb-system-wechat"},[r("top-nav"),e._v(" "),r("div",{staticClass:"page-main"},[r("el-form",{ref:"subForm",staticClass:"config-form",attrs:{model:e.subForm,rules:e.subFormRules,"label-width":"140px"},nativeOn:{submit:function(e){e.preventDefault()}}},[r("el-form-item",{attrs:{label:"应用图标",prop:"app_logo"}},[r("lb-cover",{attrs:{fileList:e.subForm.app_logo},on:{selectedFiles:function(t){return e.getCover(t,"app_logo")}}}),e._v(" "),r("lb-tool-tips",[e._v("图片建议尺寸:400 * 400,用于登录页面展示")])],1),e._v(" "),r("el-form-item",{attrs:{label:"应用名称",prop:"app_text"}},[r("el-input",{attrs:{maxlength:"10","show-word-limit":"",placeholder:"请输入应用名称"},model:{value:e.subForm.app_text,callback:function(t){e.$set(e.subForm,"app_text",t)},expression:"subForm.app_text"}}),e._v(" "),r("lb-tool-tips",[e._v("用于登录页面展示")])],1),e._v(" "),r("el-form-item",[r("lb-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick"}],attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(e._s(e.$t("action.submit")))])],1)],1)],1)],1)},staticRenderFns:[]};var f=r("VU/8")(c,m,!1,function(e){r("mreB")},"data-v-42d8e67d",null);t.default=f.exports},mreB:function(e,t){}}); |