(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-61033140"],{"590d":function(t,e,r){"use strict";r.d(e,"d",(function(){return o})),r.d(e,"c",(function(){return l})),r.d(e,"a",(function(){return i})),r.d(e,"e",(function(){return n})),r.d(e,"b",(function(){return s})),r.d(e,"f",(function(){return c}));var a=r("b775");function o(t){return Object(a["a"])({url:"/system/application/list",method:"get",params:t})}function l(t){return Object(a["a"])({url:"/system/application/"+t,method:"get"})}function i(t){return Object(a["a"])({url:"/system/application",method:"post",data:t})}function n(t){return Object(a["a"])({url:"/system/application",method:"put",data:t})}function s(t){return Object(a["a"])({url:"/system/application/"+t,method:"delete"})}function c(t){return Object(a["a"])({url:"/system/application/updateApplicationKey/"+t,method:"get"})}},6195:function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"app-container"},[r("el-form",{ref:"form",attrs:{model:t.form,rules:t.rules,"label-width":"120px"}},[r("el-form-item",{attrs:{label:"应用ID"}},[t._v(" "+t._s(t.form.appId)+" ")]),r("el-form-item",{attrs:{label:"应用名称",prop:"appName"}},[r("el-input",{attrs:{placeholder:"请输入应用名称"},model:{value:t.form.appName,callback:function(e){t.$set(t.form,"appName",e)},expression:"form.appName"}})],1),r("el-form-item",{attrs:{label:"支付渠道",prop:"payMethod"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{multiple:"",placeholder:"请选择支付渠道"},model:{value:t.form.payMethod,callback:function(e){t.$set(t.form,"payMethod",e)},expression:"form.payMethod"}},t._l(t.dict.type.pay_type,(function(t){return r("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),r("el-form-item",{attrs:{label:"签名验证",prop:"verify"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择是否启用"},model:{value:t.form.verify,callback:function(e){t.$set(t.form,"verify",e)},expression:"form.verify"}},t._l(t.dict.type.app_verify,(function(t){return r("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),r("el-form-item",{attrs:{label:"签名KEY"}},[t._v(" "+t._s(t.form.signKey)+" "),r("el-button",{staticClass:"el-button el-button--default",staticStyle:{"margin-left":"20px"},on:{click:function(e){return t.updataKey()}}},[t._v("更换KEY")])],1),r("el-form-item",{attrs:{label:"同步通知地址",prop:"returnUrl"}},[r("el-input",{attrs:{placeholder:"请输入同步通知地址"},model:{value:t.form.returnUrl,callback:function(e){t.$set(t.form,"returnUrl",e)},expression:"form.returnUrl"}})],1),r("el-form-item",{attrs:{label:"异步通知地址",prop:"notifyUrl"}},[r("el-input",{attrs:{placeholder:"请输入异步通知地址"},model:{value:t.form.notifyUrl,callback:function(e){t.$set(t.form,"notifyUrl",e)},expression:"form.notifyUrl"}})],1),r("el-form-item",{attrs:{label:"退款通知地址",prop:"refundUrl"}},[r("el-input",{attrs:{placeholder:"请输入退款通知地址"},model:{value:t.form.refundUrl,callback:function(e){t.$set(t.form,"refundUrl",e)},expression:"form.refundUrl"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:t.cancel}},[t._v("取消")]),r("el-button",{attrs:{type:"primary"},on:{click:t.submitForm}},[t._v("立即保存")])],1)],1)},o=[],l=(r("ac1f"),r("5319"),r("590d")),i={name:"ApplicationAdd",dicts:["pay_type","common_status","app_verify"],data:function(){return{form:{},rules:{appName:[{required:!0,message:"应用名称不能为空",trigger:"blur"}],payMethod:[{required:!0,message:"请选择支付渠道",trigger:"blur"}],verify:[{required:!0,message:"请选择支付渠道",trigger:"blur"}]}}},created:function(){this.form.id=this.$route.params.id,this.getApplicationDetails()},methods:{getApplicationDetails:function(){var t=this;Object(l["c"])(this.form.id).then((function(e){e.data.payMethod=e.data.payMethod.split(","),t.form=e.data}))},updataKey:function(){var t=this;Object(l["f"])(this.form.id).then((function(e){null!=e.data.signKey&&e.data.signKey!=t.form.signKey?(t.$modal.msgSuccess("更换成功"),t.form.signKey=e.data.signKey):t.$modal.msgError("更换失败")}))},cancel:function(){this.$store.dispatch("tagsView/delView",this.$route),this.$router.replace({path:"/system/application/index"})},submitForm:function(){var t=this;this.$refs["form"].validate((function(e){if(e){for(var r="",a=0;a<t.form.payMethod.length;a++)r+=t.form.payMethod[a]+",";t.form.payMethod=r.substring(0,r.length-1),Object(l["e"])(t.form).then((function(e){t.$modal.msgSuccess("保存成功"),t.$store.dispatch("tagsView/delView",t.$route),t.$router.replace({path:"/system/application/index"})}))}}))}}},n=i,s=(r("a861"),r("2877")),c=Object(s["a"])(n,a,o,!1,null,null,null);e["default"]=c.exports},a861:function(t,e,r){"use strict";r("fccc")},fccc:function(t,e,r){}}]);