(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0aa174"],{1010:function(t,a,e){"use strict";e.r(a);var s,o=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("v-container",[e("v-form",{directives:[{name:"loading",rawName:"v-loading",value:t.tload,expression:"tload"}],staticStyle:{"max-width":"600px",margin:"auto"}},[e("v-text-field",{attrs:{label:"商户号Mchid"},model:{value:t.formData.mchid,callback:function(a){t.$set(t.formData,"mchid",a)},expression:"formData.mchid"}}),e("v-text-field",{staticClass:"mt-3",attrs:{label:"商户密钥key"},model:{value:t.formData.mch_secert,callback:function(a){t.$set(t.formData,"mch_secert",a)},expression:"formData.mch_secert"}}),e("el-upload",{staticClass:"upload-demo",attrs:{action:t.api+"file/cert",headers:t.headers,"with-credentials":!0,"on-success":t.uploadSuccess}},[e("el-button",{attrs:{size:"small",type:"primary"}},[t._v("点击上传p12证书文件 "+t._s(t.formData.apiclient_cert?"已上传":"")+"\n      ")]),e("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v("必须上传p12文件 "+t._s(t.formData.apiclient_key?"已上传":""))])],1),e("el-upload",{staticClass:"upload-demo mt-4",attrs:{action:t.api+"file/cert",headers:t.headers,"with-credentials":!0,"on-success":t.uploadSuccess2}},[e("el-button",{attrs:{size:"small",type:"primary"}},[t._v("点击上传证书密钥")]),e("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v("只能上传pem文件")])],1),e("v-btn",{staticClass:"mt-3 dark",attrs:{loading:t.tload},on:{click:function(a){return t.submit()}}},[t._v("保存")])],1)],1)},i=[],n={props:{load:{type:Boolean,default:!1}},data:function(){return{api:this.$api,formData:{mchid:"",mch_secert:"",apiclient_cert:"",apiclient_key:""},pageLoad:this.load,tload:!1,headers:{token:sessionStorage.getItem("token")}}},watch:{load:function(t){t&&(this.pageLoad=t)},pageLoad:function(t){t&&this.getConfig()}},mounted:function(){s=this},methods:{getConfig:function(){s.tload=!0,this.$post("config/get",{config_key:"mwx_mch"},function(t){s.tload=!1,0==t.errno&&t.data.config_content&&(s.formData=JSON.parse(t.data.config_content))})},uploadSuccess:function(t){0==t.errno&&(this.formData.apiclient_cert=t.data.url)},uploadSuccess2:function(t){0==t.errno&&(this.formData.apiclient_key=t.data.url)},submit:function(){this.tload=!0,this.$post("config/update",{config_key:"mwx_mch",config_content:JSON.stringify(this.formData)},function(t){s.tload=!1,0===t.errno&&s.$message({showClose:!0,message:t.errmsg,type:"success"})})}}},c=n,l=e("6691"),r=Object(l["a"])(c,o,i,!1,null,null,null);a["default"]=r.exports}}]);
//# sourceMappingURL=chunk-2d0aa174.39826ba9.js.map