Files
jianfeng-server/public/static/js/20.js
2025-10-02 10:33:06 +08:00

1 line
6.1 KiB
JavaScript
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
webpackJsonp([20],{ELVZ:function(e,t){},eB79:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=r("mvHQ"),a=r.n(o),p=r("Gu7T"),s=r.n(p),i=r("Xxa5"),n=r.n(i),l=r("exGp"),u=r.n(l),c={data:function(){return{subForm:{ios_login:0,app_app_id:"",app_app_secret:"",app_text:"",app_logo:[],app_banner:[],login_protocol:"",information_protection:""},subFormRules:{app_app_id:{required:!0,type:"string",message:"请输入微信开放平台移动应用AppID",trigger:"blur"},app_app_secret:{required:!0,type:"string",message:"请输入微信开放平台移动应用AppSecret",trigger:"blur"},app_text:{required:!0,validator:this.$reg.isNoEmpty,text:"APP名称",reg_type:2,trigger:"blur"},app_logo:{required:!0,type:"array",message:"请上传Logo",trigger:"blur"},app_banner:{required:!0,type:"array",message:"请上传开屏广告图片",trigger:"blur"},ios_login:{required:!0,type:"number",message:"请选择",trigger:"blur"},login_protocol:{required:!0,type:"string",message:"请输入用户隐私协议",trigger:"blur"},information_protection:{required:!0,type:"string",message:"请输入个人信息保护指引",trigger:"blur"}}}},created:function(){this.getFormInfo()},methods:{getFormInfo:function(){var e=this;return u()(n.a.mark(function t(){var r,o,a,p;return n.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,a=r.data,200===o){t.next=7;break}return t.abrupt("return");case 7:for(p in a.app_logo=a.app_logo?[{url:a.app_logo}]:[],a.app_banner=a.app_banner&&a.app_banner.length>0?a.app_banner.map(function(e){return{url:e}}):[],e.subForm)e.subForm[p]=a[p];case 10: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,s()(e))},moveFiles:function(e,t){this.subForm[t]=e},submitFormInfo:function(){var e=this;this.$refs.subForm.validate(function(t){if(t){var r=JSON.parse(a()(e.subForm));r.app_logo=r.app_logo[0].url,r.app_banner=r.app_banner.map(function(e){return e.url}),e.$api.system.configUpdate(r).then(function(t){200===t.code&&e.$message.success(e.$t("tips.successSub"))})}})}}},_={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":"160px"},nativeOn:{submit:function(e){e.preventDefault()}}},[r("el-form-item",{attrs:{label:"AppID",prop:"app_app_id"}},[r("el-input",{attrs:{placeholder:"请输入微信开放平台移动应用AppID"},model:{value:e.subForm.app_app_id,callback:function(t){e.$set(e.subForm,"app_app_id",t)},expression:"subForm.app_app_id"}}),e._v(" "),r("lb-tool-tips",[e._v("请输入微信开放平台申请移动应用的AppID输入错误会影响APP的正常使用谨慎修改")])],1),e._v(" "),r("el-form-item",{attrs:{label:"AppSecret",prop:"app_app_secret"}},[r("el-input",{attrs:{placeholder:"请输入微信开放平台移动应用AppSecret"},model:{value:e.subForm.app_app_secret,callback:function(t){e.$set(e.subForm,"app_app_secret",t)},expression:"subForm.app_app_secret"}}),e._v(" "),r("lb-tool-tips",[e._v("请输入微信开放平台申请移动应用的AppSecret输入错误会影响APP的正常使用谨慎修改")])],1),e._v(" "),r("el-form-item",{attrs:{label:"APP名称",prop:"app_text"}},[r("el-input",{attrs:{maxlength:"10","show-word-limit":"",placeholder:"请输入APP名称"},model:{value:e.subForm.app_text,callback:function(t){e.$set(e.subForm,"app_text",t)},expression:"subForm.app_text"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"Logo",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("图片建议尺寸160*160")])],1),e._v(" "),r("el-form-item",{attrs:{label:"开屏广告图片",prop:"app_banner"}},[r("div",{staticClass:"c-warning mb-lg"},[r("div",{staticStyle:{"line-height":"1.5"}},[e._v("\n 开屏广告图片建议制作成.9.png格式的图片鉴于每个手机的屏幕尺寸不一致为了适配图片请不要将重要信息放于上下左右靠边的位置\n ")]),e._v(" "),r("div",{staticStyle:{"line-height":"1.5"}},[e._v("\n 设计样式请参考\n "),r("a",{staticClass:"c-link pointer",attrs:{href:"https://lbqny.migugu.com/image/666/22/08/nzI7RMWcVJzuQO6K73wWqALzAfjf6qE3.9"}},[e._v("点击查看此图")])])]),e._v(" "),r("lb-cover",{attrs:{fileList:e.subForm.app_banner},on:{selectedFiles:function(t){return e.getCover(t,"app_banner")}}}),e._v(" "),r("lb-tool-tips",[e._v("图片建议尺寸1080 * 1920")])],1),e._v(" "),r("el-form-item",{attrs:{label:"是否开启Apple登录",prop:"ios_login"}},[r("el-radio-group",{model:{value:e.subForm.ios_login,callback:function(t){e.$set(e.subForm,"ios_login",t)},expression:"subForm.ios_login"}},[r("el-radio",{attrs:{label:1}},[e._v(e._s(e.$t("action.ON")))]),e._v(" "),r("el-radio",{attrs:{label:0}},[e._v(e._s(e.$t("action.OFF")))])],1),e._v(" "),r("lb-tool-tips",[e._v("当苹果应用提交审核时需开启,审核通过后需关闭")])],1),e._v(" "),r("el-form-item",{attrs:{label:"用户隐私协议",prop:"login_protocol"}},[r("lb-ueditor",{attrs:{destroy:!0,ueditorType:3},model:{value:e.subForm.login_protocol,callback:function(t){e.$set(e.subForm,"login_protocol",t)},expression:"subForm.login_protocol"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"个人信息保护指引",prop:"information_protection"}},[r("lb-ueditor",{attrs:{destroy:!0,ueditorType:3},model:{value:e.subForm.information_protection,callback:function(t){e.$set(e.subForm,"information_protection",t)},expression:"subForm.information_protection"}})],1),e._v(" "),r("el-form-item",[r("lb-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick"}],attrs:{type:"primary"},on:{click:e.submitFormInfo}},[e._v(e._s(e.$t("action.submit")))])],1)],1)],1)],1)},staticRenderFns:[]};var m=r("VU/8")(c,_,!1,function(e){r("ELVZ")},"data-v-e71fb646",null);t.default=m.exports}});