(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0c3602b6"],{"09ee":function(e,t,a){"use strict";a("be61")},3913:function(e,t,a){"use strict";a.r(t);var n=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=[],i=a("7f70"),r=(a("e8d6"),a("6994"),a("8849")),s={name:"SiteShouyixinPay",components:{FormGenerator:r["a"]},data:function(){return{form:{status:"",merchantId:"",partnerId:"",privatekey:"",privatekeyPass:"",pay_method:[]},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:"checkbox",label:"支付方式",prop:"pay_method",width:"600px",options:[{label:"微信支付",value:"1"},{label:"支付宝支付",value:"2"},{label:"银行卡支付",value:"3"}]},{type:"input",label:"商户编号",prop:"merchantId",placeholder:"请输入商户编号",width:"600px"},{type:"input",label:"服务商ID",prop:"partnerId",placeholder:"请输入服务商ID",width:"600px"},{type:"upload",label:"私钥文件",prop:"privatekey",upload:!0,accept:".pem,.crt,.key,.txt,.pfx",fileTypeName:"TXT",width:"600px"},{type:"input",label:"私钥密码",prop:"privatekeyPass",placeholder:"请输入私钥密码",width:"600px"}),e}},created:function(){this.getData()},methods:{getData:function(){var e=this;this.loading=!0,this.api.get("site/getInfo",{type:15}).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:15})).then((function(t){1==t.code?(e.$message.success("保存成功"),e.getData(),e.$store.dispatch("settings/getSetting")):e.$message.error(t.message||"保存失败")})).finally((function(){e.loading=!1}))})).catch((function(){e.$message.warning("请完善表单信息")}))}}},p=s,l=(a("09ee"),a("3d7a")),c=Object(l["a"])(p,n,o,!1,null,"420577b5",null);t["default"]=c.exports},be61:function(e,t,a){}}]);