@zhangcf233/pay 1.0.10 → 1.0.12

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 CHANGED
@@ -1,15 +1,14 @@
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)}}();
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('@charset "UTF-8";.protocol-popup[data-v-1e3531b1]{height:70vh;width:100vw;overflow-x:hidden}.protocol-popup .protocol[data-v-1e3531b1]{display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%}.protocol-popup .protocol .btn-box[data-v-1e3531b1]{height:10%;width:100%;display:flex;justify-content:space-around;padding:.1rem;box-sizing:content-box}.protocol-popup .protocol .btn-box>*[data-v-1e3531b1]{width:45%}.protocol-popup .protocol iframe[data-v-1e3531b1]{display:block;width:100%;height:90%;margin:0;border:0;padding:.16rem;box-sizing:border-box}.agreement[data-v-017a359d]{display:flex;justify-content:center;align-items:center;font-size:.12rem;margin:.16rem 0}.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}.identity[data-v-5f9eb7e3]{margin-top:.16rem}@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-05e06290]{font-family:WeChat-Bold}.custom-price .input[data-v-05e06290]{font-size:.2rem;padding:0;margin-top:.16rem}@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-a6f45494]{width:100%;margin:.16rem 0;display:grid;grid-template-columns:repeat(3,1fr);gap:.1rem;box-sizing:border-box;font-weight:500}.loading[data-v-a6f45494]{display:flex;justify-content:center;align-items:center}.select[data-v-a6f45494]{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-7115f264]{font-family:WeChat-Bold}.pay-popup[data-v-7115f264]{display:flex;flex-direction:column;width:100vw;box-sizing:border-box;overflow:hidden;padding:0 .15rem .2rem;transition:all .3s}.title[data-v-7115f264]{text-align:center;margin:.16rem 0}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => {
5
5
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
6
6
  return value;
7
7
  };
8
- var _a, _b;
9
8
  import { Dialog, Toast, Divider, Button } from "vant";
10
9
  import Vue from "vue";
