@pisell/private-materials 6.6.61 → 6.6.63

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.
Files changed (203) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +9 -9
  11. package/es/components/booking/components/footer/amount.js +4 -3
  12. package/es/components/booking/components/footer/utils.js +10 -3
  13. package/es/components/booking/components/voucher/index.js +1 -1
  14. package/es/components/booking/info2/service/editService/index.js +76 -8
  15. package/es/components/booking/info2/service/editService/utils.d.ts +1 -0
  16. package/es/components/booking/info2/service/editService/utils.js +16 -0
  17. package/es/components/booking/payments/index.js +1 -1
  18. package/es/components/eftpos/PairModal/hooks.d.ts +27 -0
  19. package/es/components/eftpos/PairModal/hooks.js +67 -0
  20. package/es/components/eftpos/PairModal/index.d.ts +11 -0
  21. package/es/components/eftpos/PairModal/index.js +246 -0
  22. package/es/components/eftpos/PairModal/index.less +70 -0
  23. package/es/components/eftpos/SettlementModal/Action.d.ts +7 -0
  24. package/es/components/eftpos/SettlementModal/Action.js +141 -0
  25. package/es/components/eftpos/SettlementModal/index.d.ts +7 -0
  26. package/es/components/eftpos/SettlementModal/index.js +135 -0
  27. package/es/components/eftpos/SettlementModal/index.less +33 -0
  28. package/es/components/eftpos/SettlementModal/serve.d.ts +8 -0
  29. package/es/components/eftpos/SettlementModal/serve.js +171 -0
  30. package/es/components/eftpos/SettlementModal/types.d.ts +138 -0
  31. package/es/components/eftpos/SettlementModal/types.js +35 -0
  32. package/es/components/eftpos/SettlementModal/utils.d.ts +18 -0
  33. package/es/components/eftpos/SettlementModal/utils.js +351 -0
  34. package/es/components/eftpos/assets/mx51SCI.svg +15 -0
  35. package/es/components/eftpos/const.d.ts +3 -1
  36. package/es/components/eftpos/const.js +2 -0
  37. package/es/components/eftpos/device.d.ts +3 -1
  38. package/es/components/eftpos/device.js +14 -3
  39. package/es/components/eftpos/hooks.d.ts +13 -0
  40. package/es/components/eftpos/hooks.js +35 -0
  41. package/es/components/eftpos/index.js +198 -24
  42. package/es/components/eftpos/index.less +32 -1
  43. package/es/components/eftpos/locales.d.ts +80 -0
  44. package/es/components/eftpos/locales.js +205 -25
  45. package/es/components/eftpos/table.js +47 -3
  46. package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +2 -2
  47. package/es/components/eftposPay/aggregatePayment/hooks/usePayment.d.ts +8 -0
  48. package/es/components/eftposPay/aggregatePayment/hooks/usePayment.js +145 -0
  49. package/es/components/eftposPay/aggregatePayment/index.d.ts +2 -1
  50. package/es/components/eftposPay/aggregatePayment/index.js +2 -1
  51. package/es/components/eftposPay/aggregatePayment/mock.d.ts +495 -0
  52. package/es/components/eftposPay/aggregatePayment/mock.js +567 -0
  53. package/es/components/eftposPay/aggregatePayment/service.js +1 -0
  54. package/es/components/eftposPay/aggregatePayment/types.d.ts +12 -12
  55. package/es/components/eftposPay/aggregatePayment/types.js +4 -8
  56. package/es/components/eftposPay/aggregatePayment/utils/payment.d.ts +13 -13
  57. package/es/components/eftposPay/aggregatePayment/utils/payment.js +231 -168
  58. package/es/components/eftposPay/amount.js +15 -1
  59. package/es/components/eftposPay/app.js +2 -3
  60. package/es/components/eftposPay/component/fail/failCustom.js +13 -4
  61. package/es/components/eftposPay/component/fail/index.js +12 -5
  62. package/es/components/eftposPay/component/fail/network.js +3 -0
  63. package/es/components/eftposPay/component/fail/unknow.js +8 -0
  64. package/es/components/eftposPay/component/manual/index.js +17 -3
  65. package/es/components/eftposPay/component/signature/index.js +3 -0
  66. package/es/components/eftposPay/const.d.ts +8 -3
  67. package/es/components/eftposPay/const.js +2 -0
  68. package/es/components/eftposPay/device.js +225 -38
  69. package/es/components/eftposPay/helper.d.ts +3 -0
  70. package/es/components/eftposPay/helper.js +2 -1
  71. package/es/components/eftposPay/hooks.d.ts +1 -1
  72. package/es/components/eftposPay/index.js +50 -13
  73. package/es/components/eftposPay/linkly/const.js +1 -1
  74. package/es/components/eftposPay/linkly/hooks/normal.js +21 -68
  75. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +20 -81
  76. package/es/components/eftposPay/linkly/index.js +11 -23
  77. package/es/components/eftposPay/locales.d.ts +15 -0
  78. package/es/components/eftposPay/locales.js +30 -15
  79. package/es/components/eftposPay/manufacturer.d.ts +1 -0
  80. package/es/components/eftposPay/manufacturer.js +4 -0
  81. package/es/components/eftposPay/mx51/Action.d.ts +6 -0
  82. package/es/components/eftposPay/mx51/Action.js +144 -0
  83. package/es/components/eftposPay/mx51/const.d.ts +5 -0
  84. package/es/components/eftposPay/mx51/const.js +69 -0
  85. package/es/components/eftposPay/mx51/index.d.ts +6 -0
  86. package/es/components/eftposPay/mx51/index.js +498 -0
  87. package/es/components/eftposPay/mx51/types.d.ts +142 -0
  88. package/es/components/eftposPay/mx51/types.js +35 -0
  89. package/es/components/eftposPay/mx51/utils.d.ts +10 -0
  90. package/es/components/eftposPay/mx51/utils.js +121 -0
  91. package/es/components/eftposPay/pay.js +21 -9
  92. package/es/components/eftposPay/payo/config.js +39 -5
  93. package/es/components/eftposPay/payo/const.js +1 -1
  94. package/es/components/eftposPay/payo/hooks.js +3 -12
  95. package/es/components/eftposPay/payo/payment.js +69 -136
  96. package/es/components/eftposPay/store/index.d.ts +5 -9
  97. package/es/components/eftposPay/tip.js +5 -0
  98. package/es/components/eftposPay/tyro/const.js +1 -1
  99. package/es/components/eftposPay/tyro/index.js +44 -11
  100. package/es/components/eftposPay/utils/payLog.d.ts +81 -0
  101. package/es/components/eftposPay/utils/payLog.js +458 -0
  102. package/es/components/eftposPay/windcave/const.js +1 -1
  103. package/es/components/eftposPay/windcave/receiptAction.js +5 -0
  104. package/es/components/eftposPay/windcave/windcave.js +37 -38
  105. package/es/components/ticketBooking/utils/formatProductMessage.js +47 -2
  106. package/lib/components/booking/components/footer/amount.js +3 -3
  107. package/lib/components/booking/components/footer/utils.js +12 -5
  108. package/lib/components/booking/components/voucher/index.js +1 -1
  109. package/lib/components/booking/info2/service/editService/index.js +56 -5
  110. package/lib/components/booking/info2/service/editService/utils.d.ts +1 -0
  111. package/lib/components/booking/info2/service/editService/utils.js +16 -0
  112. package/lib/components/booking/payments/index.js +1 -1
  113. package/lib/components/eftpos/PairModal/hooks.d.ts +27 -0
  114. package/lib/components/eftpos/PairModal/hooks.js +70 -0
  115. package/lib/components/eftpos/PairModal/index.d.ts +11 -0
  116. package/lib/components/eftpos/PairModal/index.js +197 -0
  117. package/lib/components/eftpos/PairModal/index.less +70 -0
  118. package/lib/components/eftpos/SettlementModal/Action.d.ts +7 -0
  119. package/lib/components/eftpos/SettlementModal/Action.js +153 -0
  120. package/lib/components/eftpos/SettlementModal/index.d.ts +7 -0
  121. package/lib/components/eftpos/SettlementModal/index.js +170 -0
  122. package/lib/components/eftpos/SettlementModal/index.less +33 -0
  123. package/lib/components/eftpos/SettlementModal/serve.d.ts +8 -0
  124. package/lib/components/eftpos/SettlementModal/serve.js +45 -0
  125. package/lib/components/eftpos/SettlementModal/types.d.ts +138 -0
  126. package/lib/components/eftpos/SettlementModal/types.js +43 -0
  127. package/lib/components/eftpos/SettlementModal/utils.d.ts +18 -0
  128. package/lib/components/eftpos/SettlementModal/utils.js +248 -0
  129. package/lib/components/eftpos/assets/mx51SCI.svg +15 -0
  130. package/lib/components/eftpos/const.d.ts +3 -1
  131. package/lib/components/eftpos/const.js +2 -0
  132. package/lib/components/eftpos/device.d.ts +3 -1
  133. package/lib/components/eftpos/device.js +13 -3
  134. package/lib/components/eftpos/hooks.d.ts +13 -0
  135. package/lib/components/eftpos/hooks.js +30 -0
  136. package/lib/components/eftpos/index.js +121 -8
  137. package/lib/components/eftpos/index.less +32 -1
  138. package/lib/components/eftpos/locales.d.ts +80 -0
  139. package/lib/components/eftpos/locales.js +231 -21
  140. package/lib/components/eftpos/table.js +30 -2
  141. package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +2 -2
  142. package/lib/components/eftposPay/aggregatePayment/hooks/usePayment.d.ts +8 -0
  143. package/lib/components/eftposPay/aggregatePayment/hooks/usePayment.js +171 -0
  144. package/lib/components/eftposPay/aggregatePayment/index.d.ts +2 -1
  145. package/lib/components/eftposPay/aggregatePayment/index.js +5 -2
  146. package/lib/components/eftposPay/aggregatePayment/mock.d.ts +495 -0
  147. package/lib/components/eftposPay/aggregatePayment/mock.js +679 -0
  148. package/lib/components/eftposPay/aggregatePayment/types.d.ts +12 -12
  149. package/lib/components/eftposPay/aggregatePayment/utils/payment.d.ts +13 -13
  150. package/lib/components/eftposPay/aggregatePayment/utils/payment.js +173 -123
  151. package/lib/components/eftposPay/amount.js +13 -1
  152. package/lib/components/eftposPay/app.js +4 -5
  153. package/lib/components/eftposPay/component/fail/failCustom.js +10 -2
  154. package/lib/components/eftposPay/component/fail/index.js +10 -2
  155. package/lib/components/eftposPay/component/fail/network.js +3 -0
  156. package/lib/components/eftposPay/component/fail/unknow.js +8 -0
  157. package/lib/components/eftposPay/component/manual/index.js +16 -2
  158. package/lib/components/eftposPay/component/signature/index.js +3 -0
  159. package/lib/components/eftposPay/const.d.ts +8 -3
  160. package/lib/components/eftposPay/const.js +2 -0
  161. package/lib/components/eftposPay/device.js +114 -25
  162. package/lib/components/eftposPay/helper.d.ts +3 -0
  163. package/lib/components/eftposPay/helper.js +2 -1
  164. package/lib/components/eftposPay/hooks.d.ts +1 -1
  165. package/lib/components/eftposPay/index.js +38 -13
  166. package/lib/components/eftposPay/linkly/const.js +1 -1
  167. package/lib/components/eftposPay/linkly/hooks/normal.js +22 -43
  168. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +13 -65
  169. package/lib/components/eftposPay/linkly/index.js +8 -10
  170. package/lib/components/eftposPay/locales.d.ts +15 -0
  171. package/lib/components/eftposPay/locales.js +30 -15
  172. package/lib/components/eftposPay/manufacturer.d.ts +1 -0
  173. package/lib/components/eftposPay/manufacturer.js +6 -0
  174. package/lib/components/eftposPay/mx51/Action.d.ts +6 -0
  175. package/lib/components/eftposPay/mx51/Action.js +154 -0
  176. package/lib/components/eftposPay/mx51/const.d.ts +5 -0
  177. package/lib/components/eftposPay/mx51/const.js +85 -0
  178. package/lib/components/eftposPay/mx51/index.d.ts +6 -0
  179. package/lib/components/eftposPay/mx51/index.js +433 -0
  180. package/lib/components/eftposPay/mx51/types.d.ts +142 -0
  181. package/lib/components/eftposPay/mx51/types.js +43 -0
  182. package/lib/components/eftposPay/mx51/utils.d.ts +10 -0
  183. package/lib/components/eftposPay/mx51/utils.js +115 -0
  184. package/lib/components/eftposPay/pay.js +13 -3
  185. package/lib/components/eftposPay/payo/config.js +16 -8
  186. package/lib/components/eftposPay/payo/const.js +1 -1
  187. package/lib/components/eftposPay/payo/hooks.js +12 -10
  188. package/lib/components/eftposPay/payo/payment.js +31 -65
  189. package/lib/components/eftposPay/store/index.d.ts +5 -9
  190. package/lib/components/eftposPay/tip.js +5 -0
  191. package/lib/components/eftposPay/tyro/const.js +1 -1
  192. package/lib/components/eftposPay/tyro/index.js +21 -17
  193. package/lib/components/eftposPay/utils/payLog.d.ts +81 -0
  194. package/lib/components/eftposPay/utils/payLog.js +321 -0
  195. package/lib/components/eftposPay/windcave/const.js +1 -1
  196. package/lib/components/eftposPay/windcave/receiptAction.js +5 -0
  197. package/lib/components/eftposPay/windcave/windcave.js +27 -29
  198. package/lib/components/ticketBooking/utils/formatProductMessage.js +44 -2
  199. package/package.json +4 -4
  200. package/es/components/eftposPay/utils/log/index.d.ts +0 -110
  201. package/es/components/eftposPay/utils/log/index.js +0 -371
  202. package/lib/components/eftposPay/utils/log/index.d.ts +0 -110
  203. package/lib/components/eftposPay/utils/log/index.js +0 -294
