王总上门按摩后台代码
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 line
4.6 KiB

2 months ago
webpackJsonp([25],{"Ot/s":function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=s("//Fk"),n=s.n(i),a=s("d7EF"),r=s.n(a),o=s("Xxa5"),l=s.n(o),u=s("exGp"),c=s.n(u),p={data:function(){return{isSubmit:!1,isSubmitStatus:0,fileName:"",selectOptions:[],subForm:{app_id:[],key:"",version:"",content:"",wxapp_version:""},subFormRules:{key:{required:!0,type:"string",message:"请上传密钥",trigger:"change"},wxapp_version:{required:!0,type:"string",message:"请选择小程序代码版本",trigger:"change"}}}},created:function(){var e=this;return c()(l.a.mark(function t(){return l.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getBaseInfo();case 2:case"end":return t.stop()}},t,e)}))()},methods:{getBaseInfo:function(){var e=this;return c()(l.a.mark(function t(){var s,i,a,o,u;return l.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.a.all([e.$api.system.wxappVersion(),e.$api.system.wxUploadInfo()]);case 2:s=t.sent,i=r()(s,2),a=i[0],o=i[1],u=[],a.data.map(function(e){u.push({key:e})}),e.selectOptions=u,e.subForm=o.data;case 10:case"end":return t.stop()}},t,e)}))()},handleClose:function(){this.isSubmit=!1},getFile:function(e,t){var s=e.length-1;this.subForm[t]=e[s].url},submitFormInfo:function(e){var t=this;1!==this.isSubmitStatus?this.$refs[e].validate(function(e){if(e){var s=t.$util.pick(t.subForm,["app_id","key","version","content"]),i=t.$util.pick(t.subForm,["wxapp_version"]);t.$api.system.wxUploadUpdate(s).then(function(e){200===e.code&&(t.isSubmit=!0,t.isSubmitStatus=1,t.$api.system.uploadWxapp(i).then(function(e){t.isSubmit=!1,t.isSubmitStatus=0,e.data.msg&&t.$message({type:2e4===e.data.code?"success":"error",message:e.data.msg,duration:0,showClose:!0})}))})}}):this.isSubmit=!0}},filters:{handleFileName:function(e){var t="请上传文件";return e&&(t=e.substring(e.lastIndexOf("/")+1)),t}}},m={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"lb-sys-sprowechat"},[s("top-nav"),e._v(" "),s("div",{staticClass:"page-main"},[s("el-form",{ref:"subForm",staticClass:"config-form",attrs:{model:e.subForm,rules:e.subFormRules,"label-width":"140px"},nativeOn:{submit:function(e){e.preventDefault()}}},[s("el-form-item",{attrs:{label:"代码上传密钥",prop:"key"}},[s("div",{staticClass:"flex-warp"},[s("div",{staticClass:"lb-file-input flex-between"},[s("div",{class:[{"c-title":e.subForm.key}]},[e._v("\n "+e._s(e._f("handleFileName")(e.subForm.key))+"\n ")]),e._v(" "),s("lb-cover",{attrs:{type:"button",fileType:"wxuploadkey",fileSize:1},on:{selectedFiles:function(t){return e.getFile(t,"key")}}})],1)])]),e._v(" "),s("el-form-item",{attrs:{label:"版本号",prop:"version"}},[s("el-input",{attrs:{type:"text",maxlength:"30","show-word-limit":"",placeholder:"请输入版本号"},model:{value:e.subForm.version,callback:function(t){e.$set(e.subForm,"version",t)},expression:"subForm.version"}})],1),e._v(" "),s("el-form-item",{attrs:{label:"版本描述",prop:"content"}},[s("el-input",{attrs:{type:"text",maxlength:"30","show-word-limit":"",placeholder:"请输入版本描述"},model:{value:e.subForm.content,callback:function(t){e.$set(e.subForm,"content",t)},expression:"subForm.content"}})],1),e._v(" "),s("el-form-item",{attrs:{label:"小程序代码版本",prop:"wxapp_version"}},[s("el-select",{attrs:{filterable:"",clearable:"",placeholder:"请选择"},model:{value:e.subForm.wxapp_version,callback:function(t){e.$set(e.subForm,"wxapp_version",t)},expression:"subForm.wxapp_version"}},e._l(e.selectOptions,function(e){return s("el-option",{key:e.key,attrs:{label:e.key,value:e.key}})}),1)],1),e._v(" "),s("el-form-item",[s("lb-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick"}],attrs:{type:"primary"},on:{click:function(t){return e.submitFormInfo("subForm")}}},[e._v(e._s(e.$t("action.submit")))])],1)],1),e._v(" "),s("el-dialog",{attrs:{title:"温馨提示",visible:e.isSubmit,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.isSubmit=t}}},[s("div",{staticClass:"flex-