You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yanzong/public/store/js/setting.8281d8f9.js

3 lines
129 KiB

9 months ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["setting"],{"027d":function(e,t,a){},"04ce":function(e,t,a){"use strict";a.r(t);a("b0c0");var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v("设置支付方式")]),t("a-spin",{attrs:{spinning:e.isLoading}},[e._l(e.options,(function(a,r){return t("div",{key:r,staticClass:"payment-item"},[t("div",{staticClass:"item-client"},[t("div",{staticClass:"name"},[e._v(e._s(a.name))]),t("p",{staticClass:"desc"},[e._v(e._s(a.desc))])]),t("a-table",{staticClass:"item-method",attrs:{rowKey:function(t){return e.rowKey(t.key,a.client)},columns:e.columns,dataSource:a.methods,pagination:!1,bordered:""},scopedSlots:e._u([{key:"method",fn:function(a){return[t("div",{staticClass:"pay-method-item"},[t("span",{staticClass:"pay-icon",style:{color:e.PayMethodIcons[a].color}},[t("a-icon",{staticClass:"icon",class:[a],attrs:{component:e.PayMethodIcons[a].icon}})],1),t("span",[e._v(e._s(e.PaymentMethodEnum[a].name))])])]}},{key:"template",fn:function(a,r){return[r.method===e.PaymentMethodEnum.WECHAT.value?t("a-select",{staticClass:"select-template",attrs:{placeholder:"请选择支付模板"},model:{value:r.template_id,callback:function(t){e.$set(r,"template_id",t)},expression:"item.template_id"}},[t("a-select-option",{attrs:{value:0}},[e._v("无")]),e._l(e.wechatTemplateList,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.template_id}},[e._v(e._s(a.name))])}))],2):e._e(),r.method===e.PaymentMethodEnum.ALIPAY.value?t("a-select",{staticClass:"select-template",attrs:{placeholder:"请选择支付模板"},model:{value:r.template_id,callback:function(t){e.$set(r,"template_id",t)},expression:"item.template_id"}},[t("a-select-option",{attrs:{value:0}},[e._v("无")]),e._l(e.alipayTemplateList,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.template_id}},[e._v(e._s(a.name))])}))],2):e._e(),r.is_must_template&&e.$auth(e.createTemplatePath)?t("router-link",{staticClass:"ml-15 f-12",attrs:{to:{path:e.createTemplatePath},target:"_blank"}},[e._v("新增模板")]):e._e(),r.is_must_template?e._e():t("span",{staticClass:"f-12 c-muted-9"},[e._v("无需支付模板")])]}},{key:"enable",fn:function(a,r){return[t("a-switch",{attrs:{size:"small"},model:{value:r.is_enable,callback:function(t){e.$set(r,"is_enable",t)},expression:"item.is_enable"}})]}},{key:"default",fn:function(r,i,n){return[t("a-switch",{attrs:{size:"small",checked:i.is_default},on:{change:function(t){return e.onChangeDefault(t,n,a.methods)}}})]}}],null,!0)})],1)})),t("a-row",[t("a-col",{attrs:{offset:7}},[t("a-button",{attrs:{type:"primary",loading:e.isBtnLoading},on:{click:e.handleSubmit}},[e._v("保存")])],1)],1)],2)],1)},i=[],n=a("c7eb"),o=a("1da1"),l=a("ade3"),s=(a("4de4"),a("d3b7"),a("99af"),a("159b"),a("04b3")),c=a("b775"),d={options:"/setting.payment/options",update:"/setting.payment/update"};function u(e){return Object(c["b"])({url:d.options,method:"get",params:e})}function p(e){return Object(c["b"])({url:d.update,method:"post",data:e})}var m,f=a("759f"),h=a("3f9c"),v=(m={},Object(l["a"])(m,h["a"].ALIPAY.value,{icon:s["payAlipay"],color:"#009fe8"}),Object(l["a"])(m,h["a"].BALANCE.value,{icon:s["payBalance"],color:"#e8a807"}),Object(l["a"])(m,h["a"].WECHAT.value,{icon:s["payWechat"],color:"#59b64c"}),m),g=[{title:"支付方式",dataIndex:"method",width:"25%",scopedSlots:{customRender:"method"}},{title:"支付模板",dataIndex:"template_id",width:"35%",scopedSlots:{customRender:"template"}},{title:"是否启用",dataIndex:"is_enable",width:"20%",scopedSlots:{customRender:"enable"}},{title:"是否为默认支付",dataIndex:"is_default",width:"20%",scopedSlots:{customRender:"default"}}],b={components:{},data:function(){return{isLoading:!1,isBtnLoading:!1,labelCol:{span:3},wrapperCol:{span:10},PaymentMethodEnum:h["a"],PayMethodIcons:v,createTemplatePath:"/setting/payment/template/create",columns:g,options:{},templateList:[]}},computed:{wechatTemplateList:function(){return this.templateList.filter((function(e){return"wechat"===e.method}))},
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
i=function(){return e};var e={},t=Object.prototype,a=t.hasOwnProperty,n=Object.defineProperty||function(e,t,a){e[t]=a.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function d(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(q){d=function(e,t,a){return e[t]=a}}function u(e,t,a,r){var i=t&&t.prototype instanceof f?t:f,o=Object.create(i.prototype),l=new E(r||[]);return n(o,"_invoke",{value:x(e,a,l)}),o}function p(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(q){return{type:"throw",arg:q}}}e.wrap=u;var m={};function f(){}function h(){}function v(){}var g={};d(g,l,(function(){return this}));var b=Object.getPrototypeOf,y=b&&b(b(L([])));y&&y!==t&&a.call(y,l)&&(g=y);var C=v.prototype=f.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function i(n,o,l,s){var c=p(e[n],e,o);if("throw"!==c.type){var d=c.arg,u=d.value;return u&&"object"==Object(r["a"])(u)&&a.call(u,"__await")?t.resolve(u.__await).then((function(e){i("next",e,l,s)}),(function(e){i("throw",e,l,s)})):t.resolve(u).then((function(e){d.value=e,l(d)}),(function(e){return i("throw",e,l,s)}))}s(c.arg)}var o;n(this,"_invoke",{value:function(e,a){function r(){return new t((function(t,r){i(e,a,t,r)}))}return o=o?o.then(r,r):r()}})}function x(e,t,a){var r="suspendedStart";return function(i,n){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw n;return S()}for(a.method=i,a.arg=n;;){var o=a.delegate;if(o){var l=k(o,a);if(l){if(l===m)continue;return l}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===r)throw r="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);r="executing";var s=p(e,t,a);if("normal"===s.type){if(r=a.done?"completed":"suspendedYield",s.arg===m)continue;return{value:s.arg,done:a.done}}"throw"===s.type&&(r="completed",a.method="throw",a.arg=s.arg)}}}function k(e,t){var a=t.method,r=e.iterator[a];if(void 0===r)return t.delegate=null,"throw"===a&&e.iterator["return"]&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==a&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+a+"' method")),m;var i=p(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,m;var n=i.arg;return n?n.done?(t[e.resultName]=n.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,m):n:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function L(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(a.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=v,n(C,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:h,configurable:!0}),h.displayName=d(v,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,d(e,c,"GeneratorFunction")),e.prototype=Object.create(C),e},e.awrap=function(e){return{__await:e}},_(w.prototype),d(w.prototype,s,(function(){return this})),e.AsyncIterator=w,e.async=function(t,a,r,i,n){void 0===n&&(n=Promise);var o=new w(u(t,a,r,i),n);return e.isGeneratorFunction(a)?o:o.next().then((function(e){return e.done?e.val