@@ -0,0 +1,81 @@
1
+ export interface PayLogContext {
2
+ /** 渠道 */
3
+ channel?: string;
4
+ /** 订单ID */
5
+ orderId?: string | number;
6
+ /** 设备ID */
7
+ deviceId?: string | number;
8
+ /** 支付类型:PAYO / WINDCAVE / LINKLY / TYRO */
9
+ paymentType?: string;
10
+ /** 交易记录号 */
11
+ transactionNumber?: string;
12
+ /** 模式:pay / refund / query */
13
+ mode?: string;
14
+ /** 其他扩展信息 */
15
+ extra?: Record<string, any>;
16
+ }
17
+ declare class PayLog {
18
+ private static instance;
19
+ private sessionKey;
20
+ private context;
21
+ private logs;
22
+ private startTime;
23
+ private flushed;
24
+ private constructor();
25
+ static getInstance(): PayLog;
26
+ /**
27
+ * 初始化一次交易会话
28
+ * - 生成唯一 sessionKey
29
+ * - 恢复上报 localStorage 中残留的旧日志
30
+ * - 接受部分 context(后续可通过 setContext 补充)
31
+ */
32
+ init(context?: Partial<PayLogContext>): void;
33
+ /**
34
+ * 补充/更新上下文信息
35
+ * 新值覆盖旧值,extra 做浅合并
36
+ */
37
+ setContext(partial: Partial<PayLogContext>): void;
38
+ /**
39
+ * 记录一条日志
40
+ */
41
+ log(title: string, data?: any): void;
42
+ /**
43
+ * 上报日志到飞书并清理 localStorage
44
+ */
45
+ flush(customTitle?: string): Promise<void>;
46
+ /**
47
+ * flush + 重置内部状态
48
+ */
49
+ destroy(): void;
50
+ /**
51
+ * 构建 sendWarningLog 所需的 content 数组
52
+ */
53
+ private buildContent;
54
+ /**
55
+ * 持久化当前会话到 localStorage
56
+ */
57
+ private persistToStorage;
58
+ /**
59
+ * 从 localStorage 移除指定 session
60
+ */
61
+ private removeFromStorage;
62
+ /**
63
+ * 获取 localStorage 中所有 session
64
+ */
65
+ private getAllSessions;
66
+ /**
67
+ * 恢复上报 localStorage 中残留的旧日志(崩溃/异常退出场景)
68
+ */
69
+ private recoverOrphanedLogs;
70
+ }
71
+ declare const payLog: PayLog;
72
+ export default payLog;
73
+ /**
74
+ * 在根组件中使用,管理 PayLog 生命周期
75
+ * - mount 时 init(+ 恢复上报残留日志)
76
+ * - unmount 时 flush
77
+ */
78
+ export declare function usePayLog(context?: Partial<PayLogContext>): {
79
+ log: (title: string, data?: any) => void;
80
+ setContext: (partial: Partial<PayLogContext>) => void;
81
+ };
@@ -0,0 +1,458 @@
1
+ var _excluded = ["extra"];
2
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
4
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
5
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
6
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
9
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
10
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
11
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
12
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
13
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
15
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
16
+ import dayjs from 'dayjs';
17
+ import { useEffect, useRef } from 'react';
18
+ import { sendWarningLog } from '@pisell/utils';
19
+
20
+ /** localStorage 持久化 key */
21
+ var STORAGE_KEY = 'pisell2_eftpos_paylog';
22
+
23
+ /** 异常关键词,命中时不压缩 */
24
+ var ERROR_KEYWORDS = ['失败', '错误', '异常', 'error', 'fail', 'timeout', '超时'];
25
+
26
+ // ─── 类型定义 ───
27
+
28
+ /** 压缩后的日志条目 */
29
+
30
+ /** 持久化到 localStorage 的会话结构 */
31
+
32
+ // ─── 工具函数 ───
33
+
34
+ function generateSessionKey() {
35
+ var ts = Date.now();
36
+ var rand = Math.random().toString(36).substring(2, 8);
37
+ return "eft_".concat(ts, "_").concat(rand);
38
+ }
39
+
40
+ /**
41
+ * 判断 title 是否包含异常关键词
42
+ */
43
+ function isErrorLog(title) {
44
+ var lower = title.toLowerCase();
45
+ return ERROR_KEYWORDS.some(function (kw) {
46
+ return lower.includes(kw);
47
+ });
48
+ }
49
+
50
+ /**
51
+ * 浅比较两个值是否"相同"(用于 data 去重)
52
+ */
53
+ function shallowEqual(a, b) {
54
+ if (a === b) return true;
55
+ if (a == null && b == null) return true;
56
+ if (a == null || b == null) return false;
57
+ try {
58
+ return JSON.stringify(a) === JSON.stringify(b);
59
+ } catch (_unused) {
60
+ return false;
61
+ }
62
+ }
63
+
64
+ /**
65
+ * 将原始日志列表压缩:连续同名非异常日志合并
66
+ */
67
+ function compressLogs(logs) {
68
+ if (logs.length === 0) return [];
69
+ var result = [];
70
+ var i = 0;
71
+ while (i < logs.length) {
72
+ var current = logs[i];
73
+ if (isErrorLog(current.t)) {
74
+ result.push({
75
+ t: current.t,
76
+ ts: current.ts,
77
+ d: current.d
78
+ });
79
+ i++;
80
+ continue;
81
+ }
82
+ var j = i + 1;
83
+ while (j < logs.length && logs[j].t === current.t && !isErrorLog(logs[j].t)) {
84
+ j++;
85
+ }
86
+ var count = j - i;
87
+ if (count === 1) {
88
+ result.push({
89
+ t: current.t,
90
+ ts: current.ts,
91
+ d: current.d
92
+ });
93
+ } else {
94
+ var last = logs[j - 1];
95
+ var entry = {
96
+ t: current.t,
97
+ ts: current.ts,
98
+ count: count,
99
+ lastTs: last.ts
100
+ };
101
+ if (current.d !== undefined) entry.d = current.d;
102
+ if (!shallowEqual(current.d, last.d) && last.d !== undefined) {
103
+ entry.lastD = last.d;
104
+ }
105
+ result.push(entry);
106
+ }
107
+ i = j;
108
+ }
109
+ return result;
110
+ }
111
+
112
+ // ─── PayLog 单例类 ───
113
+ var PayLog = /*#__PURE__*/function () {
114
+ function PayLog() {
115
+ _classCallCheck(this, PayLog);
116
+ _defineProperty(this, "sessionKey", null);
117
+ _defineProperty(this, "context", {});
118
+ _defineProperty(this, "logs", []);
119
+ _defineProperty(this, "startTime", 0);
120
+ _defineProperty(this, "flushed", false);
121
+ }
122
+ _createClass(PayLog, [{
123
+ key: "init",
124
+ value:
125
+ /**
126
+ * 初始化一次交易会话
127
+ * - 生成唯一 sessionKey
128
+ * - 恢复上报 localStorage 中残留的旧日志
129
+ * - 接受部分 context(后续可通过 setContext 补充)
130
+ */
131
+ function init(context) {
132
+ try {
133
+ this.recoverOrphanedLogs();
134
+ this.sessionKey = generateSessionKey();
135
+ this.context = context || {};
136
+ this.logs = [];
137
+ this.startTime = Date.now();
138
+ this.flushed = false;
139
+ this.log('PayLog 初始化', context);
140
+ } catch (error) {
141
+ console.error('PayLog init error:', error);
142
+ }
143
+ }
144
+
145
+ /**
146
+ * 补充/更新上下文信息
147
+ * 新值覆盖旧值,extra 做浅合并
148
+ */
149
+ }, {
150
+ key: "setContext",
151
+ value: function setContext(partial) {
152
+ if (!this.sessionKey) return;
153
+ var extra = partial.extra,
154
+ rest = _objectWithoutProperties(partial, _excluded);
155
+ Object.assign(this.context, rest);
156
+ if (extra) {
157
+ var _this$context;
158
+ this.context.extra = _objectSpread(_objectSpread({}, ((_this$context = this.context) === null || _this$context === void 0 ? void 0 : _this$context.extra) || {}), extra || {});
159
+ }
160
+ this.persistToStorage();
161
+ }
162
+
163
+ /**
164
+ * 记录一条日志
165
+ */
166
+ }, {
167
+ key: "log",
168
+ value: function log(title, data) {
169
+ if (!this.sessionKey) {
170
+ console.warn('PayLog: 未初始化,日志将被忽略 -', title);
171
+ return;
172
+ }
173
+ var entry = {
174
+ t: title,
175
+ ts: dayjs().format('HH:mm:ss.SSS')
176
+ };
177
+ if (data !== undefined) {
178
+ entry.d = data;
179
+ }
180
+ this.logs.push(entry);
181
+ this.persistToStorage();
182
+ }
183
+
184
+ /**
185
+ * 上报日志到飞书并清理 localStorage
186
+ */
187
+ }, {
188
+ key: "flush",
189
+ value: (function () {
190
+ var _flush = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(customTitle) {
191
+ var _sessionKey, elapsed, compressed, _this$context2, paymentType, mode, orderId, title, content;
192
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
193
+ while (1) switch (_context.prev = _context.next) {
194
+ case 0:
195
+ if (!(this.flushed || !this.sessionKey)) {
196
+ _context.next = 2;
197
+ break;
198
+ }
199
+ return _context.abrupt("return");
200
+ case 2:
201
+ this.flushed = true;
202
+ _sessionKey = this.sessionKey;
203
+ _context.prev = 4;
204
+ elapsed = ((Date.now() - this.startTime) / 1000).toFixed(1);
205
+ compressed = compressLogs(this.logs);
206
+ _this$context2 = this.context, paymentType = _this$context2.paymentType, mode = _this$context2.mode, orderId = _this$context2.orderId;
207
+ title = customTitle || "[EFTPOS] ".concat(paymentType || 'Unknown', "-").concat(mode || 'unknown', "-").concat(orderId || 'Unknown');
208
+ content = this.buildContent(compressed, elapsed);
209
+ _context.next = 12;
210
+ return sendWarningLog({
211
+ title: title,
212
+ content: content
213
+ });
214
+ case 12:
215
+ this.removeFromStorage(_sessionKey);
216
+ _context.next = 18;
217
+ break;
218
+ case 15:
219
+ _context.prev = 15;
220
+ _context.t0 = _context["catch"](4);
221
+ console.error('PayLog flush error:', _context.t0);
222
+ case 18:
223
+ _context.prev = 18;
224
+ // 无论上报成功与否,清空 sessionKey,防止 flush 后的 log() 调用
225
+ // 将僵尸日志重新写回 localStorage,被下次 init() 误判为孤儿 session
226
+ this.sessionKey = null;
227
+ return _context.finish(18);
228
+ case 21:
229
+ case "end":
230
+ return _context.stop();
231
+ }
232
+ }, _callee, this, [[4, 15, 18, 21]]);
233
+ }));
234
+ function flush(_x) {
235
+ return _flush.apply(this, arguments);
236
+ }
237
+ return flush;
238
+ }()
239
+ /**
240
+ * flush + 重置内部状态
241
+ */
242
+ )
243
+ }, {
244
+ key: "destroy",
245
+ value: function destroy() {
246
+ this.flush();
247
+ this.sessionKey = null;
248
+ this.context = {};
249
+ this.logs = [];
250
+ this.startTime = 0;
251
+ this.flushed = false;
252
+ }
253
+
254
+ // ─── 私有方法 ───
255
+
256
+ /**
257
+ * 构建 sendWarningLog 所需的 content 数组
258
+ */
259
+ }, {
260
+ key: "buildContent",
261
+ value: function buildContent(compressed, elapsed) {
262
+ var ctx = this.context;
263
+ return [{
264
+ key: 'sessionKey',
265
+ value: this.sessionKey || ''
266
+ }, {
267
+ key: '发起时间',
268
+ value: dayjs(this.startTime).format('YYYY-MM-DD HH:mm:ss')
269
+ }, {
270
+ key: '交易号',
271
+ value: String(ctx.transactionNumber || '未知')
272
+ }, {
273
+ key: '订单ID',
274
+ value: String(ctx.orderId || '未知')
275
+ }, {
276
+ key: '设备ID',
277
+ value: String(ctx.deviceId || '未知')
278
+ }, {
279
+ key: '支付类型',
280
+ value: String(ctx.paymentType || '未知')
281
+ }, {
282
+ key: '模式',
283
+ value: String(ctx.mode || '未知')
284
+ }, {
285
+ key: '渠道',
286
+ value: String(ctx.channel || '未知')
287
+ }, {
288
+ key: '总耗时',
289
+ value: "".concat(elapsed, "s")
290
+ },
291
+ // { key: '日志条数(原始/压缩)', value: `${this.logs.length}/${compressed.length}` },
292
+ {
293
+ key: '时间线',
294
+ value: JSON.stringify(compressed)
295
+ }];
296
+ }
297
+
298
+ /**
299
+ * 持久化当前会话到 localStorage
300
+ */
301
+ }, {
302
+ key: "persistToStorage",
303
+ value: function persistToStorage() {
304
+ if (!this.sessionKey) return;
305
+ try {
306
+ var all = this.getAllSessions();
307
+ all[this.sessionKey] = {
308
+ sessionKey: this.sessionKey,
309
+ context: this.context,
310
+ logs: this.logs,
311
+ startTime: this.startTime
312
+ };
313
+ localStorage.setItem(STORAGE_KEY, JSON.stringify(all));
314
+ } catch (error) {
315
+ console.error('PayLog persist error:', error);
316
+ }
317
+ }
318
+
319
+ /**
320
+ * 从 localStorage 移除指定 session
321
+ */
322
+ }, {
323
+ key: "removeFromStorage",
324
+ value: function removeFromStorage(key) {
325
+ try {
326
+ var all = this.getAllSessions();
327
+ delete all[key];
328
+ if (Object.keys(all).length === 0) {
329
+ localStorage.removeItem(STORAGE_KEY);
330
+ } else {
331
+ localStorage.setItem(STORAGE_KEY, JSON.stringify(all));
332
+ }
333
+ } catch (error) {
334
+ console.error('PayLog removeFromStorage error:', error);
335
+ }
336
+ }
337
+
338
+ /**
339
+ * 获取 localStorage 中所有 session
340
+ */
341
+ }, {
342
+ key: "getAllSessions",
343
+ value: function getAllSessions() {
344
+ try {
345
+ var raw = localStorage.getItem(STORAGE_KEY);
346
+ if (!raw) return {};
347
+ return JSON.parse(raw);
348
+ } catch (_unused2) {
349
+ return {};
350
+ }
351
+ }
352
+
353
+ /**
354
+ * 恢复上报 localStorage 中残留的旧日志(崩溃/异常退出场景)
355
+ */
356
+ }, {
357
+ key: "recoverOrphanedLogs",
358
+ value: function recoverOrphanedLogs() {
359
+ try {
360
+ var all = this.getAllSessions();
361
+ var keys = Object.keys(all);
362
+ if (keys.length === 0) return;
363
+ for (var _i = 0, _keys = keys; _i < _keys.length; _i++) {
364
+ var key = _keys[_i];
365
+ var session = all[key];
366
+ try {
367
+ var elapsed = ((Date.now() - session.startTime) / 1000).toFixed(1);
368
+ var compressed = compressLogs(session.logs);
369
+ var ctx = session.context;
370
+ var title = "[PRE][EFTPOS] ".concat(ctx.paymentType || '未知支付', "-").concat(ctx.mode || '未知模式', "-").concat(ctx.orderId || '未知订单ID');
371
+ var content = [{
372
+ key: 'sessionKey',
373
+ value: session.sessionKey
374
+ }, {
375
+ key: '发起时间',
376
+ value: dayjs(session.startTime).format('YYYY-MM-DD HH:mm:ss')
377
+ }, {
378
+ key: '交易号',
379
+ value: String(ctx.transactionNumber || '未知')
380
+ }, {
381
+ key: '订单ID',
382
+ value: String(ctx.orderId || '未知')
383
+ }, {
384
+ key: '设备ID',
385
+ value: String(ctx.deviceId || '未知')
386
+ }, {
387
+ key: '支付类型',
388
+ value: String(ctx.paymentType || '未知')
389
+ }, {
390
+ key: '模式',
391
+ value: String(ctx.mode || '未知')
392
+ }, {
393
+ key: '总耗时',
394
+ value: "".concat(elapsed, "s")
395
+ }, {
396
+ key: '日志条数(原始/压缩)',
397
+ value: "".concat(session.logs.length, "/").concat(compressed.length)
398
+ }, {
399
+ key: '时间线',
400
+ value: JSON.stringify(compressed)
401
+ }];
402
+ sendWarningLog({
403
+ title: title,
404
+ content: content
405
+ });
406
+ this.removeFromStorage(key);
407
+ } catch (err) {
408
+ console.error("PayLog: \u6062\u590D\u4E0A\u62A5\u5931\u8D25 (".concat(key, "):"), err);
409
+ this.removeFromStorage(key);
410
+ }
411
+ }
412
+ } catch (error) {
413
+ console.error('PayLog recoverOrphanedLogs error:', error);
414
+ }
415
+ }
416
+ }], [{
417
+ key: "getInstance",
418
+ value: function getInstance() {
419
+ if (!PayLog.instance) {
420
+ PayLog.instance = new PayLog();
421
+ }
422
+ return PayLog.instance;
423
+ }
424
+ }]);
425
+ return PayLog;
426
+ }(); // ─── 单例导出 ───
427
+ _defineProperty(PayLog, "instance", void 0);
428
+ var payLog = PayLog.getInstance();
429
+ export default payLog;
430
+
431
+ // ─── usePayLog Hook ───
432
+
433
+ /**
434
+ * 在根组件中使用,管理 PayLog 生命周期
435
+ * - mount 时 init(+ 恢复上报残留日志)
436
+ * - unmount 时 flush
437
+ */
438
+ export function usePayLog(context) {
439
+ var initialized = useRef(false);
440
+ useEffect(function () {
441
+ if (!initialized.current) {
442
+ initialized.current = true;
443
+ payLog.init(context);
444
+ }
445
+ return function () {
446
+ payLog.log('流程结束,上报日志');
447
+ payLog.destroy();
448
+ };
449
+ }, []);
450
+ return {
451
+ log: function log(title, data) {
452
+ return payLog.log(title, data);
453
+ },
454
+ setContext: function setContext(partial) {
455
+ return payLog.setContext(partial);
456
+ }
457
+ };
458
+ }
@@ -46,7 +46,7 @@ export default (function (params) {
46
46
  status: StatusEnum.Loading,
47
47
  steps: [],
48
48
  render: true,
49
- client: client !== 'undefined' ? client : ClientEnum.Merchant,
49
+ client: client !== 'undefined' && client !== undefined ? client : ClientEnum.Merchant,
50
50
  custom: other ? _objectSpread(_objectSpread({}, other), {}, {
51
51
  list: [],
52
52
  step: StepStatusEnum.Free
@@ -18,6 +18,7 @@ import { StatusEnum } from "../const";
18
18
  import { useContextData, useDispatch, updateState, updateCustom, updateStatus } from "../store";
19
19
  import { useStoreRef } from "../hooks";
20
20
  import { StemTypeEnum, StepStatusEnum, getStepMapping } from "./const";
21
+ import payLog from "../utils/payLog";
21
22
 
22
23
  /**
23
24
  * @title: 按钮操作区
@@ -60,6 +61,7 @@ export var ReceiptAction = function ReceiptAction(_ref) {
60
61
  * @Date: 2024-08-12 11:30
61
62
  */
62
63
  var onAccept = function onAccept() {
64
+ payLog.log('Windcave:签名-点击确认');
63
65
  // 确认签名
64
66
  dispatch(updateStatus(StatusEnum.Loading));
65
67
  dispatch(updateCustom({
@@ -138,6 +140,7 @@ export var ReceiptAction = function ReceiptAction(_ref) {
138
140
  * @Date: 2024-08-20 12:34
139
141
  */
140
142
  var onBack = function onBack() {
143
+ payLog.log('Windcave:签名-点击后退');
141
144
  dispatch(updateState({
142
145
  title: locales.getText('page.eftpos-pay.text.waiting.signature'),
143
146
  // ''), // 等待签名
@@ -156,6 +159,7 @@ export var ReceiptAction = function ReceiptAction(_ref) {
156
159
  * @Date: 2024-08-12 11:30
157
160
  */
158
161
  var onConfirm = function onConfirm() {
162
+ payLog.log('Windcave:签名-点击取消');
159
163
  // 取消签名
160
164
  dispatch(updateState({
161
165
  title: locales.getText('page.eftpos-pay.text.processing'),
@@ -244,6 +248,7 @@ export var ReceiptAction = function ReceiptAction(_ref) {
244
248
  * @Date: 2024-08-20 12:40
245
249
  */
246
250
  var onDecline = function onDecline() {
251
+ payLog.log('Windcave:签名-点击取消');
247
252
  dispatch(updateState({
248
253
  title: locales.getText('page.eftpos-pay.text.signature.title'),
249
254
  // 'page.eftpos-pay.text.waiting.signature'), // 等待签名