@zhangcf233/pay 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pay.es.js +822 -534
- package/dist/pay.umd.js +2 -2
- package/dist/types/api/getChannels.d.ts +6 -3
- package/dist/types/api/getEnabledChannel.d.ts +3 -2
- package/dist/types/api/index.d.ts +2 -3
- package/dist/types/api/{alipay.d.ts → pay/alipay.d.ts} +1 -1
- package/dist/types/api/{pay.d.ts → pay/index.d.ts} +3 -3
- package/dist/types/api/pay/wechat.d.ts +11 -0
- package/dist/types/api/request.d.ts +2 -2
- package/dist/types/components/balance/balance.vue.d.ts +1 -1
- package/dist/types/components/channels/channel-container.vue.d.ts +2 -1
- package/dist/types/components/popup.vue.d.ts +1 -1
- package/dist/types/components/price/price-container.vue.d.ts +1 -1
- package/dist/types/components/price/price.vue.d.ts +1 -1
- package/dist/types/config.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/{@types → types}/channel.d.ts +9 -2
- package/dist/types/{@types → types}/config.d.ts +3 -0
- package/package.json +1 -1
- package/dist/types/@types/api.d.ts +0 -6
- /package/dist/types/api/{fail.d.ts → tools/fail.d.ts} +0 -0
- /package/dist/types/api/{success.d.ts → tools/success.d.ts} +0 -0
- /package/dist/types/{@types → types}/create.d.ts +0 -0
- /package/dist/types/{@types → types}/index.d.ts +0 -0
- /package/dist/types/{@types → types}/money.d.ts +0 -0
- /package/dist/types/{@types → types}/post.d.ts +0 -0
- /package/dist/types/{@types → types}/price.d.ts +0 -0
package/dist/pay.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var an=Object.defineProperty;var rn=(u,l,p)=>l in u?an(u,l,{enumerable:!0,configurable:!0,writable:!0,value:p}):u[l]=p;var o=(u,l,p)=>(rn(u,typeof l!="symbol"?l+"":l,p),p);(function(u,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vant"),require("vue"),require("vue-class-component"),require("vue-property-decorator")):typeof define=="function"&&define.amd?define(["exports","vant","vue","vue-class-component","vue-property-decorator"],l):(u=typeof globalThis<"u"?globalThis:u||self,l(u.PayPlugin={},u.vant,u.Vue,u.Component,u.vuePropertyDecorator))})(this,function(u,l,p,m,f){var Y,K;"use strict";const y=(e,t="请求失败")=>(l.Dialog({title:t,message:e}),{status:!1,message:e}),j=async(e,t,n="POST")=>new Promise((i,s)=>{const r=localStorage.getItem("AppToken")||"";if(!r)throw new Error("token 不存在");fetch(e,{method:n,headers:{AppToken:r,"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(t).toString()}).then(async a=>{if(!a.ok){const _=await a.text();throw new Error(`HTTP ${a.status} ${a.statusText}: ${_}`)}try{return await a.json()}catch{s("解析 JSON 异常")}}).then(a=>{i(a)}).catch(a=>{let _=(a==null?void 0:a.message)||"未知异常";a.message.includes("404")?_="资源未找到":a.message.includes("500")?_="服务器错误":a instanceof TypeError&&a.message==="Failed to fetch"&&(_="网络连接失败"),s(_)})}),V=e=>({status:!0,message:"成功",data:e}),k=/LT-APP/.test(navigator.userAgent),B=(K=(Y=p.prototype)==null?void 0:Y.$jsBridge)==null?void 0:K.inApp,ee=!!window.ReactNativeWebView,L=async e=>{const{id:t,key:n,value:i,prefix:s}=e;let r=location.origin+`/Payment/${s||""}Alipay`;const a=ne();if(r+=`?qrcode=${a}&id=${t}`,!(n&&i))return y("支付参数异常",`支付时缺少 key value 参数:${JSON.stringify(e)}`);if(r+=`&${n}=${i}`,!a)return location.href=r,V();const{Data:_,Status:c,Message:d}=await j(r,{},"GET");if(!c)return y("支付请求失败",d||"请求支付结果异常");if(!_)return y("支付跳转地址不存在");if(B){p.prototype.$jsBridge.openLink(_);return}location.href=_};function ne(){return k||B||ee}const R={alipay:L};function te(e){return e.filter(({type:t})=>{if(t in R)return!0})}const se=async({channel:e,key:t,value:n,prefix:i})=>{const{type:s,id:r}=e,a=String(Number(n)/100);switch(s in R||l.Toast("暂不支持此渠道"),s){case"alipay":return await L({id:r,key:t,value:a,prefix:i});default:l.Toast("暂不支持此渠道")}},ie="orange",D={needId:!1,name:"店铺余额",theme:"#4089ff",balance:{disabled:!1,key:"Money",api:"/AgentUser/GetMoney"},price:{disabled:!1,custom:!0,prices:[{price:800},{price:12800},{price:38800},{price:68800},{price:128800},{price:268800}]},channel:{api:"/SystemPayment/GetList"},pay:{key:"Money"}},ae={agent:D,user:{theme:"#ff4f4f",name:"幸运币余额",needId:!1,balance:{disabled:!1,key:"PlaMoney",api:"/PlayerUser/GetMoney"},price:{disabled:!1,custom:!0,prices:[{price:200},{price:500},{price:1e3},{price:5e3},{price:1e4},{price:2e4}]},channel:{api:"/SystemPayment/GetList"},pay:{key:"Money"}}},re=async(e,t)=>{const n=await j(e);return t in n?n[t]:(y(JSON.stringify(n)||"解析数据异常",`余额数据中不存在 ${t}`),0)};var oe=Object.defineProperty,ce=Object.getOwnPropertyDescriptor,I=(e,t,n,i)=>{for(var s=i>1?void 0:i?ce(t,n):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(i?a(t,n,s):a(s))||s);return i&&s&&oe(t,n,s),s};let b=class extends f.Vue{constructor(){super(...arguments);o(this,"load");o(this,"loading",!0);o(this,"message","")}get showLoading(){return this.loading||this.message}async mounted(){await this.retry()}test(){this.loading=!0,setTimeout(()=>{this.loading=!1},100)}async retry(){this.message="",this.loading=!0;const n=await this.load().finally(()=>{this.loading=!1}).catch(i=>{this.message=i});n!=null&&this.$emit("done",n)}};I([f.Prop()],b.prototype,"load",2),b=I([f.Component],b);var le=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"pay-error-container"},[n("div",{staticClass:"loading",style:{display:e.showLoading?"flex":"none"}},[e.message?n("van-tag",{attrs:{type:"danger"},on:{click:e.retry}},[e._v(" "+e._s(e.message)+" 点击重试 ")]):n("van-loading",{staticClass:"loading-icon",attrs:{size:"20",type:"spinner"}})],1),e._t("default")],2)},ue=[];const cn="";function g(e,t,n,i,s,r,a,_){var c=typeof e=="function"?e.options:e;t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),r&&(c._scopeId="data-v-"+r);var d;if(a?(d=function(h){h=h||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!h&&typeof __VUE_SSR_CONTEXT__<"u"&&(h=__VUE_SSR_CONTEXT__),s&&s.call(this,h),h&&h._registeredComponents&&h._registeredComponents.add(a)},c._ssrRegister=d):s&&(d=_?function(){s.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:s),d)if(c.functional){c._injectStyles=d;var v=c.render;c.render=function(sn,Z){return d.call(Z),v(sn,Z)}}else{var C=c.beforeCreate;c.beforeCreate=C?[].concat(C,d):[d]}return{exports:e,options:c}}const A={};var pe=g(b,le,ue,!1,_e,"0817c014",null,null);function _e(e){for(let t in A)this[t]=A[t]}const S=function(){return pe.exports}();var fe=Object.defineProperty,de=Object.getOwnPropertyDescriptor,N=(e,t,n,i)=>{for(var s=i>1?void 0:i?de(t,n):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(i?a(t,n,s):a(s))||s);return i&&s&&fe(t,n,s),s};let w=class extends p{constructor(){super(...arguments);o(this,"config");o(this,"value",0)}load(){const{key:n,api:i}=this.config.balance;if(!i||!n)throw new Error("不存在 key 或 api");return re(i,n)}onBalanceLoad(n){this.value=n/100,this.$emit("change",n)}};N([f.Inject()],w.prototype,"config",2),w=N([f.Component({components:{PayError:S}})],w);var he=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"root wechat-font"},[n("PayError",{attrs:{load:e.load},on:{done:e.onBalanceLoad}},[n("h1",[e._v(" "+e._s(e.value)+" ")])])],1)},ve=[];const ln="",q={};var ge=g(w,he,ve,!1,me,"75290345",null,null);function me(e){for(let t in q)this[t]=q[t]}const ye=function(){return ge.exports}(),$e=async e=>(await j(e)).map(({Id:n,PaymentValue:i,PaymentName:s,PaymentIcon:r})=>{const a=Pe(i);return{id:n,name:i,icon:r,type:a}});function Pe(e){return e.includes("支付宝")?"alipay":e.includes("微信")?"wechat":"unknow"}var Ce=Object.defineProperty,be=Object.getOwnPropertyDescriptor,F=(e,t,n,i)=>{for(var s=i>1?void 0:i?be(t,n):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(i?a(t,n,s):a(s))||s);return i&&s&&Ce(t,n,s),s};let O=class extends p{constructor(){super(...arguments);o(this,"config");o(this,"channels",[]);o(this,"select",0);o(this,"showPopover",!1)}get actions(){return this.channels.length?this.channels.map(({name:n,id:i,icon:s},r)=>({text:n,id:i,disabled:r==this.select})):[]}onSelect(n,i){this.select=i,this.$emit("change",this.channels[i])}get name(){let n=this.channels[this.select];return n?n.name:""}load(){return $e(this.config.channel.api)}onLoadChannels(n){this.channels=te(n),this.$emit("change",this.channels[0])}};F([f.Inject()],O.prototype,"config",2),O=F([m({components:{PayError:S}})],O);var we=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("van-popover",{attrs:{trigger:"click",actions:e.actions,placement:"top-end"},on:{select:e.onSelect},scopedSlots:e._u([{key:"reference",fn:function(){return[n("div",{staticClass:"cell"},[n("h5",[e._v("付款方式")]),n("PayError",{staticClass:"name",attrs:{load:e.load},on:{done:e.onLoadChannels}},[n("div",[e._v(" "+e._s(e.name)+" "),n("van-icon",{attrs:{name:"arrow"}})],1)])],1)]},proxy:!0}]),model:{value:e.showPopover,callback:function(i){e.showPopover=i},expression:"showPopover"}})},Oe=[];const un="",U={};var xe=g(O,we,Oe,!1,Te,"4e4c306e",null,null);function Te(e){for(let t in U)this[t]=U[t]}const je=function(){return xe.exports}();var Se=Object.defineProperty,Ee=Object.getOwnPropertyDescriptor,G=(e,t,n,i)=>{for(var s=i>1?void 0:i?Ee(t,n):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(i?a(t,n,s):a(s))||s);return i&&s&&Se(t,n,s),s};let x=class extends p{constructor(){super(...arguments);o(this,"customPrice");o(this,"value",null)}onChange(n){this.$emit("input",Number(n))}};G([f.Prop({default:null})],x.prototype,"customPrice",2),x=G([m],x);var Me=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"custom-price"},[n("h5",[e._v("自定义金额")]),n("van-field",{staticClass:"input wechat-font",attrs:{type:"digit",placeholder:"请输入金额",clearable:""},on:{input:e.onChange},model:{value:e.value,callback:function(i){e.value=i},expression:"value"}})],1)},Be=[];const pn="",z={};var Le=g(x,Me,Be,!1,Re,"ea027830",null,null);function Re(e){for(let t in z)this[t]=z[t]}const J=function(){return Le.exports}();var De=Object.defineProperty,Ie=Object.getOwnPropertyDescriptor,W=(e,t,n,i)=>{for(var s=i>1?void 0:i?Ie(t,n):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(i?a(t,n,s):a(s))||s);return i&&s&&De(t,n,s),s};let T=class extends p{constructor(){super(...arguments);o(this,"price")}get realPrice(){return this.price.price/100}get onlyPrice(){return!this.price.count}};W([f.Prop({default:{}})],T.prototype,"price",2),T=W([m],T);var Ae=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"price-root wechat-font",class:{"only-price":e.onlyPrice}},[e.price.giftCount?n("span",{staticClass:"gift"},[e._v(" 赠"+e._s(e.price.giftCount)+" ")]):e._e(),e.price.count?n("span",{staticClass:"token-count"},[n("img",{attrs:{src:"https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/npdd/user/my-v3/imgs/niu-coin-top-up-icon.png"}}),e._v(" "+e._s(e.price.count)+" ")]):e._e(),n("span",{staticClass:"price"},[e._v("¥"+e._s(e.realPrice))])])},Ne=[];const _n="",X={};var qe=g(T,Ae,Ne,!1,Fe,"68d98a5c",null,null);function Fe(e){for(let t in X)this[t]=X[t]}const Ue=function(){return qe.exports}();var Ge=Object.defineProperty,ze=Object.getOwnPropertyDescriptor,E=(e,t,n,i)=>{for(var s=i>1?void 0:i?ze(t,n):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(i?a(t,n,s):a(s))||s);return i&&s&&Ge(t,n,s),s};let $=class extends p{constructor(){super(...arguments);o(this,"config");o(this,"value",0);o(this,"prices",[]);o(this,"customPrice",0);o(this,"loading",!0);o(this,"message","")}async mounted(){}load(){const{load:n,prices:i}=this.config.price;if(n)return n;if(i)return new Promise(s=>s(i))}onLoadPrices(n){this.prices=n,this.changePrice(0)}changePrice(n){this.value=n,this.$emit("change",this.prices[n])}onCustomPriceChange(n){n?this.$emit("change",{price:n*100}):this.$emit("change",this.prices[this.value])}};E([f.Inject()],$.prototype,"config",2),E([f.Watch("customPrice")],$.prototype,"onCustomPriceChange",1),$=E([m({components:{PriceItem:Ue,PayError:S,PriceCustom:J}})],$);var Je=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.config.price.disabled?e._e():n("div",{staticClass:"price-container"},[n("h5",[e._v("选择充值金额")]),n("PayError",{attrs:{load:e.load},on:{done:e.onLoadPrices}},[n("div",{staticClass:"content"},e._l(e.prices,function(i,s){return n("price-item",{key:s,staticClass:"price-item",class:{select:s==e.value},style:{backgroundColor:s==e.value?e.config.theme||"orange":""},attrs:{price:i},nativeOn:{click:function(r){return e.changePrice(s)}}})}),1)]),e.config.price.custom?[n("PriceCustom",{model:{value:e.customPrice,callback:function(i){e.customPrice=i},expression:"customPrice"}})]:e._e()],2)},We=[];const fn="",H={};var Xe=g($,Je,We,!1,He,"76333b1f",null,null);function He(e){for(let t in H)this[t]=H[t]}const Qe=function(){return Xe.exports}();var Ye=Object.defineProperty,Ke=Object.getOwnPropertyDescriptor,M=(e,t,n,i)=>{for(var s=i>1?void 0:i?Ke(t,n):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(i?a(t,n,s):a(s))||s);return i&&s&&Ye(t,n,s),s};let P=class extends p{constructor(){super(...arguments);o(this,"config");o(this,"id");o(this,"baseTheme",ie);o(this,"visible",!1);o(this,"balance",0);o(this,"price",{price:0});o(this,"channel",null);o(this,"loading",{balance:!1,price:!1,channel:!1})}async mounted(){this.$nextTick(()=>{this.visible=!0,this.initLoad()})}initLoad(){this.loading.balance=this.config.balance.disabled,this.loading.price=this.config.price.disabled}onClose(){this.$emit("onClose")}onClosed(){this.$emit("onClosed")}async onTopup(){const{key:n,prefix:i}=this.config.pay,s=String(this.id||this.price.price);if(!this.channel){y("渠道不存在");return}await se({channel:this.channel,key:n,value:s,prefix:i})}onBanlanceChange(n){this.loading.balance=!0}onChannelChange(n){this.channel=n,this.loading.channel=!0}onPriceChange(n){this.price=n,this.loading.price=!0}get finalPrice(){return this.price.price/100}get disable(){return!Object.values(this.loading).every(n=>n===!0)}get title(){return this.config.name}};M([f.Provide("config"),f.Prop({default:D})],P.prototype,"config",2),M([f.Prop({default:void 0})],P.prototype,"id",2),P=M([m({components:{Balance:ye,Divider:l.Divider,PriceContainer:Qe,Button:l.Button,PriceCustom:J,Channels:je}})],P);var Ze=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("van-popup",{staticClass:"pay-popup",attrs:{position:"bottom",overlay:!0,round:""},on:{closed:e.onClosed,close:e.onClose},model:{value:e.visible,callback:function(i){e.visible=i},expression:"visible"}},[n("h4",{staticClass:"title"},[e._v(" "+e._s(e.title)+" ")]),e.config.balance.disabled?e._e():[n("Balance",{on:{change:e.onBanlanceChange}}),n("Divider")],e.config.price.disabled?e._e():[n("PriceContainer",{on:{change:e.onPriceChange}}),n("Divider")],n("Channels",{on:{change:e.onChannelChange}}),n("Divider"),n("Button",{attrs:{disabled:e.disable,color:e.config.theme||e.baseTheme,block:""},on:{click:e.onTopup}},[e._v(" 立即支付 "+e._s(e.finalPrice)+" 元 ")])],2)},Ve=[];const dn="",Q={};var ke=g(P,Ze,Ve,!1,en,"1c42b078",null,null);function en(e){for(let t in Q)this[t]=Q[t]}const nn=function(){return ke.exports}(),tn={install(e){const t=(n,...i)=>new Promise((s,r)=>{const a=ae[n],{needId:_}=a,c=i[0];if(_&&!c){l.Dialog({title:"参数异常",message:`${n} 类型需要传入订单号 当前未传入!`});return}const d=p.extend(nn),v=new d({propsData:{config:a,id:c}});v.$on("onClosed",()=>{s(),setTimeout(()=>{var C;v.$destroy(),(C=v.$el.parentNode)==null||C.removeChild(v.$el)},300)}),v.$mount(),document.body.appendChild(v.$el)});e.prototype.$pay={create:t}}};u.PayPlugin=tn,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('@charset "UTF-8";.pay-error-container[data-v-0817c014]{position:relative}.pay-error-container .loading[data-v-0817c014]{width:100%;height:100%;position:absolute;background:#fff;z-index:1;transition:all .3s;justify-content:center;align-items:center}.pay-error-container .message[data-v-0817c014]{font-size:.1rem}@font-face{font-family:WeChat-Bold;src:url(https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/pay/fonts/WeChatSansStd-Bold.ttf)}.wechat-font[data-v-20b4bf5f]{font-family:WeChat-Bold}.root[data-v-20b4bf5f]{text-align:center}.cell[data-v-70746494]{display:flex;align-items:center;justify-content:space-between;height:.3rem}.cell .name[data-v-70746494]{width:30vw;color:gray;font-size:.14rem;display:flex;align-items:center;justify-content:end}@font-face{font-family:WeChat-Bold;src:url(https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/pay/fonts/WeChatSansStd-Bold.ttf)}.wechat-font[data-v-ea027830]{font-family:WeChat-Bold}.custom-price .input[data-v-ea027830]{font-size:.2rem}@font-face{font-family:WeChat-Bold;src:url(https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/pay/fonts/WeChatSansStd-Bold.ttf)}.wechat-font[data-v-79d1ed34]{font-family:WeChat-Bold}.price-root[data-v-79d1ed34]{position:relative;text-align:center;background:#f3f3f3;border-radius:.08rem;padding:.1rem 0;display:flex;flex-direction:column;height:.6rem;box-sizing:border-box;justify-content:space-between;align-items:center}.price-root .gift[data-v-79d1ed34]{position:absolute;top:-.1rem;right:-.05rem;background:linear-gradient(248.45deg,#fa1e1e,#ff7752 99.44%);padding:0 .05rem;border-radius:.1rem .1rem .1rem 0;font-size:.1rem;border-width:.02rem;border-color:#fff;border-style:solid;box-sizing:border-box;color:#fff}.price-root .token-count[data-v-79d1ed34]{display:flex;justify-content:center;align-items:center;font-size:.2rem}.price-root .token-count img[data-v-79d1ed34]{width:.16rem;height:.16rem;margin-right:.02rem}.price-root .price[data-v-79d1ed34]{font-size:.14rem}.only-price[data-v-79d1ed34]{align-items:center;justify-content:center}.only-price .price[data-v-79d1ed34]{font-size:.2rem}.content[data-v-737beb57]{width:100%;margin:.2rem 0;display:grid;grid-template-columns:repeat(3,1fr);gap:.1rem;box-sizing:border-box;font-weight:500}.loading[data-v-737beb57]{display:flex;justify-content:center;align-items:center}.select[data-v-737beb57]{color:#fff}@font-face{font-family:WeChat-Bold;src:url(https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/pay/fonts/WeChatSansStd-Bold.ttf)}.wechat-font[data-v-4ac1c510]{font-family:WeChat-Bold}.pay-popup[data-v-4ac1c510]{display:flex;flex-direction:column;width:100vw;box-sizing:border-box;overflow:hidden;padding:0 .15rem .2rem;transition:all .3s}.title[data-v-4ac1c510]{text-align:center;margin:.16rem 0}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
|
+
var __defProp=Object.defineProperty,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__publicField=(e,t,n)=>(__defNormalProp(e,"symbol"!=typeof t?t+"":t,n),n);!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vant"),require("vue"),require("vue-class-component"),require("vue-property-decorator")):"function"==typeof define&&define.amd?define(["exports","vant","vue","vue-class-component","vue-property-decorator"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).PayPlugin={},e.vant,e.Vue,e.Component,e.vuePropertyDecorator)}(this,function(e,t,n,i,o){var r,s;async function a(e,t,n="POST"){return new Promise((i,o)=>{const r=localStorage.getItem("AppToken")||"";if(!r)throw new Error("token 不存在");fetch(e,{method:n,headers:{AppToken:r,"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(t).toString()}).then(async e=>{if(!e.ok){const t=await e.text();throw new Error(`HTTP ${e.status} ${e.statusText}: ${t}`)}try{return await e.json()}catch(t){o("解析 JSON 异常")}}).then(e=>{i(e)}).catch(e=>{let t=(null==e?void 0:e.message)||"未知异常";e.message.includes("404")?t="资源未找到":e.message.includes("500")?t="服务器错误":e instanceof TypeError&&"Failed to fetch"===e.message&&(t="网络连接失败"),o(t)})})}const c=(e,n="请求失败")=>(t.Dialog({title:n,message:e}),{status:!1,message:e}),l=/LT-APP/.test(navigator.userAgent),p=null==(s=null==(r=n.prototype)?void 0:r.$jsBridge)?void 0:s.inApp,u=Boolean(window.ReactNativeWebView),d=async e=>{const{id:t,key:i,value:o,prefix:r}=e;let s=location.origin+`/Payment/${r||""}Alipay`;const d=l||p||u;if(s+=`?qrcode=${d}&id=${t}`,!i||!o)return c("支付参数异常",`支付时缺少 key value 参数:${JSON.stringify(e)}`);if(s+=`&${i}=${o}`,!d)return location.href=s,{status:!0,message:"成功",data:h};var h;const{Data:f,Status:g,Message:v}=await a(s,{},"GET");return g?f?void(p?n.prototype.$jsBridge.openLink(f):location.href=f):c("支付跳转地址不存在"):c("支付请求失败",v||"请求支付结果异常")};const h=/miniProgram/i.test(navigator.userAgent)&&/micromessenger/i.test(navigator.userAgent),f=e=>{var n;const{id:i,appid:o,key:r,value:s,prefix:a}=e;if(!o)return void t.Dialog({title:"小程序 id 不存在"});if(!localStorage.getItem("AppToken"))return void t.Dialog({title:"环境异常",message:"本地 AppToken 不存在! 请重新登录",showCancelButton:!1,confirmButtonText:"确定"});const c={appid:o,payKey:r,payValue:s,paymentId:i,payApi:`${location.origin}}/Payment/${a}Weixin`,tokenKey:"AppToken",tokenValue:localStorage.getItem("AppToken")},l=`weixin://dl/business/?appid=${o}&path=pages/home/index&query=${encodeURIComponent(Object.entries(c).map(([e,t])=>`${e}=${String(t)}`).join("&"))}`;if(window.ReactNativeWebView)null==(n=window.ReactNativeWebView)||n.postMessage(JSON.stringify({type:"openUrl",data:{url:l},code:200}));else if(h){const e=Object.entries(c).map(([e,t])=>`${e}=${String(t)}`).join("&");uni.navigateTo({url:`/pages/home/pay?${e}`})}else location.href=l},g={alipay:d,wechat:f};function v(e,t){return e.filter(({type:e})=>!t.includes(e)&&(e in g||void 0))}const m=["platform"],y={needId:!1,name:"店铺余额",theme:"#4089ff",balance:{disabled:!1,key:"Money",api:"/AgentUser/GetMoney"},price:{disabled:!1,custom:!0,prices:[{price:800},{price:12800},{price:38800},{price:68800},{price:128800},{price:268800}]},channel:{api:"/SystemPayment/GetList",ignores:m},pay:{key:"Money"}},_={agent:y,user:{theme:"#ff4f4f",name:"幸运币余额",needId:!1,balance:{disabled:!1,key:"PlaMoney",api:"/PlayerUser/GetMoney"},price:{disabled:!1,custom:!0,prices:[{price:200},{price:500},{price:1e3},{price:5e3},{price:1e4},{price:2e4}]},channel:{api:"/SystemPayment/GetList",ignores:m},pay:{key:"Money"}}};var b=Object.defineProperty,P=Object.getOwnPropertyDescriptor,C=(e,t,n,i)=>{for(var o,r=i>1?void 0:i?P(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(r=(i?o(t,n,r):o(r))||r);return i&&r&&b(t,n,r),r};let w=class extends o.Vue{constructor(){super(...arguments),__publicField(this,"load"),__publicField(this,"loading",!0),__publicField(this,"message","")}get showLoading(){return this.loading||this.message}async mounted(){await this.retry()}test(){this.loading=!0,setTimeout(()=>{this.loading=!1},100)}async retry(){this.message="",this.loading=!0;const e=await this.load().finally(()=>{this.loading=!1}).catch(e=>{this.message=e});null!=e&&this.$emit("done",e)}};C([o.Prop()],w.prototype,"load",2),w=C([o.Component],w);function $(e,t,n,i,o,r,s,a){var c,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),i&&(l.functional=!0),r&&(l._scopeId="data-v-"+r),s?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},l._ssrRegister=c):o&&(c=a?function(){o.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(l.functional){l._injectStyles=c;var p=l.render;l.render=function(e,t){return c.call(t),p(e,t)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,c):[c]}return{exports:e,options:l}}const x={};var k=$(w,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"pay-error-container"},[n("div",{staticClass:"loading",style:{display:e.showLoading?"flex":"none"}},[e.message?n("van-tag",{attrs:{type:"danger"},on:{click:e.retry}},[e._v(" "+e._s(e.message)+" 点击重试 ")]):n("van-loading",{staticClass:"loading-icon",attrs:{size:"20",type:"spinner"}})],1),e._t("default")],2)},[],!1,O,"0817c014",null,null);function O(e){for(let t in x)this[t]=x[t]}const T=function(){return k.exports}();var j=Object.defineProperty,F=Object.getOwnPropertyDescriptor,S=(e,t,n,i)=>{for(var o,r=i>1?void 0:i?F(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(r=(i?o(t,n,r):o(r))||r);return i&&r&&j(t,n,r),r};let E=class extends n{constructor(){super(...arguments),__publicField(this,"config"),__publicField(this,"value",0)}load(){const{key:e,api:t}=this.config.balance;if(!t||!e)throw new Error("不存在 key 或 api");return(async(e,t)=>{const n=await a(e);return t in n?n[t]:(c(JSON.stringify(n)||"解析数据异常",`余额数据中不存在 ${t}`),0)})(t,e)}onBalanceLoad(e){this.value=e/100,this.$emit("change",e)}};S([o.Inject()],E.prototype,"config",2),E=S([o.Component({components:{PayError:T}})],E);const D={};var A=$(E,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"root wechat-font"},[n("PayError",{attrs:{load:e.load},on:{done:e.onBalanceLoad}},[n("h1",[e._v(" "+e._s(e.value)+" ")])])],1)},[],!1,I,"20b4bf5f",null,null);function I(e){for(let t in D)this[t]=D[t]}const L=function(){return A.exports}();var N=Object.defineProperty,B=Object.getOwnPropertyDescriptor,R=(e,t,n,i)=>{for(var o,r=i>1?void 0:i?B(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(r=(i?o(t,n,r):o(r))||r);return i&&r&&N(t,n,r),r};let V=class extends n{constructor(){super(...arguments),__publicField(this,"config"),__publicField(this,"channels",[]),__publicField(this,"select",0),__publicField(this,"showPopover",!1)}get actions(){return this.channels.length?this.channels.map(({name:e,id:t,icon:n},i)=>({text:e,id:t,disabled:i==this.select})):[]}onSelect(e,t){this.select=t,this.$emit("change",this.channels[t])}get name(){let e=this.channels[this.select];return e?e.name:""}get ignores(){return this.config.channel.ignores||[]}load(){return(async(e,t)=>v((await a(e)).map(({Id:e,PaymentValue:t,PaymentName:n,PaymentIcon:i,AgentDescribe:o})=>{const r=function(e){return e.includes("支付宝")?"alipay":e.includes("微信")?"wechat":e.includes("平台币")?"platform":e.includes("苹果")?"apple":"unknow"}(t);return{id:e,name:t,icon:i,type:r,appid:o}}),t))(this.config.channel.api,this.ignores)}onLoadChannels(e){this.channels=v(e,this.ignores),this.$emit("change",this.channels[0])}};R([o.Inject()],V.prototype,"config",2),V=R([i({components:{PayError:T}})],V);const M={};var q=$(V,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("van-popover",{attrs:{trigger:"click",actions:e.actions,placement:"top-end"},on:{select:e.onSelect},scopedSlots:e._u([{key:"reference",fn:function(){return[n("div",{staticClass:"cell"},[n("h5",[e._v("付款方式")]),n("PayError",{staticClass:"name",attrs:{load:e.load},on:{done:e.onLoadChannels}},[n("div",[e._v(" "+e._s(e.name)+" "),n("van-icon",{attrs:{name:"arrow"}})],1)])],1)]},proxy:!0}]),model:{value:e.showPopover,callback:function(t){e.showPopover=t},expression:"showPopover"}})},[],!1,U,"70746494",null,null);function U(e){for(let t in M)this[t]=M[t]}const G=function(){return q.exports}();var W=Object.defineProperty,J=Object.getOwnPropertyDescriptor,z=(e,t,n,i)=>{for(var o,r=i>1?void 0:i?J(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(r=(i?o(t,n,r):o(r))||r);return i&&r&&W(t,n,r),r};let K=class extends n{constructor(){super(...arguments),__publicField(this,"customPrice"),__publicField(this,"value",null)}onChange(e){this.$emit("input",Number(e))}};z([o.Prop({default:null})],K.prototype,"customPrice",2),K=z([i],K);const X={};var H=$(K,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"custom-price"},[n("h5",[e._v("自定义金额")]),n("van-field",{staticClass:"input wechat-font",attrs:{type:"digit",placeholder:"请输入金额",clearable:""},on:{input:e.onChange},model:{value:e.value,callback:function(t){e.value=t},expression:"value"}})],1)},[],!1,Q,"ea027830",null,null);function Q(e){for(let t in X)this[t]=X[t]}const Y=function(){return H.exports}();var Z=Object.defineProperty,ee=Object.getOwnPropertyDescriptor,te=(e,t,n,i)=>{for(var o,r=i>1?void 0:i?ee(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(r=(i?o(t,n,r):o(r))||r);return i&&r&&Z(t,n,r),r};let ne=class extends n{constructor(){super(...arguments),__publicField(this,"price")}get realPrice(){return this.price.price/100}get onlyPrice(){return!this.price.count}};te([o.Prop({default:{}})],ne.prototype,"price",2),ne=te([i],ne);const ie={};var oe=$(ne,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"price-root wechat-font",class:{"only-price":e.onlyPrice}},[e.price.giftCount?n("span",{staticClass:"gift"},[e._v(" 赠"+e._s(e.price.giftCount)+" ")]):e._e(),e.price.count?n("span",{staticClass:"token-count"},[n("img",{attrs:{src:"https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/npdd/user/my-v3/imgs/niu-coin-top-up-icon.png"}}),e._v(" "+e._s(e.price.count)+" ")]):e._e(),n("span",{staticClass:"price"},[e._v("¥"+e._s(e.realPrice))])])},[],!1,re,"79d1ed34",null,null);function re(e){for(let t in ie)this[t]=ie[t]}const se=function(){return oe.exports}();var ae=Object.defineProperty,ce=Object.getOwnPropertyDescriptor,le=(e,t,n,i)=>{for(var o,r=i>1?void 0:i?ce(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(r=(i?o(t,n,r):o(r))||r);return i&&r&&ae(t,n,r),r};let pe=class extends n{constructor(){super(...arguments),__publicField(this,"config"),__publicField(this,"value",0),__publicField(this,"prices",[]),__publicField(this,"customPrice",0),__publicField(this,"loading",!0),__publicField(this,"message","")}async mounted(){}load(){const{load:e,prices:t}=this.config.price;return e||(t?new Promise(e=>e(t)):void 0)}onLoadPrices(e){this.prices=e,this.changePrice(0)}changePrice(e){this.value=e,this.$emit("change",this.prices[e])}onCustomPriceChange(e){e?this.$emit("change",{price:100*e}):this.$emit("change",this.prices[this.value])}};le([o.Inject()],pe.prototype,"config",2),le([o.Watch("customPrice")],pe.prototype,"onCustomPriceChange",1),pe=le([i({components:{PriceItem:se,PayError:T,PriceCustom:Y}})],pe);const ue={};var de=$(pe,function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.config.price.disabled?e._e():n("div",{staticClass:"price-container"},[n("h5",[e._v("选择充值金额")]),n("PayError",{attrs:{load:e.load},on:{done:e.onLoadPrices}},[n("div",{staticClass:"content"},e._l(e.prices,function(t,i){return n("price-item",{key:i,staticClass:"price-item",class:{select:i==e.value},style:{backgroundColor:i==e.value?e.config.theme||"orange":""},attrs:{price:t},nativeOn:{click:function(t){return e.changePrice(i)}}})}),1)]),e.config.price.custom?[n("PriceCustom",{model:{value:e.customPrice,callback:function(t){e.customPrice=t},expression:"customPrice"}})]:e._e()],2)},[],!1,he,"737beb57",null,null);function he(e){for(let t in ue)this[t]=ue[t]}const fe=function(){return de.exports}();var ge=Object.defineProperty,ve=Object.getOwnPropertyDescriptor,me=(e,t,n,i)=>{for(var o,r=i>1?void 0:i?ve(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(r=(i?o(t,n,r):o(r))||r);return i&&r&&ge(t,n,r),r};let ye=class extends n{constructor(){super(...arguments),__publicField(this,"config"),__publicField(this,"id"),__publicField(this,"baseTheme","orange"),__publicField(this,"visible",!1),__publicField(this,"balance",0),__publicField(this,"price",{price:0}),__publicField(this,"channel",null),__publicField(this,"loading",{balance:!1,price:!1,channel:!1})}async mounted(){this.$nextTick(()=>{this.visible=!0,this.initLoad()})}initLoad(){this.loading.balance=this.config.balance.disabled,this.loading.price=this.config.price.disabled}onClose(){this.$emit("onClose")}onClosed(){this.$emit("onClosed")}async onTopup(){const{key:e,prefix:n}=this.config.pay,i=String(this.id||this.price.price);this.channel?(await(async({channel:e,key:n,value:i,prefix:o})=>{const{type:r,id:s,appid:a}=e,c=String(Number(i)/100);switch(r in g||t.Toast("暂不支持此渠道"),r){case"alipay":return await d({id:s,key:n,value:c,prefix:o});case"wechat":return a?await f({appid:a,prefix:o,key:n,value:i,id:s}):t.Dialog({title:"参数异常",message:"此渠道未配置小程序 appid 请先使用其他渠道!"});default:t.Toast("暂不支持此渠道")}})({channel:this.channel,key:e,value:i,prefix:n}),this.onClosed()):c("渠道不存在")}onBanlanceChange(e){this.loading.balance=!0}onChannelChange(e){this.channel=e,this.loading.channel=!0}onPriceChange(e){this.price=e,this.loading.price=!0}get finalPrice(){return this.price.price/100}get disable(){return!Object.values(this.loading).every(e=>!0===e)}get title(){return this.config.name}};me([o.Provide("config"),o.Prop({default:y})],ye.prototype,"config",2),me([o.Prop({default:void 0})],ye.prototype,"id",2),ye=me([i({components:{Balance:L,Divider:t.Divider,PriceContainer:fe,Button:t.Button,PriceCustom:Y,Channels:G}})],ye);const _e={};var be=$(ye,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("van-popup",{staticClass:"pay-popup",attrs:{position:"bottom",overlay:!0,round:""},on:{closed:e.onClosed,close:e.onClose},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[n("h4",{staticClass:"title"},[e._v(" "+e._s(e.title)+" ")]),e.config.balance.disabled?e._e():[n("Balance",{on:{change:e.onBanlanceChange}}),n("Divider")],e.config.price.disabled?e._e():[n("PriceContainer",{on:{change:e.onPriceChange}}),n("Divider")],n("Channels",{on:{change:e.onChannelChange}}),n("Divider"),n("Button",{attrs:{disabled:e.disable,color:e.config.theme||e.baseTheme,block:""},on:{click:e.onTopup}},[e._v(" 立即支付 "+e._s(e.finalPrice)+" 元 ")])],2)},[],!1,Pe,"4ac1c510",null,null);function Pe(e){for(let t in _e)this[t]=_e[t]}const Ce=function(){return be.exports}(),we={install(e){e.prototype.$pay={create:(e,...i)=>new Promise((o,r)=>{const s=_[e],{needId:a}=s,c=i[0];if(a&&!c)return void t.Dialog({title:"参数异常",message:`${e} 类型需要传入订单号 当前未传入!`});const l=new(n.extend(Ce))({propsData:{config:s,id:c}});l.$on("onClosed",()=>{o(),setTimeout(()=>{var e;l.$destroy(),null==(e=l.$el.parentNode)||e.removeChild(l.$el)},300)}),l.$mount(),document.body.appendChild(l.$el)})}}};e.PayPlugin=we,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import { Channel } from "
|
|
2
|
-
/**
|
|
3
|
-
|
|
1
|
+
import { Channel, ChannelType } from "../types";
|
|
2
|
+
/** 统一的获取渠道方法
|
|
3
|
+
* @param url 请求地址
|
|
4
|
+
* @param ignores 需要忽略的渠道
|
|
5
|
+
*/
|
|
6
|
+
export declare const getPayChannels: (url: string, ignores: ChannelType[]) => Promise<Channel[]>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Channel } from "
|
|
1
|
+
import { Channel, ChannelType } from "../types";
|
|
2
2
|
/** 当前支持的渠道类型*/
|
|
3
3
|
export declare const EnableChannel: {
|
|
4
4
|
alipay: (options: import("./pay").BasePayOptions) => Promise<{
|
|
5
5
|
status: boolean;
|
|
6
6
|
message: string;
|
|
7
7
|
} | undefined>;
|
|
8
|
+
wechat: import("./pay/wechat").Wechat;
|
|
8
9
|
};
|
|
9
10
|
/** 过滤当前支持的渠道*/
|
|
10
|
-
export default function (list: Channel[]): Channel[];
|
|
11
|
+
export default function (list: Channel[], ignoers: ChannelType[]): Channel[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Channel } from "
|
|
1
|
+
import { Channel } from "../../types";
|
|
2
2
|
export interface BasePayOptions {
|
|
3
3
|
/** 渠道 id*/
|
|
4
4
|
id: number;
|
|
@@ -20,7 +20,7 @@ export interface SendPayOptions {
|
|
|
20
20
|
prefix?: string;
|
|
21
21
|
}
|
|
22
22
|
/** 发送充值请求*/
|
|
23
|
-
export declare const sendPay: ({ channel, key, value, prefix }: SendPayOptions) => Promise<{
|
|
23
|
+
export declare const sendPay: ({ channel, key, value, prefix }: SendPayOptions) => Promise<void | import("vant/types/dialog").DialogAction | {
|
|
24
24
|
status: boolean;
|
|
25
25
|
message: string;
|
|
26
|
-
}
|
|
26
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BasePayOptions } from ".";
|
|
2
|
+
/** 小程序支付参数*/
|
|
3
|
+
export interface WechatOptions extends BasePayOptions {
|
|
4
|
+
/** 小程序 id*/
|
|
5
|
+
appid: string;
|
|
6
|
+
}
|
|
7
|
+
/** 支付方法类型声明*/
|
|
8
|
+
export type Wechat = (p: WechatOptions) => void;
|
|
9
|
+
/** 小程序支付方法*/
|
|
10
|
+
declare const wechat: Wechat;
|
|
11
|
+
export default wechat;
|
|
@@ -3,6 +3,6 @@ export interface PayPostResult<T = null> {
|
|
|
3
3
|
message: string;
|
|
4
4
|
data?: T;
|
|
5
5
|
}
|
|
6
|
-
export declare
|
|
6
|
+
export declare function request<T>(url: string, data?: {
|
|
7
7
|
[key: string]: any;
|
|
8
|
-
}, method?: "POST" | "GET")
|
|
8
|
+
}, method?: "POST" | "GET"): Promise<T>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Vue from 'vue';
|
|
2
|
-
import { Channel, Config } from '
|
|
2
|
+
import { Channel, Config } from '../../types';
|
|
3
3
|
interface Action {
|
|
4
4
|
text: string;
|
|
5
5
|
id: number;
|
|
@@ -12,6 +12,7 @@ export default class Channels extends Vue {
|
|
|
12
12
|
showPopover: boolean;
|
|
13
13
|
onSelect(action: Action, index: number): void;
|
|
14
14
|
get name(): string;
|
|
15
|
+
get ignores(): import("../../types").ChannelType[];
|
|
15
16
|
load(): Promise<Channel[]>;
|
|
16
17
|
onLoadChannels(data: Channel[]): void;
|
|
17
18
|
__VLS_template: () => void;
|
package/dist/types/config.d.ts
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -11,8 +11,13 @@ export interface ApiChannel {
|
|
|
11
11
|
/** 渠道名称 例如:微信(1.4)*/
|
|
12
12
|
PaymentValue: string;
|
|
13
13
|
}
|
|
14
|
-
/**
|
|
15
|
-
|
|
14
|
+
/** 支付渠道类型
|
|
15
|
+
* - alipay 支付宝
|
|
16
|
+
* - wechat 微信 目前只有小程序这一种支付方法
|
|
17
|
+
* - platform 平台币
|
|
18
|
+
* - apple 苹果
|
|
19
|
+
*/
|
|
20
|
+
export type ChannelType = "alipay" | "wechat" | "platform" | "apple" | "unknow";
|
|
16
21
|
/** 支付渠道*/
|
|
17
22
|
export interface Channel {
|
|
18
23
|
/** id*/
|
|
@@ -23,4 +28,6 @@ export interface Channel {
|
|
|
23
28
|
name: string;
|
|
24
29
|
/** 类型*/
|
|
25
30
|
type: ChannelType;
|
|
31
|
+
/** 小程序 id*/
|
|
32
|
+
appid?: string;
|
|
26
33
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ChannelType } from "./channel";
|
|
1
2
|
import { Price } from "./price";
|
|
2
3
|
export type PayCreateType = "agent" | "user";
|
|
3
4
|
export type PayAllConfigType = {
|
|
@@ -34,6 +35,8 @@ export type Config = {
|
|
|
34
35
|
channel: {
|
|
35
36
|
/** 加载渠道地址*/
|
|
36
37
|
api: string;
|
|
38
|
+
/** 此配置不支持的支付渠道*/
|
|
39
|
+
ignores?: Array<ChannelType>;
|
|
37
40
|
};
|
|
38
41
|
/** 支付参数*/
|
|
39
42
|
pay: {
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|