(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4ce7e98a"],{"2a04":function(e,t,a){},58767:function(e,t,a){"use strict";a.r(t);var i=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)])])},o=[],n=a("7f70"),r=(a("e8d6"),a("6994"),a("8849")),d={name:"SiteDougongPay",components:{FormGenerator:r["a"]},data:function(){return{form:{dg_status:"",dg_sys_id:"",dg_product_id:"",dg_huifu_id:"",dg_wxapp_huifu_id:"",dg_gzh_huifu_id:"",dg_zfb_huifu_id:"",dg_rsaPrivateKey:"",dg_rsaPublicKey:"",dg_fenzhang:0,dg_fenzhang_rate:""},loading:!1}},computed:{formConfig:function(){var e=[{type:"radio",label:"汇付支付状态",prop:"dg_status",width:"600px",options:[{label:"启用",value:1},{label:"禁用",value:0}]}];return 1==this.form.dg_status&&e.push({type:"input",label:"sys_id",prop:"dg_sys_id",placeholder:"请输入sys_id",width:"600px"},{type:"input",label:"product_id",prop:"dg_product_id",placeholder:"请输入product_id",width:"600px"},{type:"input",label:"汇付商户号",prop:"dg_huifu_id",placeholder:"请输入汇付商户号",width:"600px"},{type:"textarea",label:"服务商私钥",prop:"dg_rsaPrivateKey",placeholder:"请输入服务商私钥",width:"600px",rows:4},{type:"textarea",label:"汇付公钥",prop:"dg_rsaPublicKey",placeholder:"请输入汇付公钥",width:"600px",rows:4},{type:"radio",label:"汇付分账",prop:"dg_fenzhang",width:"600px",options:[{label:"开启",value:1},{label:"关闭",value:0}]}),1==this.form.dg_status&&1==this.form.dg_fenzhang&&e.push({type:"integer",label:"分账比例",prop:"dg_fenzhang_rate",placeholder:"请输入分账比例",append:"%",width:"600px"}),e}},created:function(){this.getData()},methods:{getData:function(){var e=this;this.loading=!0,this.api.get("site/getInfo",{type:13}).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(n["a"])(Object(n["a"])({},e.form),{},{type:13})).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=d,p=(a("d195"),a("3d7a")),l=Object(p["a"])(s,i,o,!1,null,"b8d48d82",null);t["default"]=l.exports},d195:function(e,t,a){"use strict";a("2a04")}}]);