11
- import Component$1 from "vue-class-component";
12
- import { Prop, Component, Vue as Vue$1, Inject, Watch, Provide } from "vue-property-decorator";
10
+ import Component from "vue-class-component";
11
+ import { Prop, Inject, Watch, Component as Component$1, Vue as Vue$1, Provide } from "vue-property-decorator";
13
12
  async function request(url, data, method = "POST") {
14
13
  return new Promise((res, rej) => {
15
14
  const AppToken = localStorage.getItem("AppToken") || "";
@@ -62,9 +61,9 @@ const success = (data) => {
62
61
  data
63
62
  };
64
63
  };
65
- const isYM = /LT-APP/.test(navigator.userAgent);
66
- const inApp = (_b = (_a = Vue.prototype) == null ? void 0 : _a.$jsBridge) == null ? void 0 : _b.inApp;
67
- const isThirdParty = Boolean(window.ReactNativeWebView);
64
+ const ua = navigator.userAgent;
65
+ const isYM = /LT-APP/.test(ua);
66
+ const isZW = /ZW-APP/.test(ua);
68
67
  const alipay = async (options) => {
69
68
  const { id, key, value, prefix } = options;
70
69
  let url = location.origin + `/Payment/${prefix || ""}Alipay`;
@@ -85,18 +84,18 @@ const alipay = async (options) => {
85
84
  if (!Data) {
86
85
  return fail("支付跳转地址不存在");
87
86
  }
88
- if (inApp) {
87
+ if (isZW) {
89
88
  Vue.prototype.$jsBridge.openLink(Data);
90
89
  return;
91
90
  }
92
91
  location.href = Data;
93
92
  };
94
93
  function getQrcode() {
95
- return isYM || inApp || isThirdParty;
94
+ return isYM || isZW;
96
95
  }
97
96
  const isMpWeixin = /miniProgram/i.test(navigator.userAgent) && /micromessenger/i.test(navigator.userAgent);
98
97
  const wechat = (params) => {
99
- var _a2;
98
+ var _a;
100
99
  const { id, appid, key, value, prefix } = params;
101
100
  if (!appid) {
102
101
  Dialog({
@@ -132,7 +131,7 @@ const wechat = (params) => {
132
131
  const query = encodeURIComponent(Object.entries(options).map(([key2, value2]) => `${key2}=${String(value2)}`).join("&"));
133
132
  const url = `weixin://dl/business/?appid=${appid}&path=pages/home/index&query=${query}`;
134
133
  if (window.ReactNativeWebView) {
135
- (_a2 = window.ReactNativeWebView) == null ? void 0 : _a2.postMessage(JSON.stringify(
134
+ (_a = window.ReactNativeWebView) == null ? void 0 : _a.postMessage(JSON.stringify(
136
135
  {
137
136
  type: "openUrl",
138
137
  data: {
@@ -194,6 +193,7 @@ const sendPay = async ({ channel, key, value, prefix }) => {
194
193
  };
195
194
  const BaseTheme = "orange";
196
195
  const ignorePlatform = ["platform"];
196
+ const BaseAgreement = "https://czyxzs.xuelm.cn/agreement.html";
197
197
  const AgentConfig = {
198
198
  needId: false,
199
199
  name: "店铺余额",
@@ -234,7 +234,13 @@ const AgentConfig = {
234
234
  },
235
235
  pay: {
236
236
  key: "Money"
237
- }
237
+ },
238
+ identity: {
239
+ disable: false,
240
+ api: "/AgentUser/GetUserInfo",
241
+ auth: "/AgentUser/Authentication"
242
+ },
243
+ agreement: BaseAgreement
238
244
  };
239
245
  const UserConfig = {
240
246
  theme: "#ff4f4f",
@@ -275,97 +281,113 @@ const UserConfig = {
275
281
  },
276
282
  pay: {
277
283
  key: "Money"
278
- }
284
+ },
285
+ identity: {
286
+ disable: false,
287
+ api: "/PlayerUser/GetUserInfo",
288
+ auth: "/PlayerUser/Authentication"
289
+ },
290
+ agreement: BaseAgreement
279
291
  };
280
292
  const PayAllConfig = {
281
293
  agent: AgentConfig,
282
294
  user: UserConfig
283
295
  };
284
- const getPayMoney = async (url, key) => {
285
- const data = await request(url);
286
- if (!(key in data)) {
287
- fail(JSON.stringify(data) || "解析数据异常", `余额数据中不存在 ${key}`);
288
- return 0;
289
- }
290
- return data[key];
291
- };
292
- var __defProp$6 = Object.defineProperty;
293
- var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
294
- var __decorateClass$6 = (decorators, target, key, kind) => {
295
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key) : target;
296
+ var __defProp$a = Object.defineProperty;
297
+ var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
298
+ var __decorateClass$a = (decorators, target, key, kind) => {
299
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$a(target, key) : target;
296
300
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
297
301
  if (decorator = decorators[i])
298
302
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
299
303
  if (kind && result)
300
- __defProp$6(target, key, result);
304
+ __defProp$a(target, key, result);
301
305
  return result;
302
306
  };
303
- let PayError$1 = class PayError extends Vue$1 {
307
+ let AgreementPopup$1 = class AgreementPopup extends Vue {
304
308
  constructor() {
305
309
  super(...arguments);
306
- __publicField(this, "load");
307
- __publicField(this, "loading", true);
308
- __publicField(this, "message", "");
310
+ __publicField(this, "value");
311
+ __publicField(this, "config");
312
+ __publicField(this, "open", false);
309
313
  }
310
- get showLoading() {
311
- return this.loading || this.message;
314
+ mounted() {
315
+ this.open = this.value;
312
316
  }
313
- async mounted() {
314
- await this.retry();
317
+ onValue(n) {
318
+ this.open = n;
315
319
  }
316
- test() {
317
- this.loading = true;
318
- setTimeout(() => {
319
- this.loading = false;
320
- }, 100);
320
+ onOpen(n) {
321
+ this.$emit("input", n);
321
322
  }
322
- async retry() {
323
- this.message = "";
324
- this.loading = true;
325
- const res = await this.load().finally(() => {
326
- this.loading = false;
327
- }).catch((message) => {
328
- this.message = message;
329
- });
330
- if (res != void 0) {
331
- this.$emit("done", res);
332
- }
323
+ disagree() {
324
+ this.$emit("disagree");
325
+ }
326
+ agreeProtocolAndPay() {
327
+ this.$emit("agreeProtocolAndPay");
333
328
  }
334
329
  };
335
- __decorateClass$6([
336
- Prop()
337
- ], PayError$1.prototype, "load", 2);
338
- PayError$1 = __decorateClass$6([
330
+ __decorateClass$a([
331
+ Prop({ default: false })
332
+ ], AgreementPopup$1.prototype, "value", 2);
333
+ __decorateClass$a([
334
+ Inject()
335
+ ], AgreementPopup$1.prototype, "config", 2);
336
+ __decorateClass$a([
337
+ Watch("value")
338
+ ], AgreementPopup$1.prototype, "onValue", 1);
339
+ __decorateClass$a([
340
+ Watch("open")
341
+ ], AgreementPopup$1.prototype, "onOpen", 1);
342
+ AgreementPopup$1 = __decorateClass$a([
339
343
  Component
340
- ], PayError$1);
341
- var render$6 = function() {
344
+ ], AgreementPopup$1);
345
+ var render$a = function() {
342
346
  var _vm = this;
343
347
  var _h = _vm.$createElement;
344
348
  var _c = _vm._self._c || _h;
345
- return _c("div", {
346
- staticClass: "pay-error-container"
349
+ return _c("van-popup", {
350
+ staticClass: "protocol-popup",
351
+ attrs: {
352
+ "position": "bottom",
353
+ "overlay": true,
354
+ "round": ""
355
+ },
356
+ model: {
357
+ value: _vm.open,
358
+ callback: function($$v) {
359
+ _vm.open = $$v;
360
+ },
361
+ expression: "open"
362
+ }
347
363
  }, [_c("div", {
348
- staticClass: "loading",
349
- style: {
350
- display: _vm.showLoading ? "flex" : "none"
364
+ staticClass: "protocol"
365
+ }, [_c("iframe", {
366
+ attrs: {
367
+ "src": _vm.config.agreement
351
368
  }
352
- }, [_vm.message ? _c("van-tag", {
369
+ }), _c("div", {
370
+ staticClass: "btn-box"
371
+ }, [_c("van-button", {
353
372
  attrs: {
354
- "type": "danger"
373
+ "block": ""
355
374
  },
356
375
  on: {
357
- "click": _vm.retry
376
+ "click": _vm.disagree
358
377
  }
359
- }, [_vm._v(" " + _vm._s(_vm.message) + " 点击重试 ")]) : _c("van-loading", {
360
- staticClass: "loading-icon",
378
+ }, [_vm._v("不同意")]), _c("van-button", {
361
379
  attrs: {
362
- "size": "20",
363
- "type": "spinner"
380
+ "color": _vm.config.theme,
381
+ "block": "",
382
+ "type": "primary"
383
+ },
384
+ on: {
385
+ "click": _vm.agreeProtocolAndPay
364
386
  }
365
- })], 1), _vm._t("default")], 2);
387
+ }, [_vm._v("同意并支付")])], 1)])]);
366
388
  };
367
- var staticRenderFns$6 = [];
368
- const payError_vue_vue_type_style_index_0_scoped_true_lang = "";
389
+ var staticRenderFns$a = [];
390
+ const popup_vue_vue_type_style_index_0_scoped_true_lang$2 = "";
369
391
  function normalizeComponent(scriptExports, render2, staticRenderFns2, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
370
392
  var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
371
393
  if (render2) {
@@ -422,34 +444,281 @@ function normalizeComponent(scriptExports, render2, staticRenderFns2, functional
422
444
  options
423
445
  };
424
446
  }
425
- const __cssModules$6 = {};
426
- var __component__$6 = /* @__PURE__ */ normalizeComponent(
447
+ const __cssModules$a = {};
448
+ var __component__$a = /* @__PURE__ */ normalizeComponent(
449
+ AgreementPopup$1,
450
+ render$a,
451
+ staticRenderFns$a,
452
+ false,
453
+ __vue2_injectStyles$a,
454
+ "1e3531b1",
455
+ null,
456
+ null
457
+ );
458
+ function __vue2_injectStyles$a(context) {
459
+ for (let o in __cssModules$a) {
460
+ this[o] = __cssModules$a[o];
461
+ }
462
+ }
463
+ const AgreementPopup2 = /* @__PURE__ */ function() {
464
+ return __component__$a.exports;
465
+ }();
466
+ var __defProp$9 = Object.defineProperty;
467
+ var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
468
+ var __decorateClass$9 = (decorators, target, key, kind) => {
469
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$9(target, key) : target;
470
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
471
+ if (decorator = decorators[i])
472
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
473
+ if (kind && result)
474
+ __defProp$9(target, key, result);
475
+ return result;
476
+ };
477
+ let Agreement$1 = class Agreement extends Vue {
478
+ constructor() {
479
+ super(...arguments);
480
+ __publicField(this, "value");
481
+ __publicField(this, "config");
482
+ // 同意协议本地标识
483
+ __publicField(this, "agreeProtocolFlag", "__isAgreeProtocol__");
484
+ // 是否同意协议
485
+ __publicField(this, "agree", false);
486
+ // 是否展示协议
487
+ __publicField(this, "show", false);
488
+ }
489
+ // 初始化时赋值内部状态
490
+ mounted() {
491
+ this.agree = Boolean(localStorage.getItem(this.agreeProtocolFlag) || false);
492
+ }
493
+ onOpen(n) {
494
+ this.$emit("input", n);
495
+ if (n) {
496
+ localStorage.setItem(this.agreeProtocolFlag, "true");
497
+ } else {
498
+ localStorage.removeItem(this.agreeProtocolFlag);
499
+ }
500
+ }
501
+ onValue(n) {
502
+ this.agree = n;
503
+ }
504
+ // 展示协议
505
+ openProtocol() {
506
+ this.show = true;
507
+ }
508
+ // 不同意协议
509
+ disagree() {
510
+ console.log("不同意协议");
511
+ this.agree = false;
512
+ this.show = false;
513
+ }
514
+ // 同意协议
515
+ agreeProtocol() {
516
+ this.agree = true;
517
+ this.show = false;
518
+ }
519
+ // 同意并支付
520
+ agreeProtocolAndPay() {
521
+ this.agreeProtocol();
522
+ this.$nextTick(() => {
523
+ this.$emit("pay");
524
+ });
525
+ }
526
+ };
527
+ __decorateClass$9([
528
+ Prop({ default: false })
529
+ ], Agreement$1.prototype, "value", 2);
530
+ __decorateClass$9([
531
+ Inject()
532
+ ], Agreement$1.prototype, "config", 2);
533
+ __decorateClass$9([
534
+ Watch("agree")
535
+ ], Agreement$1.prototype, "onOpen", 1);
536
+ __decorateClass$9([
537
+ Watch("value")
538
+ ], Agreement$1.prototype, "onValue", 1);
539
+ Agreement$1 = __decorateClass$9([
540
+ Component({
541
+ components: {
542
+ AgreementPopup: AgreementPopup2
543
+ }
544
+ })
545
+ ], Agreement$1);
546
+ var render$9 = function() {
547
+ var _vm = this;
548
+ var _h = _vm.$createElement;
549
+ var _c = _vm._self._c || _h;
550
+ return _c("div", {
551
+ staticClass: "agreement"
552
+ }, [_c("van-checkbox", {
553
+ attrs: {
554
+ "checked-color": _vm.config.theme,
555
+ "icon-size": "12"
556
+ },
557
+ model: {
558
+ value: _vm.agree,
559
+ callback: function($$v) {
560
+ _vm.agree = $$v;
561
+ },
562
+ expression: "agree"
563
+ }
564
+ }, [_vm._v(" 阅读并同意 "), _c("span", {
565
+ style: {
566
+ color: _vm.config.theme
567
+ },
568
+ on: {
569
+ "click": function($event) {
570
+ $event.stopPropagation();
571
+ return _vm.openProtocol.apply(null, arguments);
572
+ }
573
+ }
574
+ }, [_vm._v("充值协议")])]), _c("AgreementPopup", {
575
+ on: {
576
+ "disagree": _vm.disagree,
577
+ "agreeProtocolAndPay": _vm.agreeProtocolAndPay
578
+ },
579
+ model: {
580
+ value: _vm.show,
581
+ callback: function($$v) {
582
+ _vm.show = $$v;
583
+ },
584
+ expression: "show"
585
+ }
586
+ })], 1);
587
+ };
588
+ var staticRenderFns$9 = [];
589
+ const agreement_vue_vue_type_style_index_0_scoped_true_lang = "";
590
+ const __cssModules$9 = {};
591
+ var __component__$9 = /* @__PURE__ */ normalizeComponent(
592
+ Agreement$1,
593
+ render$9,
594
+ staticRenderFns$9,
595
+ false,
596
+ __vue2_injectStyles$9,
597
+ "017a359d",
598
+ null,
599
+ null
600
+ );
601
+ function __vue2_injectStyles$9(context) {
602
+ for (let o in __cssModules$9) {
603
+ this[o] = __cssModules$9[o];
604
+ }
605
+ }
606
+ const Agreement2 = /* @__PURE__ */ function() {
607
+ return __component__$9.exports;
608
+ }();
609
+ const getPayMoney = async (url, key) => {
610
+ const data = await request(url);
611
+ if (!(key in data)) {
612
+ fail(JSON.stringify(data) || "解析数据异常", `余额数据中不存在 ${key}`);
613
+ return 0;
614
+ }
615
+ return data[key];
616
+ };
617
+ var __defProp$8 = Object.defineProperty;
618
+ var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
619
+ var __decorateClass$8 = (decorators, target, key, kind) => {
620
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target;
621
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
622
+ if (decorator = decorators[i])
623
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
624
+ if (kind && result)
625
+ __defProp$8(target, key, result);
626
+ return result;
627
+ };
628
+ let PayError$1 = class PayError extends Vue$1 {
629
+ constructor() {
630
+ super(...arguments);
631
+ __publicField(this, "load");
632
+ __publicField(this, "loading", true);
633
+ __publicField(this, "message", "");
634
+ }
635
+ get showLoading() {
636
+ return this.loading || this.message;
637
+ }
638
+ async mounted() {
639
+ await this.retry();
640
+ }
641
+ test() {
642
+ this.loading = true;
643
+ setTimeout(() => {
644
+ this.loading = false;
645
+ }, 100);
646
+ }
647
+ async retry() {
648
+ this.message = "";
649
+ this.loading = true;
650
+ const res = await this.load().finally(() => {
651
+ this.loading = false;
652
+ }).catch((message) => {
653
+ this.message = message;
654
+ });
655
+ if (res != void 0) {
656
+ this.$emit("done", res);
657
+ }
658
+ }
659
+ };
660
+ __decorateClass$8([
661
+ Prop()
662
+ ], PayError$1.prototype, "load", 2);
663
+ PayError$1 = __decorateClass$8([
664
+ Component$1
665
+ ], PayError$1);
666
+ var render$8 = function() {
667
+ var _vm = this;
668
+ var _h = _vm.$createElement;
669
+ var _c = _vm._self._c || _h;
670
+ return _c("div", {
671
+ staticClass: "pay-error-container"
672
+ }, [_c("div", {
673
+ staticClass: "loading",
674
+ style: {
675
+ display: _vm.showLoading ? "flex" : "none"
676
+ }
677
+ }, [_vm.message ? _c("van-tag", {
678
+ attrs: {
679
+ "type": "danger"
680
+ },
681
+ on: {
682
+ "click": _vm.retry
683
+ }
684
+ }, [_vm._v(" " + _vm._s(_vm.message) + " 点击重试 ")]) : _c("van-loading", {
685
+ staticClass: "loading-icon",
686
+ attrs: {
687
+ "size": "20",
688
+ "type": "spinner"
689
+ }
690
+ })], 1), _vm._t("default")], 2);
691
+ };
692
+ var staticRenderFns$8 = [];
693
+ const payError_vue_vue_type_style_index_0_scoped_true_lang = "";
694
+ const __cssModules$8 = {};
695
+ var __component__$8 = /* @__PURE__ */ normalizeComponent(
427
696
  PayError$1,
428
- render$6,
429
- staticRenderFns$6,
697
+ render$8,
698
+ staticRenderFns$8,
430
699
  false,
431
- __vue2_injectStyles$6,
700
+ __vue2_injectStyles$8,
432
701
  "0817c014",
433
702
  null,
434
703
  null
435
704
  );
436
- function __vue2_injectStyles$6(context) {
437
- for (let o in __cssModules$6) {
438
- this[o] = __cssModules$6[o];
705
+ function __vue2_injectStyles$8(context) {
706
+ for (let o in __cssModules$8) {
707
+ this[o] = __cssModules$8[o];
439
708
  }
440
709
  }
441
710
  const PayError2 = /* @__PURE__ */ function() {
442
- return __component__$6.exports;
711
+ return __component__$8.exports;
443
712
  }();
444
- var __defProp$5 = Object.defineProperty;
445
- var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
446
- var __decorateClass$5 = (decorators, target, key, kind) => {
447
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key) : target;
713
+ var __defProp$7 = Object.defineProperty;
714
+ var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
715
+ var __decorateClass$7 = (decorators, target, key, kind) => {
716
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target;
448
717
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
449
718
  if (decorator = decorators[i])
450
719
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
451
720
  if (kind && result)
452
- __defProp$5(target, key, result);
721
+ __defProp$7(target, key, result);
453
722
  return result;
454
723
  };
455
724
  let Balance$1 = class Balance extends Vue {
@@ -470,15 +739,15 @@ let Balance$1 = class Balance extends Vue {
470
739
  this.$emit("change", money);
471
740
  }
472
741
  };
473
- __decorateClass$5([
742
+ __decorateClass$7([
474
743
  Inject()
475
744
  ], Balance$1.prototype, "config", 2);
476
- Balance$1 = __decorateClass$5([
477
- Component({
745
+ Balance$1 = __decorateClass$7([
746
+ Component$1({
478
747
  components: { PayError: PayError2 }
479
748
  })
480
749
  ], Balance$1);
481
- var render$5 = function() {
750
+ var render$7 = function() {
482
751
  var _vm = this;
483
752
  var _h = _vm.$createElement;
484
753
  var _c = _vm._self._c || _h;
@@ -493,26 +762,26 @@ var render$5 = function() {
493
762
  }
494
763
  }, [_c("h1", [_vm._v(" " + _vm._s(_vm.value) + " ")])])], 1);
495
764
  };
496
- var staticRenderFns$5 = [];
765
+ var staticRenderFns$7 = [];
497
766
  const balance_vue_vue_type_style_index_0_scoped_true_lang = "";
498
- const __cssModules$5 = {};
499
- var __component__$5 = /* @__PURE__ */ normalizeComponent(
767
+ const __cssModules$7 = {};
768
+ var __component__$7 = /* @__PURE__ */ normalizeComponent(
500
769
  Balance$1,
501
- render$5,
502
- staticRenderFns$5,
770
+ render$7,
771
+ staticRenderFns$7,
503
772
  false,
504
- __vue2_injectStyles$5,
773
+ __vue2_injectStyles$7,
505
774
  "20b4bf5f",
506
775
  null,
507
776
  null
508
777
  );
509
- function __vue2_injectStyles$5(context) {
510
- for (let o in __cssModules$5) {
511
- this[o] = __cssModules$5[o];
778
+ function __vue2_injectStyles$7(context) {
779
+ for (let o in __cssModules$7) {
780
+ this[o] = __cssModules$7[o];
512
781
  }
513
782
  }
514
783
  const Balance2 = /* @__PURE__ */ function() {
515
- return __component__$5.exports;
784
+ return __component__$7.exports;
516
785
  }();
517
786
  const getPayChannels = async (url, ignores) => {
518
787
  const list = await request(url);
@@ -549,15 +818,15 @@ function getChannelType(name) {
549
818
  }
550
819
  return "unknow";
551
820
  }
552
- var __defProp$4 = Object.defineProperty;
553
- var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
554
- var __decorateClass$4 = (decorators, target, key, kind) => {
555
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key) : target;
821
+ var __defProp$6 = Object.defineProperty;
822
+ var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
823
+ var __decorateClass$6 = (decorators, target, key, kind) => {
824
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key) : target;
556
825
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
557
826
  if (decorator = decorators[i])
558
827
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
559
828
  if (kind && result)
560
- __defProp$4(target, key, result);
829
+ __defProp$6(target, key, result);
561
830
  return result;
562
831
  };
563
832
  let Channels$1 = class Channels extends Vue {
@@ -607,17 +876,17 @@ let Channels$1 = class Channels extends Vue {
607
876
  this.$emit("change", this.channels[0]);
608
877
  }
609
878
  };
610
- __decorateClass$4([
879
+ __decorateClass$6([
611
880
  Inject()
612
881
  ], Channels$1.prototype, "config", 2);
613
- Channels$1 = __decorateClass$4([
614
- Component$1({
882
+ Channels$1 = __decorateClass$6([
883
+ Component({
615
884
  components: {
616
885
  PayError: PayError2
617
886
  }
618
887
  })
619
888
  ], Channels$1);
620
- var render$4 = function() {
889
+ var render$6 = function() {
621
890
  var _vm = this;
622
891
  var _h = _vm.$createElement;
623
892
  var _c = _vm._self._c || _h;
@@ -660,16 +929,280 @@ var render$4 = function() {
660
929
  }
661
930
  });
662
931
  };
663
- var staticRenderFns$4 = [];
932
+ var staticRenderFns$6 = [];
664
933
  const channelContainer_vue_vue_type_style_index_0_scoped_true_lang = "";
934
+ const __cssModules$6 = {};
935
+ var __component__$6 = /* @__PURE__ */ normalizeComponent(
936
+ Channels$1,
937
+ render$6,
938
+ staticRenderFns$6,
939
+ false,
940
+ __vue2_injectStyles$6,
941
+ "70746494",
942
+ null,
943
+ null
944
+ );
945
+ function __vue2_injectStyles$6(context) {
946
+ for (let o in __cssModules$6) {
947
+ this[o] = __cssModules$6[o];
948
+ }
949
+ }
950
+ const Channels2 = /* @__PURE__ */ function() {
951
+ return __component__$6.exports;
952
+ }();
953
+ const getIdentity = async (url) => {
954
+ const info = {
955
+ status: false,
956
+ name: ""
957
+ };
958
+ const { RealName } = await request(url);
959
+ if (RealName == void 0) {
960
+ throw new Error(`不存在实名信息`);
961
+ }
962
+ if (RealName == "") {
963
+ return info;
964
+ }
965
+ info.name = RealName;
966
+ info.status = true;
967
+ return info;
968
+ };
969
+ const setIdentity = async (url, data) => {
970
+ const { Message, Status } = await request(url, data);
971
+ if (!Status) {
972
+ throw new Error(Message);
973
+ }
974
+ return true;
975
+ };
976
+ var __defProp$5 = Object.defineProperty;
977
+ var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
978
+ var __decorateClass$5 = (decorators, target, key, kind) => {
979
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key) : target;
980
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
981
+ if (decorator = decorators[i])
982
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
983
+ if (kind && result)
984
+ __defProp$5(target, key, result);
985
+ return result;
986
+ };
987
+ let Identity$2 = class Identity extends Vue {
988
+ constructor() {
989
+ super(...arguments);
990
+ __publicField(this, "config");
991
+ // 姓名
992
+ __publicField(this, "name", "");
993
+ // 身份证
994
+ __publicField(this, "id", "");
995
+ // 认证状态
996
+ __publicField(this, "status", false);
997
+ }
998
+ // 请求参数
999
+ get params() {
1000
+ return {
1001
+ RealName: this.name,
1002
+ IdCard: this.id
1003
+ };
1004
+ }
1005
+ async onSubmit() {
1006
+ const result = await setIdentity(this.config.identity.auth, this.params).catch(
1007
+ (message) => {
1008
+ Dialog({
1009
+ title: "认证失败",
1010
+ message
1011
+ });
1012
+ }
1013
+ );
1014
+ if (result) {
1015
+ this.$emit("done", this.params);
1016
+ }
1017
+ }
1018
+ };
1019
+ __decorateClass$5([
1020
+ Inject()
1021
+ ], Identity$2.prototype, "config", 2);
1022
+ Identity$2 = __decorateClass$5([
1023
+ Component
1024
+ ], Identity$2);
1025
+ var render$5 = function() {
1026
+ var _vm = this;
1027
+ var _h = _vm.$createElement;
1028
+ var _c = _vm._self._c || _h;
1029
+ return _c("van-form", {
1030
+ on: {
1031
+ "submit": _vm.onSubmit
1032
+ }
1033
+ }, [_c("van-field", {
1034
+ attrs: {
1035
+ "name": "姓名",
1036
+ "label": "姓名",
1037
+ "placeholder": "姓名",
1038
+ "rules": [{
1039
+ required: true,
1040
+ message: "请填写姓名"
1041
+ }]
1042
+ },
1043
+ model: {
1044
+ value: _vm.name,
1045
+ callback: function($$v) {
1046
+ _vm.name = $$v;
1047
+ },
1048
+ expression: "name"
1049
+ }
1050
+ }), _c("van-field", {
1051
+ attrs: {
1052
+ "name": "身份证号码",
1053
+ "label": "身份证号码",
1054
+ "placeholder": "身份证号码",
1055
+ "rules": [{
1056
+ required: true,
1057
+ message: "请填写身份证号码"
1058
+ }]
1059
+ },
1060
+ model: {
1061
+ value: _vm.id,
1062
+ callback: function($$v) {
1063
+ _vm.id = $$v;
1064
+ },
1065
+ expression: "id"
1066
+ }
1067
+ }), _c("div", {
1068
+ staticStyle: {
1069
+ "margin": "16px"
1070
+ }
1071
+ }, [_c("van-button", {
1072
+ attrs: {
1073
+ "block": "",
1074
+ "color": _vm.config.theme,
1075
+ "native-type": "submit"
1076
+ }
1077
+ }, [_vm._v("认证")])], 1)], 1);
1078
+ };
1079
+ var staticRenderFns$5 = [];
1080
+ const __cssModules$5 = {};
1081
+ var __component__$5 = /* @__PURE__ */ normalizeComponent(
1082
+ Identity$2,
1083
+ render$5,
1084
+ staticRenderFns$5,
1085
+ false,
1086
+ __vue2_injectStyles$5,
1087
+ null,
1088
+ null,
1089
+ null
1090
+ );
1091
+ function __vue2_injectStyles$5(context) {
1092
+ for (let o in __cssModules$5) {
1093
+ this[o] = __cssModules$5[o];
1094
+ }
1095
+ }
1096
+ const Identity$1 = /* @__PURE__ */ function() {
1097
+ return __component__$5.exports;
1098
+ }();
1099
+ var __defProp$4 = Object.defineProperty;
1100
+ var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
1101
+ var __decorateClass$4 = (decorators, target, key, kind) => {
1102
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key) : target;
1103
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
1104
+ if (decorator = decorators[i])
1105
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1106
+ if (kind && result)
1107
+ __defProp$4(target, key, result);
1108
+ return result;
1109
+ };
1110
+ let IdentityPopup = class extends Vue {
1111
+ constructor() {
1112
+ super(...arguments);
1113
+ __publicField(this, "config");
1114
+ __publicField(this, "showPopup", false);
1115
+ __publicField(this, "info", {
1116
+ status: false,
1117
+ name: ""
1118
+ });
1119
+ }
1120
+ get text() {
1121
+ if (this.info.status) {
1122
+ return `已实名 ${this.info.name}`;
1123
+ }
1124
+ return `未实名 点击进行实名认证`;
1125
+ }
1126
+ load() {
1127
+ return getIdentity(this.config.identity.api);
1128
+ }
1129
+ done(data) {
1130
+ Object.assign(this.info, data);
1131
+ this.$emit("onIdentity", data);
1132
+ }
1133
+ openPopup() {
1134
+ if (!this.info.status) {
1135
+ this.showPopup = true;
1136
+ }
1137
+ }
1138
+ authDone(data) {
1139
+ this.showPopup = false;
1140
+ this.done({
1141
+ status: true,
1142
+ name: data.RealName
1143
+ });
1144
+ }
1145
+ };
1146
+ __decorateClass$4([
1147
+ Inject()
1148
+ ], IdentityPopup.prototype, "config", 2);
1149
+ IdentityPopup = __decorateClass$4([
1150
+ Component({
1151
+ components: {
1152
+ PayError: PayError2,
1153
+ Identity: Identity$1
1154
+ }
1155
+ })
1156
+ ], IdentityPopup);
1157
+ var render$4 = function() {
1158
+ var _vm = this;
1159
+ var _h = _vm.$createElement;
1160
+ var _c = _vm._self._c || _h;
1161
+ return _c("PayError", {
1162
+ attrs: {
1163
+ "load": _vm.load
1164
+ },
1165
+ on: {
1166
+ "done": _vm.done
1167
+ }
1168
+ }, [_c("van-notice-bar", {
1169
+ staticClass: "identity",
1170
+ attrs: {
1171
+ "left-icon": "user-circle-o",
1172
+ "text": _vm.text
1173
+ },
1174
+ on: {
1175
+ "click": _vm.openPopup
1176
+ }
1177
+ }), _c("van-popup", {
1178
+ attrs: {
1179
+ "position": "bottom",
1180
+ "overlay": "",
1181
+ "round": ""
1182
+ },
1183
+ model: {
1184
+ value: _vm.showPopup,
1185
+ callback: function($$v) {
1186
+ _vm.showPopup = $$v;
1187
+ },
1188
+ expression: "showPopup"
1189
+ }
1190
+ }, [_c("Identity", {
1191
+ on: {
1192
+ "done": _vm.authDone
1193
+ }
1194
+ })], 1)], 1);
1195
+ };
1196
+ var staticRenderFns$4 = [];
1197
+ const popup_vue_vue_type_style_index_0_scoped_true_lang$1 = "";
665
1198
  const __cssModules$4 = {};
666
1199
  var __component__$4 = /* @__PURE__ */ normalizeComponent(
667
- Channels$1,
1200
+ IdentityPopup,
668
1201
  render$4,
669
1202
  staticRenderFns$4,
670
1203
  false,
671
1204
  __vue2_injectStyles$4,
672
- "70746494",
1205
+ "5f9eb7e3",
673
1206
  null,
674
1207
  null
675
1208
  );
@@ -678,7 +1211,7 @@ function __vue2_injectStyles$4(context) {
678
1211
  this[o] = __cssModules$4[o];
679
1212
  }
680
1213
  }
681
- const Channels2 = /* @__PURE__ */ function() {
1214
+ const Identity2 = /* @__PURE__ */ function() {
682
1215
  return __component__$4.exports;
683
1216
  }();
684
1217
  var __defProp$3 = Object.defineProperty;
@@ -706,7 +1239,7 @@ __decorateClass$3([
706
1239
  Prop({ default: null })
707
1240
  ], PriceCustom$1.prototype, "customPrice", 2);
708
1241
  PriceCustom$1 = __decorateClass$3([
709
- Component$1
1242
+ Component
710
1243
  ], PriceCustom$1);
711
1244
  var render$3 = function() {
712
1245
  var _vm = this;
@@ -742,7 +1275,7 @@ var __component__$3 = /* @__PURE__ */ normalizeComponent(
742
1275
  staticRenderFns$3,
743
1276
  false,
744
1277
  __vue2_injectStyles$3,
745
- "ea027830",
1278
+ "05e06290",
746
1279
  null,
747
1280
  null
748
1281
  );
@@ -782,7 +1315,7 @@ __decorateClass$2([
782
1315
  Prop({ default: {} })
783
1316
  ], PriceItem$1.prototype, "price", 2);
784
1317
  PriceItem$1 = __decorateClass$2([
785
- Component$1
1318
+ Component
786
1319
  ], PriceItem$1);
787
1320
  var render$2 = function() {
788
1321
  var _vm = this;
@@ -884,7 +1417,7 @@ __decorateClass$1([
884
1417
  Watch("customPrice")
885
1418
  ], PriceContainer$1.prototype, "onCustomPriceChange", 1);
886
1419
  PriceContainer$1 = __decorateClass$1([
887
- Component$1({
1420
+ Component({
888
1421
  components: {
889
1422
  PriceItem: PriceItem2,
890
1423
  PayError: PayError2,
@@ -945,7 +1478,7 @@ var __component__$1 = /* @__PURE__ */ normalizeComponent(
945
1478
  staticRenderFns$1,
946
1479
  false,
947
1480
  __vue2_injectStyles$1,
948
- "737beb57",
1481
+ "a6f45494",
949
1482
  null,
950
1483
  null
951
1484
  );
@@ -973,6 +1506,8 @@ let PayPopup$1 = class PayPopup extends Vue {
973
1506
  super(...arguments);
974
1507
  __publicField(this, "config");
975
1508
  __publicField(this, "id");
1509
+ // 是否同意支付协议
1510
+ __publicField(this, "isAgreeProtocol", false);
976
1511
  // 默认主题
977
1512
  __publicField(this, "baseTheme", BaseTheme);
978
1513
  // 弹出层是否显示
@@ -992,7 +1527,9 @@ let PayPopup$1 = class PayPopup extends Vue {
992
1527
  // 价目表
993
1528
  price: false,
994
1529
  // 渠道
995
- channel: false
1530
+ channel: false,
1531
+ // 实名信息
1532
+ identity: false
996
1533
  });
997
1534
  }
998
1535
  async mounted() {
@@ -1005,6 +1542,7 @@ let PayPopup$1 = class PayPopup extends Vue {
1005
1542
  initLoad() {
1006
1543
  this.loading.balance = this.config.balance.disabled;
1007
1544
  this.loading.price = this.config.price.disabled;
1545
+ this.loading.identity = this.config.identity.disable;
1008
1546
  }
1009
1547
  // 关闭弹出层
1010
1548
  onClose() {
@@ -1014,8 +1552,16 @@ let PayPopup$1 = class PayPopup extends Vue {
1014
1552
  onClosed() {
1015
1553
  this.$emit("onClosed");
1016
1554
  }
1555
+ // 隐私协议组件
1556
+ get agreementRef() {
1557
+ return this.$refs.agreementRef;
1558
+ }
1017
1559
  // 点击充值
1018
1560
  async onTopup() {
1561
+ if (!this.isAgreeProtocol) {
1562
+ this.agreementRef.openProtocol();
1563
+ return;
1564
+ }
1019
1565
  const { key, prefix } = this.config.pay;
1020
1566
  const value = String(this.id || this.price.price);
1021
1567
  if (!this.channel) {
@@ -1028,7 +1574,6 @@ let PayPopup$1 = class PayPopup extends Vue {
1028
1574
  value,
1029
1575
  prefix
1030
1576
  });
1031
- this.onClosed();
1032
1577
  }
1033
1578
  /** 余额变动*/
1034
1579
  onBanlanceChange(money) {
@@ -1042,6 +1587,9 @@ let PayPopup$1 = class PayPopup extends Vue {
1042
1587
  this.price = price;
1043
1588
  this.loading.price = true;
1044
1589
  }
1590
+ onIdentityChange(info) {
1591
+ this.loading.identity = info.status;
1592
+ }
1045
1593
  // 计算最终金额
1046
1594
  get finalPrice() {
1047
1595
  return this.price.price / 100;
@@ -1063,14 +1611,16 @@ __decorateClass([
1063
1611
  Prop({ default: void 0 })
1064
1612
  ], PayPopup$1.prototype, "id", 2);
1065
1613
  PayPopup$1 = __decorateClass([
1066
- Component$1({
1614
+ Component({
1067
1615
  components: {
1068
1616
  Balance: Balance2,
1069
1617
  Divider,
1070
1618
  PriceContainer: PriceContainer2,
1071
1619
  Button,
1072
1620
  PriceCustom: PriceCustom2,
1073
- Channels: Channels2
1621
+ Channels: Channels2,
1622
+ Agreement: Agreement2,
1623
+ Identity: Identity2
1074
1624
  }
1075
1625
  })
1076
1626
  ], PayPopup$1);
@@ -1082,7 +1632,7 @@ var render = function() {
1082
1632
  staticClass: "pay-popup",
1083
1633
  attrs: {
1084
1634
  "position": "bottom",
1085
- "overlay": true,
1635
+ "overlay": "",
1086
1636
  "round": ""
1087
1637
  },
1088
1638
  on: {
@@ -1110,7 +1660,23 @@ var render = function() {
1110
1660
  on: {
1111
1661
  "change": _vm.onChannelChange
1112
1662
  }
1113
- }), _c("Divider"), _c("Button", {
1663
+ }), !_vm.config.identity.disable ? [_c("Identity", {
1664
+ on: {
1665
+ "onIdentity": _vm.onIdentityChange
1666
+ }
1667
+ })] : _vm._e(), _c("Agreement", {
1668
+ ref: "agreementRef",
1669
+ on: {
1670
+ "pay": _vm.onTopup
1671
+ },
1672
+ model: {
1673
+ value: _vm.isAgreeProtocol,
1674
+ callback: function($$v) {
1675
+ _vm.isAgreeProtocol = $$v;
1676
+ },
1677
+ expression: "isAgreeProtocol"
1678
+ }
1679
+ }), _c("Button", {
1114
1680
  attrs: {
1115
1681
  "disabled": _vm.disable,
1116
1682
  "color": _vm.config.theme || _vm.baseTheme,
@@ -1130,7 +1696,7 @@ var __component__ = /* @__PURE__ */ normalizeComponent(
1130
1696
  staticRenderFns,
1131
1697
  false,
1132
1698
  __vue2_injectStyles,
1133
- "4ac1c510",
1699
+ "7115f264",
1134
1700
  null,
1135
1701
  null
1136
1702
  );
@@ -1167,9 +1733,9 @@ const plugin = {
1167
1733
  instance.$on("onClosed", () => {
1168
1734
  res();
1169
1735
  setTimeout(() => {
1170
- var _a2;
1736
+ var _a;
1171
1737
  instance.$destroy();
1172
- (_a2 = instance.$el.parentNode) == null ? void 0 : _a2.removeChild(instance.$el);
1738
+ (_a = instance.$el.parentNode) == null ? void 0 : _a.removeChild(instance.$el);
1173
1739
  }, 300);
1174
1740
  });
1175
1741
  instance.$mount();