(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d345602"],{5095:function(e,t,a){"use strict";a.r(t);var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"app-form"},[a("div",{staticClass:"app-form-group"},[a("div",{staticClass:"app-form-ti"},[e._v("汇付八方支付配置")]),a("form-generator",{ref:"formGenerator",attrs:{"form-config":e.formConfig,"submit-text":"保存配置"},on:{submit:e.handleSave},model:{value:e.form,callback:function(t){e.form=t},expression:"form"}})],1)])])},n=[],i=a("7f70"),r=(a("e8d6"),a("6994"),a("8849")),c={name:"SiteBafangPay",components:{FormGenerator:r["a"]},data:function(){return{form:{status:"",comKey:"",comSecret:"",appid:"",merchant_id:""},loading:!1}},computed:{formConfig:function(){var e=[{type:"radio",label:"状态",prop:"status",width:"600px",options:[{label:"启用",value:1},{label:"禁用",value:0}]}];return 1==this.form.status&&e.push({type:"input",label:"comKey",prop:"comKey",placeholder:"请输入comKey",width:"600px"},{type:"input",label:"comSecret",prop:"comSecret",placeholder:"请输入comSecret",width:"600px"},{type:"input",label:"微信应用APPID",prop:"appid",placeholder:"请输入微信应用APPID",width:"600px"},{type:"input",label:"微信商户号",prop:"merchant_id",placeholder:"请输入微信商户号",width:"600px"}),e}},created:function(){this.getData()},methods:{getData:function(){var e=this;this.loading=!0,this.api.get("site/getInfo",{type:14}).then((function(t){1==t.code&&(e.form=Object.assign(e.form,t.data))})).finally((function(){e.loading=!1}))},handleSave:function(){var e=this;this.$refs.formGenerator.validate().then((function(){e.loading=!0,e.api.get("site/submit",Object(i["a"])(Object(i["a"])({},e.form),{},{type:14})).then((function(t){1==t.code?(e.getData(),e.$message.success("保存成功"),e.$store.dispatch("settings/getSetting")):e.$message.error(t.message||"保存失败")})).finally((function(){e.loading=!1}))})).catch((function(){e.$message.warning("请完善表单信息")}))}}},s=c,p=(a("8a30a"),a("3d7a")),l=Object(p["a"])(s,o,n,!1,null,"3ca4b566",null);t["default"]=l.exports},"8a30a":function(e,t,a){"use strict";a("cce4")},cce4:function(e,t,a){}}]);