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.385ffb38.js

3 lines
129 KiB

10 months ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["setting"],{"0439":function(e,t,a){"use strict";a("08c1")},"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=a("759f"),f=a("3f9c"),h=Object(l["a"])(Object(l["a"])(Object(l["a"])({},f["a"].ALIPAY.value,{icon:s["payAlipay"],color:"#009fe8"}),f["a"].BALANCE.value,{icon:s["payBalance"],color:"#e8a807"}),f["a"].WECHAT.value,{icon:s["payWechat"],color:"#59b64c"}),v=[{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"}}],g={components:{},data:function(){return{isLoading:!1,isBtnLoading:!1,labelCol:{span:3},wrapperCol:{span:10},PaymentMethodEnum:f["a"],PayMethodIcons:h,createTemplatePath:"/setting/payment/template/create",columns:v,options:{},templateList:[]}},computed:{wechatTemplateList:function(){return this.templateList.filter((function(e){return"wechat"===e.met
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
i=function(){return t};var e,t={},a=Object.prototype,n=a.hasOwnProperty,o=Object.defineProperty||function(e,t,a){e[t]=a.value},l="function"==typeof Symbol?Symbol:{},s=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function u(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,a){return e[t]=a}}function p(e,t,a,r){var i=t&&t.prototype instanceof y?t:y,n=Object.create(i.prototype),l=new F(r||[]);return o(n,"_invoke",{value:L(e,a,l)}),n}function m(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var f="suspendedStart",h="suspendedYield",v="executing",g="completed",b={};function y(){}function C(){}function _(){}var w={};u(w,s,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x($([])));k&&k!==a&&n.call(k,s)&&(w=k);var I=_.prototype=y.prototype=Object.create(w);function A(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function a(i,o,l,s){var c=m(e[i],e,o);if("throw"!==c.type){var d=c.arg,u=d.value;return u&&"object"==Object(r["a"])(u)&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){a("next",e,l,s)}),(function(e){a("throw",e,l,s)})):t.resolve(u).then((function(e){d.value=e,l(d)}),(function(e){return a("throw",e,l,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,i){a(e,r,t,i)}))}return i=i?i.then(n,n):n()}})}function L(t,a,r){var i=f;return function(n,o){if(i===v)throw new Error("Generator is already running");if(i===g){if("throw"===n)throw o;return{value:e,done:!0}}for(r.method=n,r.arg=o;;){var l=r.delegate;if(l){var s=S(l,r);if(s){if(s===b)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=v;var c=m(t,a,r);if("normal"===c.type){if(i=r.done?g:h,c.arg===b)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=g,r.method="throw",r.arg=c.arg)}}}function S(t,a){var r=a.method,i=t.iterator[r];if(i===e)return a.delegate=null,"throw"===r&&t.iterator["return"]&&(a.method="return",a.arg=e,S(t,a),"throw"===a.method)||"return"!==r&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var n=m(i,t.iterator,a.arg);if("throw"===n.type)return a.method="throw",a.arg=n.arg,a.delegate=null,b;var o=n.arg;return o?o.done?(a[t.resultName]=o.value,a.next=t.nextLoc,"return"!==a.method&&(a.method="next",a.arg=e),a.delegate=null,b):o:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,b)}function q(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 P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(q,this),this.reset(!0)}function $(t){if(t||""===t){var a=t[s];if(a)return a.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function a(){for(;++i<t.length;)if(n.call(t,i))return a.value=t[i],a.done=!1,a;return a.value=e,a.done=!0,a};return o.next=o}}throw new TypeError(Object(r["a"])(t)+" is not iterable")}return C.prototype=_,o(I,"constructor",{value:_,configurable:!0}),o(_,"constructor",{value:C,configurable:!0}),C.displayName=u(_,d,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===C||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,u(e,d,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},A(E.prototype),u(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,a,r,i,n){void 0===n&&(n=Promise);var o=new E(p(e,a,r,i),n);return t.isGeneratorFunction(a)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},A(I),u(I,d,"Generat