@polyv/product-ui 1.0.0-rc-20250612.3
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/address-edit.cjs.js +8 -0
- package/address-edit.es.d.ts +3 -0
- package/address-edit.es.js +5908 -0
- package/address-edit.umd.js +8 -0
- package/address-item.cjs.js +8 -0
- package/address-item.es.d.ts +3 -0
- package/address-item.es.js +425 -0
- package/address-item.umd.js +8 -0
- package/address-list.cjs.js +9 -0
- package/address-list.es.d.ts +3 -0
- package/address-list.es.js +1908 -0
- package/address-list.umd.js +9 -0
- package/index.cjs.js +8 -0
- package/index.es.js +15347 -0
- package/index.umd.js +8 -0
- package/mobile-product-pendant.cjs.js +8 -0
- package/mobile-product-pendant.es.d.ts +3 -0
- package/mobile-product-pendant.es.js +813 -0
- package/mobile-product-pendant.umd.js +8 -0
- package/order-confirm.cjs.js +9 -0
- package/order-confirm.es.d.ts +3 -0
- package/order-confirm.es.js +5254 -0
- package/order-confirm.umd.js +9 -0
- package/order-detail.cjs.js +8 -0
- package/order-detail.es.d.ts +3 -0
- package/order-detail.es.js +2474 -0
- package/order-detail.umd.js +8 -0
- package/order-item.cjs.js +8 -0
- package/order-item.es.d.ts +3 -0
- package/order-item.es.js +1448 -0
- package/order-item.umd.js +8 -0
- package/order-list-popup.cjs.js +9 -0
- package/order-list-popup.es.d.ts +3 -0
- package/order-list-popup.es.js +4114 -0
- package/order-list-popup.umd.js +9 -0
- package/order-list.cjs.js +8 -0
- package/order-list.es.d.ts +3 -0
- package/order-list.es.js +2572 -0
- package/order-list.umd.js +9 -0
- package/order-popup.cjs.js +9 -0
- package/order-popup.es.d.ts +3 -0
- package/order-popup.es.js +8050 -0
- package/order-popup.umd.js +9 -0
- package/package.json +28 -0
- package/pc-product-pendant.cjs.js +9 -0
- package/pc-product-pendant.es.d.ts +3 -0
- package/pc-product-pendant.es.js +1604 -0
- package/pc-product-pendant.umd.js +9 -0
- package/product-button.cjs.js +9 -0
- package/product-button.es.d.ts +3 -0
- package/product-button.es.js +1882 -0
- package/product-button.umd.js +9 -0
- package/product-detail-popup.cjs.js +9 -0
- package/product-detail-popup.es.d.ts +3 -0
- package/product-detail-popup.es.js +8250 -0
- package/product-detail-popup.umd.js +9 -0
- package/product-detail.cjs.js +9 -0
- package/product-detail.es.d.ts +3 -0
- package/product-detail.es.js +8082 -0
- package/product-detail.umd.js +9 -0
- package/product-iframe-link-popup.cjs.js +9 -0
- package/product-iframe-link-popup.es.d.ts +3 -0
- package/product-iframe-link-popup.es.js +2209 -0
- package/product-iframe-link-popup.umd.js +9 -0
- package/product-item.cjs.js +8 -0
- package/product-item.es.d.ts +3 -0
- package/product-item.es.js +3700 -0
- package/product-item.umd.js +9 -0
- package/product-list-popup.cjs.js +9 -0
- package/product-list-popup.es.d.ts +3 -0
- package/product-list-popup.es.js +5302 -0
- package/product-list-popup.umd.js +9 -0
- package/product-list.cjs.js +9 -0
- package/product-list.es.d.ts +3 -0
- package/product-list.es.js +5189 -0
- package/product-list.umd.js +9 -0
|
@@ -0,0 +1,2474 @@
|
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode("@font-face{font-family:D-DIN-PRO-Regular;src:url(https://s4.videocc.net/font/D-DIN-PRO-400-Regular.otf)}@font-face{font-family:D-DIN-PRO-Medium;src:url(https://s4.videocc.net/font/D-DIN-PRO-500-Medium.otf)}@font-face{font-family:D-DIN-PRO-Bold;src:url(https://s4.videocc.net/font/D-DIN-PRO-700-Bold.otf)}.plv-product-c-item__tag-container{box-sizing:border-box;margin-right:4px;padding:0 1px;border:.5px solid rgba(0,0,0,.2);border-radius:2px;color:#0009;font-size:12px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.plv-product-c-item__tag{display:inline-block;transform:scale(.833);user-select:none}@font-face{font-family:D-DIN-PRO-Regular;src:url(https://s4.videocc.net/font/D-DIN-PRO-400-Regular.otf)}@font-face{font-family:D-DIN-PRO-Medium;src:url(https://s4.videocc.net/font/D-DIN-PRO-500-Medium.otf)}@font-face{font-family:D-DIN-PRO-Bold;src:url(https://s4.videocc.net/font/D-DIN-PRO-700-Bold.otf)}.plv-product-c-purchase-product{display:flex;overflow:hidden;padding:10px 12px;border-radius:8px;background:#fff}.plv-product-c-purchase-product__image{flex:none;width:100px;height:100px;margin-right:8px;border-radius:4px;object-fit:cover}.plv-product-c-purchase-product__info{display:flex;flex:1;flex-direction:column;justify-content:space-between;min-width:0}.plv-product-c-purchase-product__name{color:#000c;font-size:14px;font-weight:500;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}.plv-product-c-purchase-product__tags{display:flex;margin-top:6px}.plv-product-c-purchase-product__description{margin-top:6px;color:#0006;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.plv-product-c-purchase-product__price-symbol{color:#333;font-size:12px}.plv-product-c-purchase-product__price-value{color:#333;font-size:18px}@font-face{font-family:D-DIN-PRO-Regular;src:url(https://s4.videocc.net/font/D-DIN-PRO-400-Regular.otf)}@font-face{font-family:D-DIN-PRO-Medium;src:url(https://s4.videocc.net/font/D-DIN-PRO-500-Medium.otf)}@font-face{font-family:D-DIN-PRO-Bold;src:url(https://s4.videocc.net/font/D-DIN-PRO-700-Bold.otf)}.plv-product-c-pay-status{display:flex;flex-direction:column;justify-content:center;align-items:center}.plv-product-c-pay-status__text{color:#000c;font-size:20px;font-weight:500}.plv-product-c-pay-status__actions{display:flex;justify-content:center;align-items:center;margin-top:4px;margin-bottom:18px;color:#999;font-size:14px}@font-face{font-family:D-DIN-PRO-Regular;src:url(https://s4.videocc.net/font/D-DIN-PRO-400-Regular.otf)}@font-face{font-family:D-DIN-PRO-Medium;src:url(https://s4.videocc.net/font/D-DIN-PRO-500-Medium.otf)}@font-face{font-family:D-DIN-PRO-Bold;src:url(https://s4.videocc.net/font/D-DIN-PRO-700-Bold.otf)}.plv-product-c-customer-qrcode{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:18px;padding:20px 0;border-radius:8px;background:#fff}.plv-product-c-customer-qrcode__img-wrap{position:relative;display:flex;justify-content:center;align-items:center;padding:10px;border:1px solid #CCC;border-radius:4px}.plv-product-c-customer-qrcode__img-text{position:absolute;color:#0006;font-size:14px}.plv-product-c-customer-qrcode__img,.plv-product-c-customer-qrcode__img--expired{width:120px;height:120px}.plv-product-c-customer-qrcode__tips{margin-top:12px;color:#0006;font-size:14px}@font-face{font-family:D-DIN-PRO-Regular;src:url(https://s4.videocc.net/font/D-DIN-PRO-400-Regular.otf)}@font-face{font-family:D-DIN-PRO-Medium;src:url(https://s4.videocc.net/font/D-DIN-PRO-500-Medium.otf)}@font-face{font-family:D-DIN-PRO-Bold;src:url(https://s4.videocc.net/font/D-DIN-PRO-700-Bold.otf)}.plv-product-address-item{box-sizing:border-box;padding:12px 16px;border-radius:8px;background:#fff}.plv-product-address-item__top{display:flex;justify-content:space-between;align-items:center}.plv-product-address-item__content{flex:1;min-width:0}.plv-product-address-item__header{color:#000c;font-size:14px}.plv-product-address-item__header-phone{margin-left:4px}.plv-product-address-item__address{margin-top:4px;color:#0006;font-size:14px;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}.plv-product-address-item__icon-wrapper{display:flex;flex-shrink:0;align-items:center;margin-left:40px}@font-face{font-family:D-DIN-PRO-Regular;src:url(https://s4.videocc.net/font/D-DIN-PRO-400-Regular.otf)}@font-face{font-family:D-DIN-PRO-Medium;src:url(https://s4.videocc.net/font/D-DIN-PRO-500-Medium.otf)}@font-face{font-family:D-DIN-PRO-Bold;src:url(https://s4.videocc.net/font/D-DIN-PRO-700-Bold.otf)}.plv-product-c-phone-info{display:flex;align-items:center;box-sizing:border-box;height:52px;padding-left:12px;border-radius:8px;background:#fff;color:#000c;font-size:14px}.plv-product-c-phone-info__text{margin-left:12px}.plv-radio{cursor:pointer;line-height:16px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;margin-right:30px;-webkit-box-sizing:border-box;box-sizing:border-box}.plv-radio:last-of-type{margin-right:0}.plv-radio .plv-radio__inner{-ms-flex-negative:0;flex-shrink:0;-webkit-box-sizing:border-box;box-sizing:border-box;width:16px;height:16px;border-radius:8px;border:1px solid #e5e5e5;-webkit-transition:border-color .35s;transition:border-color .35s;vertical-align:middle}.plv-radio .plv-radio__label{color:#1d2129;font-size:14px;padding-left:8px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;line-height:16px;word-break:break-word}.plv-radio:hover .plv-radio__inner{border-color:#3f76fc}.plv-radio.plv-radio--checked .plv-radio__inner{border-width:4px;border-color:#3f76fc}.plv-radio.plv-radio--disabled{cursor:not-allowed}.plv-radio.plv-radio--disabled .plv-radio__inner{border-color:#e5e5e5;background:#f9fafd}.plv-radio.plv-radio--disabled .plv-radio__label{color:#969ba5}.plv-radio.plv-radio--disabled.plv-radio--checked .plv-radio__inner{background:#f9fafd}.plv-radio.plv-radio--readonly{cursor:default}.plv-radio.plv-radio--readonly:hover .plv-radio__inner{border-color:#e5e5e5}.plv-radio.plv-radio--readonly:hover .plv-radio__inner.plv-radio__inner--checked{border-color:#3f76fc}.plv-radio--border{min-width:80px;height:36px!important;padding:0 16px;border-radius:2px;border:1px solid #e5e5e5;-webkit-transition:border-color .35s;transition:border-color .35s;position:relative;margin-right:16px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.plv-radio--border:hover{border-color:#3f76fc}.plv-radio--border .plv-radio__label{padding-left:0;font-size:12px;float:none}.plv-radio--border.plv-radio--checked{border-width:2px;border-color:#3f76fc}.plv-radio--border .plv-radio__corner{position:absolute;right:-1px;bottom:-1px;width:18px;height:18px;background-image:url(data:image/png;base64,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);background-size:100% 100%}.plv-radio--border.plv-radio--disabled{background:#f9fafd;border-color:#e5e5e5!important}.plv-radio--border.plv-radio--disabled:hover,.plv-radio--border.plv-radio--readonly{border-color:#e5e5e5}.plv-radio--border.plv-radio--readonly.plv-radio--checked{border-color:#3f76fc}.plv-product-c-payment-methods{margin-bottom:8px;padding:10px 12px;border-radius:8px;background-color:$plv-color-white}.plv-product-c-payment-methods__title{margin-bottom:10px;color:$plv-color-black-opacity-40;font-size:12px}.plv-product-c-payment-methods__list{display:flex;flex-direction:column}.plv-product-c-payment-methods__item{display:flex;justify-content:space-between;align-items:center;padding:8px 0;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}.plv-product-c-payment-methods__item-info{display:flex;align-items:center}.plv-product-c-payment-methods__item-icon{display:flex;justify-content:center;align-items:center;width:24px;height:24px;margin-right:8px}.plv-product-c-payment-methods__item-icon img{max-width:100%;max-height:100%}.plv-product-c-payment-methods__item-label{color:$plv-color-black-opacity-80;font-size:14px}@font-face{font-family:D-DIN-PRO-Regular;src:url(https://s4.videocc.net/font/D-DIN-PRO-400-Regular.otf)}@font-face{font-family:D-DIN-PRO-Medium;src:url(https://s4.videocc.net/font/D-DIN-PRO-500-Medium.otf)}@font-face{font-family:D-DIN-PRO-Bold;src:url(https://s4.videocc.net/font/D-DIN-PRO-700-Bold.otf)}.plv-product-c-order-info__text{display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;height:44px;padding:12px 14px 12px 16px;color:#000c;font-size:12px}.plv-product-c-order-info__text>span:first-child{color:#0006}.plv-product-c-order-info__amount{color:#ff5252}.plv-product-c-order-info__amount-symbol{font-size:12px}.plv-product-c-order-info__amount-value{font-size:18px}@font-face{font-family:D-DIN-PRO-Regular;src:url(https://s4.videocc.net/font/D-DIN-PRO-400-Regular.otf)}@font-face{font-family:D-DIN-PRO-Medium;src:url(https://s4.videocc.net/font/D-DIN-PRO-500-Medium.otf)}@font-face{font-family:D-DIN-PRO-Bold;src:url(https://s4.videocc.net/font/D-DIN-PRO-700-Bold.otf)}.plv-product-c-bottom-operate-panel{display:flex;justify-content:flex-end;box-sizing:border-box;width:100%;padding:10px 12px;background-color:#fff;padding-bottom:calc(env(safe-area-inset-bottom) + 16px)}@supports not (padding-bottom: calc(env(safe-area-inset-bottom) + 16px)){.plv-product-c-bottom-operate-panel{padding-bottom:16px}}.plv-product-c-bottom-operate-panel__item{display:flex;justify-content:center;align-items:center}.plv-product-c-bottom-operate-panel__btn{box-sizing:border-box;height:40px;padding:9px 32px;border-radius:22px;background:#ff5252;color:#fff;font-size:16px;white-space:nowrap}.plv-product-c-bottom-operate-panel__btn-refund{border:1px solid rgba(0,0,0,.1);background:transparent;color:#000c}@font-face{font-family:D-DIN-PRO-Regular;src:url(https://s4.videocc.net/font/D-DIN-PRO-400-Regular.otf)}@font-face{font-family:D-DIN-PRO-Medium;src:url(https://s4.videocc.net/font/D-DIN-PRO-500-Medium.otf)}@font-face{font-family:D-DIN-PRO-Bold;src:url(https://s4.videocc.net/font/D-DIN-PRO-700-Bold.otf)}.plv-font-din-pro-regular{font-family:D-DIN-PRO-Regular,sans-serif}.plv-font-din-pro-medium{font-family:D-DIN-PRO-Medium,sans-serif}.plv-font-din-pro-bold{font-family:D-DIN-PRO-Bold,sans-serif}.plv-product-order-detail{display:flex;flex-direction:column;height:100%}.plv-product-order-detail__content{flex:1;padding:0 12px}.plv-product-order-detail__info{margin-top:8px;border-radius:8px;background:#fff}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __spreadValues = (a2, b2) => {
|
|
10
|
+
for (var prop in b2 || (b2 = {}))
|
|
11
|
+
if (__hasOwnProp.call(b2, prop))
|
|
12
|
+
__defNormalProp(a2, prop, b2[prop]);
|
|
13
|
+
if (__getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b2)) {
|
|
15
|
+
if (__propIsEnum.call(b2, prop))
|
|
16
|
+
__defNormalProp(a2, prop, b2[prop]);
|
|
17
|
+
}
|
|
18
|
+
return a2;
|
|
19
|
+
};
|
|
20
|
+
var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
|
|
21
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22
|
+
var __async = (__this, __arguments, generator) => {
|
|
23
|
+
return new Promise((resolve, reject) => {
|
|
24
|
+
var fulfilled = (value) => {
|
|
25
|
+
try {
|
|
26
|
+
step(generator.next(value));
|
|
27
|
+
} catch (e) {
|
|
28
|
+
reject(e);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
var rejected = (value) => {
|
|
32
|
+
try {
|
|
33
|
+
step(generator.throw(value));
|
|
34
|
+
} catch (e) {
|
|
35
|
+
reject(e);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var step = (x2) => x2.done ? resolve(x2.value) : Promise.resolve(x2.value).then(fulfilled, rejected);
|
|
39
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
import { onMounted, onBeforeUnmount, inject, computed, ref, provide, defineComponent, watch } from "vue";
|
|
43
|
+
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
44
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
45
|
+
var root = freeGlobal || freeSelf || Function("return this")();
|
|
46
|
+
var Symbol$1 = root.Symbol;
|
|
47
|
+
var objectProto$4 = Object.prototype;
|
|
48
|
+
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
49
|
+
var nativeObjectToString$1 = objectProto$4.toString;
|
|
50
|
+
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
51
|
+
function getRawTag(value) {
|
|
52
|
+
var isOwn = hasOwnProperty$3.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
53
|
+
try {
|
|
54
|
+
value[symToStringTag$1] = void 0;
|
|
55
|
+
var unmasked = true;
|
|
56
|
+
} catch (e) {
|
|
57
|
+
}
|
|
58
|
+
var result = nativeObjectToString$1.call(value);
|
|
59
|
+
if (unmasked) {
|
|
60
|
+
if (isOwn) {
|
|
61
|
+
value[symToStringTag$1] = tag;
|
|
62
|
+
} else {
|
|
63
|
+
delete value[symToStringTag$1];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return result;
|
|
67
|
+
}
|
|
68
|
+
var objectProto$3 = Object.prototype;
|
|
69
|
+
var nativeObjectToString = objectProto$3.toString;
|
|
70
|
+
function objectToString(value) {
|
|
71
|
+
return nativeObjectToString.call(value);
|
|
72
|
+
}
|
|
73
|
+
var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
|
|
74
|
+
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
75
|
+
function baseGetTag(value) {
|
|
76
|
+
if (value == null) {
|
|
77
|
+
return value === void 0 ? undefinedTag : nullTag;
|
|
78
|
+
}
|
|
79
|
+
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
80
|
+
}
|
|
81
|
+
function isObjectLike(value) {
|
|
82
|
+
return value != null && typeof value == "object";
|
|
83
|
+
}
|
|
84
|
+
var symbolTag = "[object Symbol]";
|
|
85
|
+
function isSymbol(value) {
|
|
86
|
+
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
|
87
|
+
}
|
|
88
|
+
function arrayMap(array, iteratee) {
|
|
89
|
+
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
90
|
+
while (++index < length) {
|
|
91
|
+
result[index] = iteratee(array[index], index, array);
|
|
92
|
+
}
|
|
93
|
+
return result;
|
|
94
|
+
}
|
|
95
|
+
var isArray = Array.isArray;
|
|
96
|
+
var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
|
|
97
|
+
function baseToString(value) {
|
|
98
|
+
if (typeof value == "string") {
|
|
99
|
+
return value;
|
|
100
|
+
}
|
|
101
|
+
if (isArray(value)) {
|
|
102
|
+
return arrayMap(value, baseToString) + "";
|
|
103
|
+
}
|
|
104
|
+
if (isSymbol(value)) {
|
|
105
|
+
return symbolToString ? symbolToString.call(value) : "";
|
|
106
|
+
}
|
|
107
|
+
var result = value + "";
|
|
108
|
+
return result == "0" && 1 / value == -Infinity ? "-0" : result;
|
|
109
|
+
}
|
|
110
|
+
function isObject$1(value) {
|
|
111
|
+
var type = typeof value;
|
|
112
|
+
return value != null && (type == "object" || type == "function");
|
|
113
|
+
}
|
|
114
|
+
var asyncTag = "[object AsyncFunction]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
|
|
115
|
+
function isFunction(value) {
|
|
116
|
+
if (!isObject$1(value)) {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
var tag = baseGetTag(value);
|
|
120
|
+
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
121
|
+
}
|
|
122
|
+
var coreJsData = root["__core-js_shared__"];
|
|
123
|
+
var maskSrcKey = function() {
|
|
124
|
+
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
125
|
+
return uid ? "Symbol(src)_1." + uid : "";
|
|
126
|
+
}();
|
|
127
|
+
function isMasked(func) {
|
|
128
|
+
return !!maskSrcKey && maskSrcKey in func;
|
|
129
|
+
}
|
|
130
|
+
var funcProto$1 = Function.prototype;
|
|
131
|
+
var funcToString$1 = funcProto$1.toString;
|
|
132
|
+
function toSource(func) {
|
|
133
|
+
if (func != null) {
|
|
134
|
+
try {
|
|
135
|
+
return funcToString$1.call(func);
|
|
136
|
+
} catch (e) {
|
|
137
|
+
}
|
|
138
|
+
try {
|
|
139
|
+
return func + "";
|
|
140
|
+
} catch (e) {
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return "";
|
|
144
|
+
}
|
|
145
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
146
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
147
|
+
var funcProto = Function.prototype, objectProto$2 = Object.prototype;
|
|
148
|
+
var funcToString = funcProto.toString;
|
|
149
|
+
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
150
|
+
var reIsNative = RegExp(
|
|
151
|
+
"^" + funcToString.call(hasOwnProperty$2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
152
|
+
);
|
|
153
|
+
function baseIsNative(value) {
|
|
154
|
+
if (!isObject$1(value) || isMasked(value)) {
|
|
155
|
+
return false;
|
|
156
|
+
}
|
|
157
|
+
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
158
|
+
return pattern.test(toSource(value));
|
|
159
|
+
}
|
|
160
|
+
function getValue(object, key) {
|
|
161
|
+
return object == null ? void 0 : object[key];
|
|
162
|
+
}
|
|
163
|
+
function getNative(object, key) {
|
|
164
|
+
var value = getValue(object, key);
|
|
165
|
+
return baseIsNative(value) ? value : void 0;
|
|
166
|
+
}
|
|
167
|
+
function eq(value, other) {
|
|
168
|
+
return value === other || value !== value && other !== other;
|
|
169
|
+
}
|
|
170
|
+
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
|
|
171
|
+
function isKey(value, object) {
|
|
172
|
+
if (isArray(value)) {
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
var type = typeof value;
|
|
176
|
+
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
|
180
|
+
}
|
|
181
|
+
var nativeCreate = getNative(Object, "create");
|
|
182
|
+
function hashClear() {
|
|
183
|
+
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
184
|
+
this.size = 0;
|
|
185
|
+
}
|
|
186
|
+
function hashDelete(key) {
|
|
187
|
+
var result = this.has(key) && delete this.__data__[key];
|
|
188
|
+
this.size -= result ? 1 : 0;
|
|
189
|
+
return result;
|
|
190
|
+
}
|
|
191
|
+
var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
|
|
192
|
+
var objectProto$1 = Object.prototype;
|
|
193
|
+
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
194
|
+
function hashGet(key) {
|
|
195
|
+
var data = this.__data__;
|
|
196
|
+
if (nativeCreate) {
|
|
197
|
+
var result = data[key];
|
|
198
|
+
return result === HASH_UNDEFINED$1 ? void 0 : result;
|
|
199
|
+
}
|
|
200
|
+
return hasOwnProperty$1.call(data, key) ? data[key] : void 0;
|
|
201
|
+
}
|
|
202
|
+
var objectProto = Object.prototype;
|
|
203
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
204
|
+
function hashHas(key) {
|
|
205
|
+
var data = this.__data__;
|
|
206
|
+
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
|
|
207
|
+
}
|
|
208
|
+
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
209
|
+
function hashSet(key, value) {
|
|
210
|
+
var data = this.__data__;
|
|
211
|
+
this.size += this.has(key) ? 0 : 1;
|
|
212
|
+
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
|
|
213
|
+
return this;
|
|
214
|
+
}
|
|
215
|
+
function Hash(entries) {
|
|
216
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
217
|
+
this.clear();
|
|
218
|
+
while (++index < length) {
|
|
219
|
+
var entry = entries[index];
|
|
220
|
+
this.set(entry[0], entry[1]);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
Hash.prototype.clear = hashClear;
|
|
224
|
+
Hash.prototype["delete"] = hashDelete;
|
|
225
|
+
Hash.prototype.get = hashGet;
|
|
226
|
+
Hash.prototype.has = hashHas;
|
|
227
|
+
Hash.prototype.set = hashSet;
|
|
228
|
+
function listCacheClear() {
|
|
229
|
+
this.__data__ = [];
|
|
230
|
+
this.size = 0;
|
|
231
|
+
}
|
|
232
|
+
function assocIndexOf(array, key) {
|
|
233
|
+
var length = array.length;
|
|
234
|
+
while (length--) {
|
|
235
|
+
if (eq(array[length][0], key)) {
|
|
236
|
+
return length;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
return -1;
|
|
240
|
+
}
|
|
241
|
+
var arrayProto = Array.prototype;
|
|
242
|
+
var splice = arrayProto.splice;
|
|
243
|
+
function listCacheDelete(key) {
|
|
244
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
245
|
+
if (index < 0) {
|
|
246
|
+
return false;
|
|
247
|
+
}
|
|
248
|
+
var lastIndex = data.length - 1;
|
|
249
|
+
if (index == lastIndex) {
|
|
250
|
+
data.pop();
|
|
251
|
+
} else {
|
|
252
|
+
splice.call(data, index, 1);
|
|
253
|
+
}
|
|
254
|
+
--this.size;
|
|
255
|
+
return true;
|
|
256
|
+
}
|
|
257
|
+
function listCacheGet(key) {
|
|
258
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
259
|
+
return index < 0 ? void 0 : data[index][1];
|
|
260
|
+
}
|
|
261
|
+
function listCacheHas(key) {
|
|
262
|
+
return assocIndexOf(this.__data__, key) > -1;
|
|
263
|
+
}
|
|
264
|
+
function listCacheSet(key, value) {
|
|
265
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
266
|
+
if (index < 0) {
|
|
267
|
+
++this.size;
|
|
268
|
+
data.push([key, value]);
|
|
269
|
+
} else {
|
|
270
|
+
data[index][1] = value;
|
|
271
|
+
}
|
|
272
|
+
return this;
|
|
273
|
+
}
|
|
274
|
+
function ListCache(entries) {
|
|
275
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
276
|
+
this.clear();
|
|
277
|
+
while (++index < length) {
|
|
278
|
+
var entry = entries[index];
|
|
279
|
+
this.set(entry[0], entry[1]);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
ListCache.prototype.clear = listCacheClear;
|
|
283
|
+
ListCache.prototype["delete"] = listCacheDelete;
|
|
284
|
+
ListCache.prototype.get = listCacheGet;
|
|
285
|
+
ListCache.prototype.has = listCacheHas;
|
|
286
|
+
ListCache.prototype.set = listCacheSet;
|
|
287
|
+
var Map$1 = getNative(root, "Map");
|
|
288
|
+
function mapCacheClear() {
|
|
289
|
+
this.size = 0;
|
|
290
|
+
this.__data__ = {
|
|
291
|
+
"hash": new Hash(),
|
|
292
|
+
"map": new (Map$1 || ListCache)(),
|
|
293
|
+
"string": new Hash()
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
function isKeyable(value) {
|
|
297
|
+
var type = typeof value;
|
|
298
|
+
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
299
|
+
}
|
|
300
|
+
function getMapData(map, key) {
|
|
301
|
+
var data = map.__data__;
|
|
302
|
+
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
303
|
+
}
|
|
304
|
+
function mapCacheDelete(key) {
|
|
305
|
+
var result = getMapData(this, key)["delete"](key);
|
|
306
|
+
this.size -= result ? 1 : 0;
|
|
307
|
+
return result;
|
|
308
|
+
}
|
|
309
|
+
function mapCacheGet(key) {
|
|
310
|
+
return getMapData(this, key).get(key);
|
|
311
|
+
}
|
|
312
|
+
function mapCacheHas(key) {
|
|
313
|
+
return getMapData(this, key).has(key);
|
|
314
|
+
}
|
|
315
|
+
function mapCacheSet(key, value) {
|
|
316
|
+
var data = getMapData(this, key), size = data.size;
|
|
317
|
+
data.set(key, value);
|
|
318
|
+
this.size += data.size == size ? 0 : 1;
|
|
319
|
+
return this;
|
|
320
|
+
}
|
|
321
|
+
function MapCache(entries) {
|
|
322
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
323
|
+
this.clear();
|
|
324
|
+
while (++index < length) {
|
|
325
|
+
var entry = entries[index];
|
|
326
|
+
this.set(entry[0], entry[1]);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
MapCache.prototype.clear = mapCacheClear;
|
|
330
|
+
MapCache.prototype["delete"] = mapCacheDelete;
|
|
331
|
+
MapCache.prototype.get = mapCacheGet;
|
|
332
|
+
MapCache.prototype.has = mapCacheHas;
|
|
333
|
+
MapCache.prototype.set = mapCacheSet;
|
|
334
|
+
var FUNC_ERROR_TEXT = "Expected a function";
|
|
335
|
+
function memoize(func, resolver) {
|
|
336
|
+
if (typeof func != "function" || resolver != null && typeof resolver != "function") {
|
|
337
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
338
|
+
}
|
|
339
|
+
var memoized = function() {
|
|
340
|
+
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
|
|
341
|
+
if (cache.has(key)) {
|
|
342
|
+
return cache.get(key);
|
|
343
|
+
}
|
|
344
|
+
var result = func.apply(this, args);
|
|
345
|
+
memoized.cache = cache.set(key, result) || cache;
|
|
346
|
+
return result;
|
|
347
|
+
};
|
|
348
|
+
memoized.cache = new (memoize.Cache || MapCache)();
|
|
349
|
+
return memoized;
|
|
350
|
+
}
|
|
351
|
+
memoize.Cache = MapCache;
|
|
352
|
+
var MAX_MEMOIZE_SIZE = 500;
|
|
353
|
+
function memoizeCapped(func) {
|
|
354
|
+
var result = memoize(func, function(key) {
|
|
355
|
+
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
356
|
+
cache.clear();
|
|
357
|
+
}
|
|
358
|
+
return key;
|
|
359
|
+
});
|
|
360
|
+
var cache = result.cache;
|
|
361
|
+
return result;
|
|
362
|
+
}
|
|
363
|
+
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
364
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
365
|
+
var stringToPath = memoizeCapped(function(string) {
|
|
366
|
+
var result = [];
|
|
367
|
+
if (string.charCodeAt(0) === 46) {
|
|
368
|
+
result.push("");
|
|
369
|
+
}
|
|
370
|
+
string.replace(rePropName, function(match, number, quote, subString) {
|
|
371
|
+
result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
|
|
372
|
+
});
|
|
373
|
+
return result;
|
|
374
|
+
});
|
|
375
|
+
function toString(value) {
|
|
376
|
+
return value == null ? "" : baseToString(value);
|
|
377
|
+
}
|
|
378
|
+
function castPath(value, object) {
|
|
379
|
+
if (isArray(value)) {
|
|
380
|
+
return value;
|
|
381
|
+
}
|
|
382
|
+
return isKey(value, object) ? [value] : stringToPath(toString(value));
|
|
383
|
+
}
|
|
384
|
+
function toKey(value) {
|
|
385
|
+
if (typeof value == "string" || isSymbol(value)) {
|
|
386
|
+
return value;
|
|
387
|
+
}
|
|
388
|
+
var result = value + "";
|
|
389
|
+
return result == "0" && 1 / value == -Infinity ? "-0" : result;
|
|
390
|
+
}
|
|
391
|
+
function baseGet(object, path) {
|
|
392
|
+
path = castPath(path, object);
|
|
393
|
+
var index = 0, length = path.length;
|
|
394
|
+
while (object != null && index < length) {
|
|
395
|
+
object = object[toKey(path[index++])];
|
|
396
|
+
}
|
|
397
|
+
return index && index == length ? object : void 0;
|
|
398
|
+
}
|
|
399
|
+
function get(object, path, defaultValue) {
|
|
400
|
+
var result = object == null ? void 0 : baseGet(object, path);
|
|
401
|
+
return result === void 0 ? defaultValue : result;
|
|
402
|
+
}
|
|
403
|
+
/*!
|
|
404
|
+
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
405
|
+
*
|
|
406
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
407
|
+
* Released under the MIT License.
|
|
408
|
+
*/
|
|
409
|
+
function isObject(o2) {
|
|
410
|
+
return Object.prototype.toString.call(o2) === "[object Object]";
|
|
411
|
+
}
|
|
412
|
+
function isPlainObject(o2) {
|
|
413
|
+
var ctor, prot;
|
|
414
|
+
if (isObject(o2) === false) return false;
|
|
415
|
+
ctor = o2.constructor;
|
|
416
|
+
if (ctor === void 0) return true;
|
|
417
|
+
prot = ctor.prototype;
|
|
418
|
+
if (isObject(prot) === false) return false;
|
|
419
|
+
if (prot.hasOwnProperty("isPrototypeOf") === false) {
|
|
420
|
+
return false;
|
|
421
|
+
}
|
|
422
|
+
return true;
|
|
423
|
+
}
|
|
424
|
+
var define_process_env_default = {};
|
|
425
|
+
function t() {
|
|
426
|
+
return t = Object.assign ? Object.assign.bind() : function(e2) {
|
|
427
|
+
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
428
|
+
var n2 = arguments[t2];
|
|
429
|
+
for (var r2 in n2) Object.prototype.hasOwnProperty.call(n2, r2) && (e2[r2] = n2[r2]);
|
|
430
|
+
}
|
|
431
|
+
return e2;
|
|
432
|
+
}, t.apply(this, arguments);
|
|
433
|
+
}
|
|
434
|
+
function n(e2, t2) {
|
|
435
|
+
if (null == e2) return {};
|
|
436
|
+
var n2 = {};
|
|
437
|
+
for (var r2 in e2) if (Object.prototype.hasOwnProperty.call(e2, r2)) {
|
|
438
|
+
if (t2.indexOf(r2) >= 0) continue;
|
|
439
|
+
n2[r2] = e2[r2];
|
|
440
|
+
}
|
|
441
|
+
return n2;
|
|
442
|
+
}
|
|
443
|
+
const r = { silent: false, logLevel: "warn" }, i = ["validator"], o = Object.prototype, a = o.toString, s = o.hasOwnProperty, u = /^\s*function (\w+)/;
|
|
444
|
+
function l(e2) {
|
|
445
|
+
var t2;
|
|
446
|
+
const n2 = null !== (t2 = null == e2 ? void 0 : e2.type) && void 0 !== t2 ? t2 : e2;
|
|
447
|
+
if (n2) {
|
|
448
|
+
const e3 = n2.toString().match(u);
|
|
449
|
+
return e3 ? e3[1] : "";
|
|
450
|
+
}
|
|
451
|
+
return "";
|
|
452
|
+
}
|
|
453
|
+
const c = isPlainObject;
|
|
454
|
+
function f() {
|
|
455
|
+
}
|
|
456
|
+
let d = f;
|
|
457
|
+
if ("production" !== define_process_env_default.NODE_ENV) {
|
|
458
|
+
const e2 = "undefined" != typeof console;
|
|
459
|
+
d = e2 ? function(e3, t2 = r.logLevel) {
|
|
460
|
+
false === r.silent && console[t2](`[VueTypes warn]: ${e3}`);
|
|
461
|
+
} : f;
|
|
462
|
+
}
|
|
463
|
+
const p = (e2, t2) => s.call(e2, t2), y = Number.isInteger || function(e2) {
|
|
464
|
+
return "number" == typeof e2 && isFinite(e2) && Math.floor(e2) === e2;
|
|
465
|
+
}, v = Array.isArray || function(e2) {
|
|
466
|
+
return "[object Array]" === a.call(e2);
|
|
467
|
+
}, h = (e2) => "[object Function]" === a.call(e2), b = (e2, t2) => c(e2) && p(e2, "_vueTypes_name") && (!t2 || e2._vueTypes_name === t2), g = (e2) => c(e2) && (p(e2, "type") || ["_vueTypes_name", "validator", "default", "required"].some((t2) => p(e2, t2)));
|
|
468
|
+
function O(e2, t2) {
|
|
469
|
+
return Object.defineProperty(e2.bind(t2), "__original", { value: e2 });
|
|
470
|
+
}
|
|
471
|
+
function m(e2, t2, n2 = false) {
|
|
472
|
+
let r2, i2 = true, o2 = "";
|
|
473
|
+
r2 = c(e2) ? e2 : { type: e2 };
|
|
474
|
+
const a2 = b(r2) ? r2._vueTypes_name + " - " : "";
|
|
475
|
+
if (g(r2) && null !== r2.type) {
|
|
476
|
+
if (void 0 === r2.type || true === r2.type) return i2;
|
|
477
|
+
if (!r2.required && null == t2) return i2;
|
|
478
|
+
v(r2.type) ? (i2 = r2.type.some((e3) => true === m(e3, t2, true)), o2 = r2.type.map((e3) => l(e3)).join(" or ")) : (o2 = l(r2), i2 = "Array" === o2 ? v(t2) : "Object" === o2 ? c(t2) : "String" === o2 || "Number" === o2 || "Boolean" === o2 || "Function" === o2 ? function(e3) {
|
|
479
|
+
if (null == e3) return "";
|
|
480
|
+
const t3 = e3.constructor.toString().match(u);
|
|
481
|
+
return t3 ? t3[1].replace(/^Async/, "") : "";
|
|
482
|
+
}(t2) === o2 : t2 instanceof r2.type);
|
|
483
|
+
}
|
|
484
|
+
if (!i2) {
|
|
485
|
+
const e3 = `${a2}value "${t2}" should be of type "${o2}"`;
|
|
486
|
+
return false === n2 ? (d(e3), false) : e3;
|
|
487
|
+
}
|
|
488
|
+
if (p(r2, "validator") && h(r2.validator)) {
|
|
489
|
+
const e3 = d, o3 = [];
|
|
490
|
+
if (d = (e4) => {
|
|
491
|
+
o3.push(e4);
|
|
492
|
+
}, i2 = r2.validator(t2), d = e3, !i2) {
|
|
493
|
+
const e4 = (o3.length > 1 ? "* " : "") + o3.join("\n* ");
|
|
494
|
+
return o3.length = 0, false === n2 ? (d(e4), i2) : e4;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
return i2;
|
|
498
|
+
}
|
|
499
|
+
function j(e2, t2) {
|
|
500
|
+
const n2 = Object.defineProperties(t2, { _vueTypes_name: { value: e2, writable: true }, isRequired: { get() {
|
|
501
|
+
return this.required = true, this;
|
|
502
|
+
} }, def: { value(e3) {
|
|
503
|
+
return void 0 === e3 ? this.type === Boolean || Array.isArray(this.type) && this.type.includes(Boolean) ? void (this.default = void 0) : (p(this, "default") && delete this.default, this) : h(e3) || true === m(this, e3, true) ? (this.default = v(e3) ? () => [...e3] : c(e3) ? () => Object.assign({}, e3) : e3, this) : (d(`${this._vueTypes_name} - invalid default value: "${e3}"`), this);
|
|
504
|
+
} } }), { validator: r2 } = n2;
|
|
505
|
+
return h(r2) && (n2.validator = O(r2, n2)), n2;
|
|
506
|
+
}
|
|
507
|
+
function _(e2, t2) {
|
|
508
|
+
const n2 = j(e2, t2);
|
|
509
|
+
return Object.defineProperty(n2, "validate", { value(e3) {
|
|
510
|
+
return h(this.validator) && d(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:
|
|
511
|
+
${JSON.stringify(this)}`), this.validator = O(e3, this), this;
|
|
512
|
+
} });
|
|
513
|
+
}
|
|
514
|
+
function T(e2, t2, r2) {
|
|
515
|
+
const o2 = function(e3) {
|
|
516
|
+
const t3 = {};
|
|
517
|
+
return Object.getOwnPropertyNames(e3).forEach((n2) => {
|
|
518
|
+
t3[n2] = Object.getOwnPropertyDescriptor(e3, n2);
|
|
519
|
+
}), Object.defineProperties({}, t3);
|
|
520
|
+
}(t2);
|
|
521
|
+
if (o2._vueTypes_name = e2, !c(r2)) return o2;
|
|
522
|
+
const { validator: a2 } = r2, s2 = n(r2, i);
|
|
523
|
+
if (h(a2)) {
|
|
524
|
+
let { validator: e3 } = o2;
|
|
525
|
+
e3 && (e3 = null !== (l2 = (u2 = e3).__original) && void 0 !== l2 ? l2 : u2), o2.validator = O(e3 ? function(t3) {
|
|
526
|
+
return e3.call(this, t3) && a2.call(this, t3);
|
|
527
|
+
} : a2, o2);
|
|
528
|
+
}
|
|
529
|
+
var u2, l2;
|
|
530
|
+
return Object.assign(o2, s2);
|
|
531
|
+
}
|
|
532
|
+
function $(e2) {
|
|
533
|
+
return e2.replace(/^(?!\s*$)/gm, " ");
|
|
534
|
+
}
|
|
535
|
+
const w = () => _("any", {}), x = () => _("function", { type: Function }), P = () => _("boolean", { type: Boolean }), A = () => _("string", { type: String }), E = () => _("number", { type: Number }), S = () => _("array", { type: Array }), N = () => _("object", { type: Object }), V = () => j("integer", { type: Number, validator(e2) {
|
|
536
|
+
const t2 = y(e2);
|
|
537
|
+
return false === t2 && d(`integer - "${e2}" is not an integer`), t2;
|
|
538
|
+
} }), q = () => j("symbol", { validator(e2) {
|
|
539
|
+
const t2 = "symbol" == typeof e2;
|
|
540
|
+
return false === t2 && d(`symbol - invalid value "${e2}"`), t2;
|
|
541
|
+
} }), k = () => Object.defineProperty({ type: null, validator(e2) {
|
|
542
|
+
const t2 = null === e2;
|
|
543
|
+
return false === t2 && d("nullable - value should be null"), t2;
|
|
544
|
+
} }, "_vueTypes_name", { value: "nullable" });
|
|
545
|
+
function D(e2, t2 = "custom validation failed") {
|
|
546
|
+
if ("function" != typeof e2) throw new TypeError("[VueTypes error]: You must provide a function as argument");
|
|
547
|
+
return j(e2.name || "<<anonymous function>>", { type: null, validator(n2) {
|
|
548
|
+
const r2 = e2(n2);
|
|
549
|
+
return r2 || d(`${this._vueTypes_name} - ${t2}`), r2;
|
|
550
|
+
} });
|
|
551
|
+
}
|
|
552
|
+
function L(e2) {
|
|
553
|
+
if (!v(e2)) throw new TypeError("[VueTypes error]: You must provide an array as argument.");
|
|
554
|
+
const t2 = `oneOf - value should be one of "${e2.map((e3) => "symbol" == typeof e3 ? e3.toString() : e3).join('", "')}".`, n2 = { validator(n3) {
|
|
555
|
+
const r2 = -1 !== e2.indexOf(n3);
|
|
556
|
+
return r2 || d(t2), r2;
|
|
557
|
+
} };
|
|
558
|
+
if (-1 === e2.indexOf(null)) {
|
|
559
|
+
const t3 = e2.reduce((e3, t4) => {
|
|
560
|
+
if (null != t4) {
|
|
561
|
+
const n3 = t4.constructor;
|
|
562
|
+
-1 === e3.indexOf(n3) && e3.push(n3);
|
|
563
|
+
}
|
|
564
|
+
return e3;
|
|
565
|
+
}, []);
|
|
566
|
+
t3.length > 0 && (n2.type = t3);
|
|
567
|
+
}
|
|
568
|
+
return j("oneOf", n2);
|
|
569
|
+
}
|
|
570
|
+
function B(e2) {
|
|
571
|
+
if (!v(e2)) throw new TypeError("[VueTypes error]: You must provide an array as argument");
|
|
572
|
+
let t2 = false, n2 = false, r2 = [];
|
|
573
|
+
for (let i3 = 0; i3 < e2.length; i3 += 1) {
|
|
574
|
+
const o2 = e2[i3];
|
|
575
|
+
if (g(o2)) {
|
|
576
|
+
if (h(o2.validator) && (t2 = true), b(o2, "oneOf") && o2.type) {
|
|
577
|
+
r2 = r2.concat(o2.type);
|
|
578
|
+
continue;
|
|
579
|
+
}
|
|
580
|
+
if (b(o2, "nullable")) {
|
|
581
|
+
n2 = true;
|
|
582
|
+
continue;
|
|
583
|
+
}
|
|
584
|
+
if (true === o2.type || !o2.type) {
|
|
585
|
+
d('oneOfType - invalid usage of "true" and "null" as types.');
|
|
586
|
+
continue;
|
|
587
|
+
}
|
|
588
|
+
r2 = r2.concat(o2.type);
|
|
589
|
+
} else r2.push(o2);
|
|
590
|
+
}
|
|
591
|
+
r2 = r2.filter((e3, t3) => r2.indexOf(e3) === t3);
|
|
592
|
+
const i2 = false === n2 && r2.length > 0 ? r2 : null;
|
|
593
|
+
return j("oneOfType", t2 ? { type: i2, validator(t3) {
|
|
594
|
+
const n3 = [], r3 = e2.some((e3) => {
|
|
595
|
+
const r4 = m(e3, t3, true);
|
|
596
|
+
return "string" == typeof r4 && n3.push(r4), true === r4;
|
|
597
|
+
});
|
|
598
|
+
return r3 || d(`oneOfType - provided value does not match any of the ${n3.length} passed-in validators:
|
|
599
|
+
${$(n3.join("\n"))}`), r3;
|
|
600
|
+
} } : { type: i2 });
|
|
601
|
+
}
|
|
602
|
+
function F(e2) {
|
|
603
|
+
return j("arrayOf", { type: Array, validator(t2) {
|
|
604
|
+
let n2 = "";
|
|
605
|
+
const r2 = t2.every((t3) => (n2 = m(e2, t3, true), true === n2));
|
|
606
|
+
return r2 || d(`arrayOf - value validation error:
|
|
607
|
+
${$(n2)}`), r2;
|
|
608
|
+
} });
|
|
609
|
+
}
|
|
610
|
+
function Y(e2) {
|
|
611
|
+
return j("instanceOf", { type: e2 });
|
|
612
|
+
}
|
|
613
|
+
function I(e2) {
|
|
614
|
+
return j("objectOf", { type: Object, validator(t2) {
|
|
615
|
+
let n2 = "";
|
|
616
|
+
const r2 = Object.keys(t2).every((r3) => (n2 = m(e2, t2[r3], true), true === n2));
|
|
617
|
+
return r2 || d(`objectOf - value validation error:
|
|
618
|
+
${$(n2)}`), r2;
|
|
619
|
+
} });
|
|
620
|
+
}
|
|
621
|
+
function J(e2) {
|
|
622
|
+
const t2 = Object.keys(e2), n2 = t2.filter((t3) => {
|
|
623
|
+
var n3;
|
|
624
|
+
return !(null === (n3 = e2[t3]) || void 0 === n3 || !n3.required);
|
|
625
|
+
}), r2 = j("shape", { type: Object, validator(r3) {
|
|
626
|
+
if (!c(r3)) return false;
|
|
627
|
+
const i2 = Object.keys(r3);
|
|
628
|
+
if (n2.length > 0 && n2.some((e3) => -1 === i2.indexOf(e3))) {
|
|
629
|
+
const e3 = n2.filter((e4) => -1 === i2.indexOf(e4));
|
|
630
|
+
return d(1 === e3.length ? `shape - required property "${e3[0]}" is not defined.` : `shape - required properties "${e3.join('", "')}" are not defined.`), false;
|
|
631
|
+
}
|
|
632
|
+
return i2.every((n3) => {
|
|
633
|
+
if (-1 === t2.indexOf(n3)) return true === this._vueTypes_isLoose || (d(`shape - shape definition does not include a "${n3}" property. Allowed keys: "${t2.join('", "')}".`), false);
|
|
634
|
+
const i3 = m(e2[n3], r3[n3], true);
|
|
635
|
+
return "string" == typeof i3 && d(`shape - "${n3}" property validation error:
|
|
636
|
+
${$(i3)}`), true === i3;
|
|
637
|
+
});
|
|
638
|
+
} });
|
|
639
|
+
return Object.defineProperty(r2, "_vueTypes_isLoose", { writable: true, value: false }), Object.defineProperty(r2, "loose", { get() {
|
|
640
|
+
return this._vueTypes_isLoose = true, this;
|
|
641
|
+
} }), r2;
|
|
642
|
+
}
|
|
643
|
+
const M = ["name", "validate", "getter"], R = /* @__PURE__ */ ((e2) => ((e2 = class {
|
|
644
|
+
static get any() {
|
|
645
|
+
return w();
|
|
646
|
+
}
|
|
647
|
+
static get func() {
|
|
648
|
+
return x().def(this.defaults.func);
|
|
649
|
+
}
|
|
650
|
+
static get bool() {
|
|
651
|
+
return void 0 === this.defaults.bool ? P() : P().def(this.defaults.bool);
|
|
652
|
+
}
|
|
653
|
+
static get string() {
|
|
654
|
+
return A().def(this.defaults.string);
|
|
655
|
+
}
|
|
656
|
+
static get number() {
|
|
657
|
+
return E().def(this.defaults.number);
|
|
658
|
+
}
|
|
659
|
+
static get array() {
|
|
660
|
+
return S().def(this.defaults.array);
|
|
661
|
+
}
|
|
662
|
+
static get object() {
|
|
663
|
+
return N().def(this.defaults.object);
|
|
664
|
+
}
|
|
665
|
+
static get integer() {
|
|
666
|
+
return V().def(this.defaults.integer);
|
|
667
|
+
}
|
|
668
|
+
static get symbol() {
|
|
669
|
+
return q();
|
|
670
|
+
}
|
|
671
|
+
static get nullable() {
|
|
672
|
+
return k();
|
|
673
|
+
}
|
|
674
|
+
static extend(e3) {
|
|
675
|
+
if (d("VueTypes.extend is deprecated. Use the ES6+ method instead. See https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#extending-namespaced-validators-in-es6 for details."), v(e3)) return e3.forEach((e4) => this.extend(e4)), this;
|
|
676
|
+
const { name: t2, validate: r2 = false, getter: i2 = false } = e3, o2 = n(e3, M);
|
|
677
|
+
if (p(this, t2)) throw new TypeError(`[VueTypes error]: Type "${t2}" already defined`);
|
|
678
|
+
const { type: a2 } = o2;
|
|
679
|
+
if (b(a2)) return delete o2.type, Object.defineProperty(this, t2, i2 ? { get: () => T(t2, a2, o2) } : { value(...e4) {
|
|
680
|
+
const n2 = T(t2, a2, o2);
|
|
681
|
+
return n2.validator && (n2.validator = n2.validator.bind(n2, ...e4)), n2;
|
|
682
|
+
} });
|
|
683
|
+
let s2;
|
|
684
|
+
return s2 = i2 ? { get() {
|
|
685
|
+
const e4 = Object.assign({}, o2);
|
|
686
|
+
return r2 ? _(t2, e4) : j(t2, e4);
|
|
687
|
+
}, enumerable: true } : { value(...e4) {
|
|
688
|
+
const n2 = Object.assign({}, o2);
|
|
689
|
+
let i3;
|
|
690
|
+
return i3 = r2 ? _(t2, n2) : j(t2, n2), n2.validator && (i3.validator = n2.validator.bind(i3, ...e4)), i3;
|
|
691
|
+
}, enumerable: true }, Object.defineProperty(this, t2, s2);
|
|
692
|
+
}
|
|
693
|
+
}).defaults = {}, e2.sensibleDefaults = void 0, e2.config = r, e2.custom = D, e2.oneOf = L, e2.instanceOf = Y, e2.oneOfType = B, e2.arrayOf = F, e2.objectOf = I, e2.shape = J, e2.utils = { validate: (e3, t2) => true === m(t2, e3, true), toType: (e3, t2, n2 = false) => n2 ? _(e3, t2) : j(e3, t2) }, e2))();
|
|
694
|
+
function U(e2 = { func: () => {
|
|
695
|
+
}, bool: true, string: "", number: 0, array: () => [], object: () => ({}), integer: 0 }) {
|
|
696
|
+
var n2;
|
|
697
|
+
return (n2 = class extends R {
|
|
698
|
+
static get sensibleDefaults() {
|
|
699
|
+
return t({}, this.defaults);
|
|
700
|
+
}
|
|
701
|
+
static set sensibleDefaults(n3) {
|
|
702
|
+
this.defaults = false !== n3 ? t({}, true !== n3 ? n3 : e2) : {};
|
|
703
|
+
}
|
|
704
|
+
}).defaults = t({}, e2), n2;
|
|
705
|
+
}
|
|
706
|
+
class z extends U() {
|
|
707
|
+
}
|
|
708
|
+
class PropUtils {
|
|
709
|
+
/** String 类型,默认:'' */
|
|
710
|
+
static get string() {
|
|
711
|
+
return A().def("");
|
|
712
|
+
}
|
|
713
|
+
/** String 类型,默认:undefined */
|
|
714
|
+
static get looseString() {
|
|
715
|
+
return A();
|
|
716
|
+
}
|
|
717
|
+
/** Number 类型,默认:0 */
|
|
718
|
+
static get number() {
|
|
719
|
+
return E().def(0);
|
|
720
|
+
}
|
|
721
|
+
/** Number 类型,默认:undefined */
|
|
722
|
+
static get looseNumber() {
|
|
723
|
+
return E();
|
|
724
|
+
}
|
|
725
|
+
/** Boolean 类型,默认:true */
|
|
726
|
+
static get bool() {
|
|
727
|
+
return P().def(true);
|
|
728
|
+
}
|
|
729
|
+
static get looseBool() {
|
|
730
|
+
return B([]).def(void 0);
|
|
731
|
+
}
|
|
732
|
+
static get looseElement() {
|
|
733
|
+
return B([]).def(void 0);
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
__publicField(PropUtils, "objectType", N);
|
|
737
|
+
/** Array 类型,默认:[] */
|
|
738
|
+
__publicField(PropUtils, "array", () => {
|
|
739
|
+
return S().def([]);
|
|
740
|
+
});
|
|
741
|
+
/** Object 类型 */
|
|
742
|
+
__publicField(PropUtils, "object", N);
|
|
743
|
+
/** Function 类型 */
|
|
744
|
+
__publicField(PropUtils, "func", x);
|
|
745
|
+
/** 指定为数组中的值 */
|
|
746
|
+
__publicField(PropUtils, "oneOf", L);
|
|
747
|
+
/** 自定义类型 */
|
|
748
|
+
__publicField(PropUtils, "oneOfType", B);
|
|
749
|
+
/** 枚举类型 */
|
|
750
|
+
__publicField(PropUtils, "enum", A);
|
|
751
|
+
/** 任意类型 */
|
|
752
|
+
__publicField(PropUtils, "any", w);
|
|
753
|
+
function mitt(n2) {
|
|
754
|
+
return { all: n2 = n2 || /* @__PURE__ */ new Map(), on: function(t2, e) {
|
|
755
|
+
var i2 = n2.get(t2);
|
|
756
|
+
i2 ? i2.push(e) : n2.set(t2, [e]);
|
|
757
|
+
}, off: function(t2, e) {
|
|
758
|
+
var i2 = n2.get(t2);
|
|
759
|
+
i2 && (e ? i2.splice(i2.indexOf(e) >>> 0, 1) : n2.set(t2, []));
|
|
760
|
+
}, emit: function(t2, e) {
|
|
761
|
+
var i2 = n2.get(t2);
|
|
762
|
+
i2 && i2.slice().map(function(n3) {
|
|
763
|
+
n3(e);
|
|
764
|
+
}), (i2 = n2.get("*")) && i2.slice().map(function(n3) {
|
|
765
|
+
n3(t2, e);
|
|
766
|
+
});
|
|
767
|
+
} };
|
|
768
|
+
}
|
|
769
|
+
const globalKey = "__product-event-emitter-key";
|
|
770
|
+
function createEmitter() {
|
|
771
|
+
if (window[globalKey]) {
|
|
772
|
+
return window[globalKey];
|
|
773
|
+
}
|
|
774
|
+
const emitter = mitt();
|
|
775
|
+
window[globalKey] = emitter;
|
|
776
|
+
return emitter;
|
|
777
|
+
}
|
|
778
|
+
const useEventBusListener = (event, callback) => {
|
|
779
|
+
const { getEmitter } = useGlobalInject();
|
|
780
|
+
onMounted(() => {
|
|
781
|
+
getEmitter().on(event, callback);
|
|
782
|
+
});
|
|
783
|
+
onBeforeUnmount(() => {
|
|
784
|
+
getEmitter().off(event, callback);
|
|
785
|
+
});
|
|
786
|
+
};
|
|
787
|
+
var LangType = /* @__PURE__ */ ((LangType2) => {
|
|
788
|
+
LangType2["ZH_CN"] = "zh_CN";
|
|
789
|
+
LangType2["ZH_TW"] = "zh_TW";
|
|
790
|
+
LangType2["English"] = "en";
|
|
791
|
+
LangType2["Japanese"] = "ja";
|
|
792
|
+
LangType2["Korean"] = "ko";
|
|
793
|
+
LangType2["Russian"] = "ru";
|
|
794
|
+
return LangType2;
|
|
795
|
+
})(LangType || {});
|
|
796
|
+
const ProductInjectKey = "interactGlobalConfigV2";
|
|
797
|
+
const useGlobalInject = () => {
|
|
798
|
+
const injectData = inject(ProductInjectKey, {
|
|
799
|
+
globalLang: LangType.ZH_CN
|
|
800
|
+
});
|
|
801
|
+
const toast = (msg) => {
|
|
802
|
+
if (injectData.toast) {
|
|
803
|
+
injectData.toast(msg);
|
|
804
|
+
}
|
|
805
|
+
};
|
|
806
|
+
function getEmitter() {
|
|
807
|
+
if (injectData.getEmitter) {
|
|
808
|
+
return injectData.getEmitter();
|
|
809
|
+
}
|
|
810
|
+
return createEmitter();
|
|
811
|
+
}
|
|
812
|
+
const messageBox = (options) => {
|
|
813
|
+
if (injectData.messageBox) {
|
|
814
|
+
return injectData.messageBox(options);
|
|
815
|
+
}
|
|
816
|
+
return Promise.resolve(false);
|
|
817
|
+
};
|
|
818
|
+
return {
|
|
819
|
+
injectData,
|
|
820
|
+
toast,
|
|
821
|
+
getEmitter,
|
|
822
|
+
messageBox
|
|
823
|
+
};
|
|
824
|
+
};
|
|
825
|
+
const productEvents = {
|
|
826
|
+
/**
|
|
827
|
+
* 打开订单详情弹层
|
|
828
|
+
*/
|
|
829
|
+
OpenProductOrderDetailPopup: "openProductOrderDetailPopup",
|
|
830
|
+
/**
|
|
831
|
+
* 刷新订单列表状态
|
|
832
|
+
*/
|
|
833
|
+
RefreshProductOrderListStatus: "refreshProductOrderListStatus",
|
|
834
|
+
/**
|
|
835
|
+
* 刷新订单详情状态
|
|
836
|
+
*/
|
|
837
|
+
RefreshProductOrderDetailStatus: "refreshProductOrderDetailStatus"
|
|
838
|
+
};
|
|
839
|
+
const order$5 = { "title": "订单中心", "chooseAddress": "请添加收货地址", "add": "去添加", "phone": "手机号码:", "phonePlaceholder": "请输入手机号码", "submitOrder": "提交订单", "addAddress": "添加地址", "applyRefund": "申请退款", "refundTips": "退款金额 ", "confirmRefund": "退款", "refundFailed": "退款失败", "failed": "发起失败", "list": { "all": "全部", "waitPay": "待支付", "waitDelivery": "待发货", "delivering": "待收货", "finish": "已完成", "close": "已取消", "refunding": "退款中", "refunded": "已退款", "total": "合计", "waitPayBtnText": "立即支付", "waitDeliveryBtnText": "查看详情", "deliveringBtnText": "确认收货", "finishBtnText": "查看详情", "closeBtnText": "查看详情", "emptyText": "暂无订单" }, "detail": { "orderNo": "订单号", "createTime": "下单时间", "payTime": "支付时间", "deliveryTime": "发货时间", "finishTime": "完成时间", "actualPay": "实付", "payNow": "立即支付", "confirmReceipt": "确认收货", "expired": "已失效", "payAutoCancel": " 后自动取消", "cancelReason": "取消原因", "payTimeOut": "超时未支付", "refundTips": "退款金额原路返回", "qrCodeTips": "长按识别或截图保存,联系客服", "qrCodeExpiredTips": "二维码已失效,暂时无法联系客服", "paymentMethod": "支付方式", "wechat": "微信", "alipay": "支付宝" }, "confirmOrder": "确认订单", "shippingAddress": "收货地址", "noAddressTips": "请填写收货地址", "paySuccess": "支付成功", "cancelPay": "取消支付", "payFailed": "支付失败", "createOrderFailed": "无法创建订单,请稍后重试", "wechatPayTips": "请在微信中打开本页进行支付", "confirmReceiptTips": "请确认已经收到包裹", "confirmedReceipt": "已确认收货" };
|
|
840
|
+
const addressEdit$5 = { "name": "联系人", "namePlaceholder": "请填写联系人姓名", "choiceAddress": "选择地区", "addressPlaceholder": "请选择地区", "phone": "手机号码", "phonePlaceholder": "请填写手机号码", "phoneError": "请输入正确的手机号", "addressDetail": "详细地址", "addressDetailPlaceholder": "请填写详细地址", "error": "请完善信息", "submit": "保存", "deleteConfirm": "确定要删除该地址吗?", "addAddress": "添加地址", "editAddress": "修改地址", "deleteAddress": "删除地址", "addSuccess": "保存成功", "addError": "保存失败", "editSuccess": "修改成功", "editError": "修改失败" };
|
|
841
|
+
const zhCNLang = {
|
|
842
|
+
"common.confirm": "确认",
|
|
843
|
+
"common.cancel": "取消",
|
|
844
|
+
"common.delete": "删除",
|
|
845
|
+
"common.edit": "修改",
|
|
846
|
+
"common.submitSuccess": "提交成功",
|
|
847
|
+
"product.button.normal": "去购买",
|
|
848
|
+
"product.button.finance": "立即了解",
|
|
849
|
+
"product.button.position": "投递简历",
|
|
850
|
+
"product.all": "全部",
|
|
851
|
+
"product.searchPlaceholder": "输入商品名称搜索",
|
|
852
|
+
"product.explaining": "讲解中",
|
|
853
|
+
"product.watchExplain": "看讲解",
|
|
854
|
+
"product.notExplained": "待讲解",
|
|
855
|
+
"product.detail.title": "商品详情",
|
|
856
|
+
"product.detail.video": "视频",
|
|
857
|
+
"product.detail.image": "图片",
|
|
858
|
+
"product.detail.job": "职位详情",
|
|
859
|
+
"product.price.free": "免费",
|
|
860
|
+
"product.empty": "暂无内容",
|
|
861
|
+
"product.price.hidden": "待开价",
|
|
862
|
+
"product.order": "订单",
|
|
863
|
+
"product.num": "数量",
|
|
864
|
+
"product.disableBuy": "暂不支持购买",
|
|
865
|
+
"product.allProduct": "全部商品",
|
|
866
|
+
"product.stock.soldOut": "已抢光",
|
|
867
|
+
order: order$5,
|
|
868
|
+
addressEdit: addressEdit$5
|
|
869
|
+
};
|
|
870
|
+
const order$4 = { "title": "訂單中心", "chooseAddress": "請添加收貨地址", "add": "去添加", "phone": "手機號碼:", "phonePlaceholder": "請輸入手機號碼", "submitOrder": "提交訂單", "addAddress": "添加地址", "applyRefund": "申請退款", "refundTips": "退款金額 ", "confirmRefund": "退款", "refundFailed": "退款失敗", "failed": "发起失敗", "list": { "all": "全部", "waitPay": "待支付", "waitDelivery": "待發貨", "delivering": "待收貨", "finish": "已完成", "close": "已取消", "refunding": "退款中", "refunded": "已退款", "total": "合計", "waitPayBtnText": "立即支付", "waitDeliveryBtnText": "查看詳情", "deliveringBtnText": "確認收貨", "finishBtnText": "查看詳情", "closeBtnText": "查看詳情", "emptyText": "暫無訂單" }, "detail": { "orderNo": "訂單號", "createTime": "下單時間", "payTime": "支付時間", "deliveryTime": "發貨時間", "finishTime": "完成時間", "actualPay": "實付", "payNow": "立即支付", "confirmReceipt": "確認收貨", "expired": "已失效", "payAutoCancel": " 後自動取消", "cancelReason": "取消原因", "payTimeOut": "超時未支付", "refundTips": "退款金額原路返回", "qrCodeTips": "長按識別或截圖保存,聯繫客服", "qrCodeExpiredTips": "二維碼已失效,暫時無法聯繫客服", "paymentMethod": "支付方式", "wechat": "微信", "alipay": "支付寶" }, "confirmOrder": "確認訂單", "shippingAddress": "收貨地址", "noAddressTips": "請填寫收貨地址", "paySuccess": "支付成功", "payFailed": "支付失敗", "cancelPay": "取消支付", "createOrderFailed": "無法創建訂單,請稍後重試", "wechatPayTips": "請在微信中打開本頁進行支付", "confirmReceiptTips": "請確認已經收到包裹", "confirmedReceipt": "已確認收貨" };
|
|
871
|
+
const addressEdit$4 = { "name": "聯絡人", "namePlaceholder": "請填寫聯絡人", "choiceAddress": "選擇地區", "addressPlaceholder": "請選擇地區", "phone": "手機號碼", "phonePlaceholder": "請填寫手機號碼", "phoneError": "請輸入正確的手機號", "addressDetail": "詳細地址", "addressDetailPlaceholder": "請填寫詳細地址", "error": "請完善信息", "submit": "保存", "deleteConfirm": "確定要刪除該地址嗎?", "deleteAddress": "刪除地址", "addAddress": "添加地址", "editAddress": "修改地址", "addSuccess": "保存成功", "addError": "保存失敗", "editSuccess": "修改成功", "editError": "修改失敗" };
|
|
872
|
+
const zhTWLang = {
|
|
873
|
+
"common.confirm": "確認",
|
|
874
|
+
"common.cancel": "取消",
|
|
875
|
+
"common.delete": "刪除",
|
|
876
|
+
"common.edit": "修改",
|
|
877
|
+
"common.submitSuccess": "提交成功",
|
|
878
|
+
"product.button.normal": "去購買",
|
|
879
|
+
"product.button.finance": "立即瞭解",
|
|
880
|
+
"product.button.position": "投遞簡歷",
|
|
881
|
+
"product.all": "全部",
|
|
882
|
+
"product.searchPlaceholder": "輸入商品名稱搜索",
|
|
883
|
+
"product.explaining": "講解中",
|
|
884
|
+
"product.watchExplain": "看講解",
|
|
885
|
+
"product.notExplained": "待講解",
|
|
886
|
+
"product.detail.title": "商品詳情",
|
|
887
|
+
"product.detail.video": "視頻",
|
|
888
|
+
"product.detail.image": "圖片",
|
|
889
|
+
"product.detail.job": "職位詳情",
|
|
890
|
+
"product.price.free": "免費",
|
|
891
|
+
"product.empty": "暫無內容",
|
|
892
|
+
"product.price.hidden": "待開價",
|
|
893
|
+
"product.order": "訂單",
|
|
894
|
+
"product.num": "數量",
|
|
895
|
+
"product.disableBuy": "暫不支持購買",
|
|
896
|
+
"product.allProduct": "全部商品",
|
|
897
|
+
"product.stock.soldOut": "已搶光",
|
|
898
|
+
order: order$4,
|
|
899
|
+
addressEdit: addressEdit$4
|
|
900
|
+
};
|
|
901
|
+
const order$3 = { "title": "Order Center", "chooseAddress": "Add Shipping Address", "add": "Add Shipping Address", "phone": "Phone:", "phonePlaceholder": "Enter Phone", "submitOrder": "Submit", "addAddress": "Add Address", "applyRefund": "Apply Refund", "refundTips": "Refund Amount ", "confirmRefund": "Refund", "refundFailed": "Refund Failed", "failed": "Failed", "list": { "all": "All", "waitPay": "Wait Payment", "waitDelivery": "Wait Delivery", "delivering": "Delivering", "finish": "Finished", "close": "Closed", "refunding": "Refunding", "refunded": "Refunded", "total": "Total", "waitPayBtnText": "Pay Now", "waitDeliveryBtnText": "View Details", "deliveringBtnText": "Confirm Receipt", "finishBtnText": "View Details", "closeBtnText": "View Details", "emptyText": "No Order History" }, "detail": { "orderNo": "Order Number", "createTime": "Order Time", "payTime": "Payment Time", "deliveryTime": "Delivery Time", "finishTime": "Completion Time", "actualPay": "Total Amount", "payNow": "Pay Now", "confirmReceipt": "Confirm Receipt", "expired": "Expired", "payAutoCancel": "Cancel", "cancelReason": "Cancel Reason", "payTimeOut": "Pay Time Out", "refundTips": "Refund amount returned to the original path", "qrCodeTips": "Long press to scan or save screenshot for support", "qrCodeExpiredTips": "QR code expired, support unavailable", "paymentMethod": "Payment Method", "wechat": "Wechat", "alipay": "Alipay" }, "confirmOrder": "Confirm Order", "shippingAddress": "Shipping Address", "noAddressTips": "Please fill in the shipping address", "paySuccess": "Payment Success", "cancelPay": "Cancel Payment", "payFailed": "Payment Failed", "createOrderFailed": "Failed to create order, please try again later", "wechatPayTips": "Please open this page in WeChat to pay", "confirmReceiptTips": "Have you received the package?", "confirmedReceipt": "Confirmed Receipt" };
|
|
902
|
+
const addressEdit$3 = { "name": "Name", "namePlaceholder": "Enter Name", "choiceAddress": "Select Area", "addressPlaceholder": "Select Area", "phone": "Phone", "phonePlaceholder": "Enter Phone", "phoneError": "Please enter a valid phone number", "addressDetail": "Address Detail", "addressDetailPlaceholder": "Enter Address Detail", "error": "Please fill in all required fields", "submit": "Save", "deleteConfirm": "Delete this address?", "deleteAddress": "Yes", "addAddress": "Add Address", "editAddress": "Edit Address", "addSuccess": "Save Success", "addError": "Save Failed", "editSuccess": "Edit Success", "editError": "Edit Failed" };
|
|
903
|
+
const enLang = {
|
|
904
|
+
"common.confirm": "Confirm",
|
|
905
|
+
"common.cancel": "Cancel",
|
|
906
|
+
"common.delete": "Delete",
|
|
907
|
+
"common.edit": "Edit",
|
|
908
|
+
"common.submitSuccess": "Submit Success",
|
|
909
|
+
"product.button.normal": "Buy Now",
|
|
910
|
+
"product.button.finance": "Learn More",
|
|
911
|
+
"product.button.position": "Submit Resume",
|
|
912
|
+
"product.all": "All",
|
|
913
|
+
"product.searchPlaceholder": "Search by product name",
|
|
914
|
+
"product.explaining": "Explaining",
|
|
915
|
+
"product.watchExplain": "Watch Now",
|
|
916
|
+
"product.notExplained": "Pending",
|
|
917
|
+
"product.detail.title": "Product Details",
|
|
918
|
+
"product.detail.video": "Video",
|
|
919
|
+
"product.detail.image": "Image",
|
|
920
|
+
"product.detail.job": "Job Details",
|
|
921
|
+
"product.price.free": "Free",
|
|
922
|
+
"product.empty": "No Content",
|
|
923
|
+
"product.price.hidden": "Pending Price",
|
|
924
|
+
"product.order": "Order",
|
|
925
|
+
"product.num": "Quantity",
|
|
926
|
+
"product.disableBuy": "Purchase not supported",
|
|
927
|
+
"product.allProduct": "Products",
|
|
928
|
+
"product.stock.soldOut": "Sold Out",
|
|
929
|
+
order: order$3,
|
|
930
|
+
addressEdit: addressEdit$3
|
|
931
|
+
};
|
|
932
|
+
const order$2 = { "title": "注文中心", "chooseAddress": "配送先を追加", "add": "配送先を追加", "phone": "電話番号:", "phonePlaceholder": "電話番号を入力", "submitOrder": "注文を提出", "addAddress": "配送先を追加", "applyRefund": "退款申請", "refundTips": "退款金額 ", "confirmRefund": "退款", "refundFailed": "退款失敗", "failed": "失敗", "list": { "all": "全て", "waitPay": "支払い待ち", "waitDelivery": "発送待ち", "delivering": "配送中", "finish": "完了", "close": "キャンセル", "refunding": "退款中", "refunded": "退款完了", "total": "合計", "waitPayBtnText": "支払い", "waitDeliveryBtnText": "詳細を見る", "deliveringBtnText": "確認受け取り", "finishBtnText": "詳細を見る", "closeBtnText": "詳細を見る", "emptyText": "注文履歴がありません" }, "detail": { "orderNo": "注文番号", "createTime": "注文日時", "payTime": "支払い日時", "deliveryTime": "発送日時", "finishTime": "完了日時", "actualPay": "実払い", "payNow": "支払い", "confirmReceipt": "確認受け取り", "expired": "失効", "payAutoCancel": " 後自動キャンセル", "cancelReason": "キャンセル理由", "payTimeOut": "超時未支払い", "refundTips": "退款金額原路返回", "qrCodeTips": "長押し識別またはスクリーンショット保存、サポートにお問い合わせください", "qrCodeExpiredTips": "QRコードは失効しました。暫時的にサポートに連絡できません", "paymentMethod": "支払い方法", "wechat": "ウェブアプリ", "alipay": "アリペイ" }, "confirmOrder": "注文を確認", "shippingAddress": "配送先", "noAddressTips": "配送先を入力してください", "paySuccess": "支払い成功", "cancelPay": "支払いをキャンセル", "payFailed": "支払い失敗", "createOrderFailed": "注文の作成に失敗しました。後で再試行してください。", "wechatPayTips": "WeChatでこのページを開いて支払いしてください", "confirmReceiptTips": "パッケージを確認しましたか?", "confirmedReceipt": "確認受け取り完了" };
|
|
933
|
+
const addressEdit$2 = { "name": "連絡先", "namePlaceholder": "連絡先を入力", "choiceAddress": "地域を選択", "addressPlaceholder": "地域を選択", "phone": "電話番号", "phonePlaceholder": "電話番号を入力", "phoneError": "正しい電話番号を入力してください", "addressDetail": "詳細住所", "addressDetailPlaceholder": "詳細住所を入力", "error": "情報を入力してください", "submit": "保存", "deleteConfirm": "この住所を削除しますか?", "deleteAddress": "住所を削除", "addAddress": "住所を追加", "editAddress": "住所を編集", "addSuccess": "保存成功", "addError": "保存失敗", "editSuccess": "編集成功", "editError": "編集失敗" };
|
|
934
|
+
const jaLang = {
|
|
935
|
+
"common.confirm": "確認",
|
|
936
|
+
"common.cancel": "キャンセル",
|
|
937
|
+
"common.delete": "削除",
|
|
938
|
+
"common.edit": "編集",
|
|
939
|
+
"common.submitSuccess": "提出成功",
|
|
940
|
+
"product.button.normal": "購入する",
|
|
941
|
+
"product.button.finance": "今すぐ詳細を見る",
|
|
942
|
+
"product.button.position": "履歴書を送信",
|
|
943
|
+
"product.all": "すべて",
|
|
944
|
+
"product.searchPlaceholder": "商品名を検索",
|
|
945
|
+
"product.explaining": "解説中",
|
|
946
|
+
"product.watchExplain": "解説を見る",
|
|
947
|
+
"product.notExplained": "解説なし",
|
|
948
|
+
"product.detail.title": "商品詳細",
|
|
949
|
+
"product.detail.video": "ビデオ",
|
|
950
|
+
"product.detail.image": "画像",
|
|
951
|
+
"product.detail.job": "職務詳細",
|
|
952
|
+
"product.price.free": "無料",
|
|
953
|
+
"product.empty": "内容なし",
|
|
954
|
+
"product.price.hidden": "価格非公開",
|
|
955
|
+
"product.order": "注文",
|
|
956
|
+
"product.num": "数量",
|
|
957
|
+
"product.disableBuy": "購入不可",
|
|
958
|
+
"product.allProduct": "すべての商品",
|
|
959
|
+
"product.stock.soldOut": "売り切れ",
|
|
960
|
+
order: order$2,
|
|
961
|
+
addressEdit: addressEdit$2
|
|
962
|
+
};
|
|
963
|
+
const order$1 = { "title": "주문 센터", "chooseAddress": "주문 주소 추가", "add": "주문 주소 추가", "phone": "전화번호:", "phonePlaceholder": "전화번호 입력", "submitOrder": "주문 제출", "addAddress": "주문 주소 추가", "applyRefund": "환불 신청", "refundTips": "환불 금액 ", "confirmRefund": "환불", "refundFailed": "환불 실패", "failed": "실패", "list": { "all": "전체", "waitPay": "결제 대기", "waitDelivery": "배송 대기", "delivering": "배송 중", "finish": "완료", "close": "취소", "refunding": "환불 중", "refunded": "환불 완료", "total": "총 금액", "waitPayBtnText": "결제하기", "waitDeliveryBtnText": "상세 보기", "deliveringBtnText": "확인 받기", "finishBtnText": "상세 보기", "closeBtnText": "상세 보기", "emptyText": "주문 내역이 없습니다." }, "detail": { "orderNo": "주문번호", "createTime": "주문일시", "payTime": "결제일시", "deliveryTime": "배송일시", "finishTime": "완료일시", "actualPay": "총 금액", "payNow": "결제하기", "confirmReceipt": "확인 받기", "expired": "만료", "payAutoCancel": " 후 자동 취소", "cancelReason": "취소 사유", "payTimeOut": "결제 시간 초과", "refundTips": "환불 금액 원래 경로로 반환", "qrCodeTips": "장치 인식 또는 스크린샷 저장 후 문의", "qrCodeExpiredTips": "이미 만료되었습니다. 잠시 후 다시 시도해주세요.", "paymentMethod": "결제 방법", "wechat": "웹앱", "alipay": "알리페이" }, "confirmOrder": "주문 확인", "shippingAddress": "배송 주소", "noAddressTips": "배송 주소를 입력해주세요", "paySuccess": "결제 성공", "cancelPay": "결제 취소", "payFailed": "결제 실패", "createOrderFailed": "주문 생성에 실패했습니다. 나중에 다시 시도해주세요.", "wechatPayTips": "카카오톡에서 이 페이지를 열어 결제해주세요", "confirmReceiptTips": "패키지를 확인하셨습니까?", "confirmedReceipt": "확인 받기 완료" };
|
|
964
|
+
const addressEdit$1 = { "name": "연락처", "namePlaceholder": "연락처 입력", "choiceAddress": "지역 선택", "addressPlaceholder": "지역 선택", "phone": "전화번호", "phonePlaceholder": "전화번호 입력", "phoneError": "올바른 전화번호를 입력해주세요", "addressDetail": "상세 주소", "addressDetailPlaceholder": "상세 주소 입력", "error": "정보를 입력해주세요.", "submit": "저장", "deleteConfirm": "주소를 삭제하시겠습니까?", "deleteAddress": "주소 삭제", "addAddress": "주소 추가", "editAddress": "주소 수정", "addSuccess": "저장 성공", "addError": "저장 실패", "editSuccess": "수정 성공", "editError": "수정 실패" };
|
|
965
|
+
const koLang = {
|
|
966
|
+
"common.confirm": "확인",
|
|
967
|
+
"common.cancel": "취소",
|
|
968
|
+
"common.delete": "삭제",
|
|
969
|
+
"common.edit": "수정",
|
|
970
|
+
"common.submitSuccess": "제출 성공",
|
|
971
|
+
"product.button.normal": "구매하기",
|
|
972
|
+
"product.button.finance": "지금 알아보기",
|
|
973
|
+
"product.button.position": "이력서 제출",
|
|
974
|
+
"product.all": "모든",
|
|
975
|
+
"product.searchPlaceholder": "상품 이름 검색",
|
|
976
|
+
"product.explaining": "설명중",
|
|
977
|
+
"product.watchExplain": "설명 보기",
|
|
978
|
+
"product.notExplained": "설명 없음",
|
|
979
|
+
"product.detail.title": "상품 상세",
|
|
980
|
+
"product.detail.video": "비디오",
|
|
981
|
+
"product.detail.image": "이미지",
|
|
982
|
+
"product.detail.job": "직무 상세",
|
|
983
|
+
"product.price.free": "무료",
|
|
984
|
+
"product.empty": "내용 없음",
|
|
985
|
+
"product.price.hidden": "가격 미공개",
|
|
986
|
+
"product.order": "주문",
|
|
987
|
+
"product.num": "수량",
|
|
988
|
+
"product.disableBuy": "구매 불가",
|
|
989
|
+
"product.allProduct": "모든 상품",
|
|
990
|
+
"product.stock.soldOut": "품절",
|
|
991
|
+
order: order$1,
|
|
992
|
+
addressEdit: addressEdit$1
|
|
993
|
+
};
|
|
994
|
+
const order = { "title": "Центр заказов", "chooseAddress": "Пожалуйста, добавьте адрес доставки", "add": "Добавить", "phone": "Номер телефона:", "phonePlaceholder": "Пожалуйста, введите номер телефона", "submitOrder": "Отправить заказ", "addAddress": "Добавить адрес", "applyRefund": "Заявить о возврате", "refundTips": "Сумма возврата ", "confirmRefund": "Возврат", "refundFailed": "Возврат не удался", "failed": "Не удалось инициировать", "list": { "all": "Все", "waitPay": "Ожидает оплаты", "waitDelivery": "Ожидает отправки", "delivering": "Ожидает получения", "finish": "Завершено", "close": "Отменено", "refunding": "В процессе возврата", "refunded": "Возвращено", "total": "Итого", "waitPayBtnText": "Оплатить сейчас", "waitDeliveryBtnText": "Посмотреть детали", "deliveringBtnText": "Подтвердить получение", "finishBtnText": "Посмотреть детали", "closeBtnText": "Посмотреть детали", "emptyText": "Пока нет заказов" }, "detail": { "orderNo": "Номер заказа", "createTime": "Время создания заказа", "payTime": "Время оплаты", "deliveryTime": "Время отправки", "finishTime": "Время завершения", "actualPay": "Фактически оплачено", "payNow": "Оплатить сейчас", "confirmReceipt": "Подтвердить получение", "expired": "Истек срок действия", "payAutoCancel": " автоматическая отмена", "cancelReason": "Причина отмены", "payTimeOut": "Время оплаты истекло", "refundTips": "Сумма возврата вернется тем же способом", "qrCodeTips": "Долго нажмите для распознавания или сохраните скриншот, свяжитесь с сервисом", "qrCodeExpiredTips": "QR-код истек, временно невозможно связаться с сервисом", "paymentMethod": "Способ оплаты", "wechat": "Веб-приложение", "alipay": "АлиПай" }, "confirmOrder": "Подтвердить заказ", "shippingAddress": "Адрес доставки", "noAddressTips": "Пожалуйста, заполните адрес доставки", "paySuccess": "Оплата успешна", "cancelPay": "Отменить оплату", "payFailed": "Оплата не удалась", "createOrderFailed": "Не удается создать заказ, попробуйте позже", "wechatPayTips": "Пожалуйста, откройте эту страницу в WeChat для оплаты", "confirmReceiptTips": "Пожалуйста, подтвердите, что посылка получена", "confirmedReceipt": "Получение подтверждено" };
|
|
995
|
+
const addressEdit = { "name": "Контактное лицо", "namePlaceholder": "Пожалуйста, введите имя контактного лица", "choiceAddress": "Выберите регион", "addressPlaceholder": "Пожалуйста, выберите регион", "phone": "Номер телефона", "phonePlaceholder": "Пожалуйста, введите номер телефона", "phoneError": "Пожалуйста, введите правильный номер телефона", "addressDetail": "Подробный адрес", "addressDetailPlaceholder": "Пожалуйста, заполните подробный адрес", "error": "Пожалуйста, дополните информацию", "submit": "Сохранить", "deleteConfirm": "Вы уверены, что хотите удалить этот адрес?", "addAddress": "Добавить адрес", "editAddress": "Изменить адрес", "deleteAddress": "Удалить адрес", "addSuccess": "Успешно сохранено", "addError": "Не удалось сохранить", "editSuccess": "Успешно изменено", "editError": "Не удалось изменить" };
|
|
996
|
+
const ruLang = {
|
|
997
|
+
"common.confirm": "Подтвердить",
|
|
998
|
+
"common.cancel": "Отмена",
|
|
999
|
+
"common.delete": "Удалить",
|
|
1000
|
+
"common.edit": "Изменить",
|
|
1001
|
+
"common.submitSuccess": "Успешно отправлено",
|
|
1002
|
+
"product.button.normal": "Купить",
|
|
1003
|
+
"product.button.finance": "Узнать подробнее",
|
|
1004
|
+
"product.button.position": "Подать резюме",
|
|
1005
|
+
"product.all": "Все",
|
|
1006
|
+
"product.searchPlaceholder": "Введите название товара для поиска",
|
|
1007
|
+
"product.explaining": "В процессе объяснения",
|
|
1008
|
+
"product.watchExplain": "Посмотреть объяснение",
|
|
1009
|
+
"product.notExplained": "Ожидает объяснения",
|
|
1010
|
+
"product.detail.title": "Детали товара",
|
|
1011
|
+
"product.detail.video": "Видео",
|
|
1012
|
+
"product.detail.image": "Изображение",
|
|
1013
|
+
"product.detail.job": "Детали вакансии",
|
|
1014
|
+
"product.price.free": "Бесплатно",
|
|
1015
|
+
"product.empty": "Пока нет содержимого",
|
|
1016
|
+
"product.price.hidden": "Цена уточняется",
|
|
1017
|
+
"product.order": "Заказ",
|
|
1018
|
+
"product.num": "Количество",
|
|
1019
|
+
"product.disableBuy": "Покупка временно недоступна",
|
|
1020
|
+
"product.allProduct": "Все товары",
|
|
1021
|
+
"product.stock.soldOut": "Распродано",
|
|
1022
|
+
order,
|
|
1023
|
+
addressEdit
|
|
1024
|
+
};
|
|
1025
|
+
const fullI18nData = {
|
|
1026
|
+
[LangType.ZH_CN]: zhCNLang,
|
|
1027
|
+
[LangType.ZH_TW]: zhTWLang,
|
|
1028
|
+
[LangType.English]: enLang,
|
|
1029
|
+
[LangType.Japanese]: jaLang,
|
|
1030
|
+
[LangType.Korean]: koLang,
|
|
1031
|
+
[LangType.Russian]: ruLang
|
|
1032
|
+
};
|
|
1033
|
+
const useI18n = () => {
|
|
1034
|
+
const { injectData } = useGlobalInject();
|
|
1035
|
+
const langValueToKeyMap = {
|
|
1036
|
+
"zh_CN": LangType.ZH_CN,
|
|
1037
|
+
"zh_TW": LangType.ZH_TW,
|
|
1038
|
+
"en": LangType.English,
|
|
1039
|
+
"ja": LangType.Japanese,
|
|
1040
|
+
"ko": LangType.Korean,
|
|
1041
|
+
"ru": LangType.Russian
|
|
1042
|
+
};
|
|
1043
|
+
const currentLang = computed(() => {
|
|
1044
|
+
const injectedLang = injectData.globalLang || LangType.ZH_CN;
|
|
1045
|
+
if (typeof injectedLang === "string" && langValueToKeyMap[injectedLang]) {
|
|
1046
|
+
const mappedLang = langValueToKeyMap[injectedLang];
|
|
1047
|
+
return mappedLang;
|
|
1048
|
+
}
|
|
1049
|
+
return injectedLang;
|
|
1050
|
+
});
|
|
1051
|
+
const currentLangData = computed(() => {
|
|
1052
|
+
const langKey = currentLang.value;
|
|
1053
|
+
const data = fullI18nData[langKey];
|
|
1054
|
+
if (!data) {
|
|
1055
|
+
console.warn(`Language data not found for: ${langKey}, falling back to zh_CN`);
|
|
1056
|
+
return fullI18nData[LangType.ZH_CN];
|
|
1057
|
+
}
|
|
1058
|
+
return data;
|
|
1059
|
+
});
|
|
1060
|
+
const isZhCN = computed(() => {
|
|
1061
|
+
const lang = currentLang.value;
|
|
1062
|
+
return lang === LangType.ZH_CN || lang === LangType.ZH_TW;
|
|
1063
|
+
});
|
|
1064
|
+
function replace(key, value, str) {
|
|
1065
|
+
return str.replace(new RegExp("\\{" + key + "}", "g"), value);
|
|
1066
|
+
}
|
|
1067
|
+
function $t(key, options = {}) {
|
|
1068
|
+
const langData = currentLangData.value;
|
|
1069
|
+
let text = get(langData, key);
|
|
1070
|
+
if (text === void 0 || typeof text !== "string") {
|
|
1071
|
+
console.warn(`Translation key not found: ${key}, current lang: ${currentLang.value}`);
|
|
1072
|
+
return key;
|
|
1073
|
+
}
|
|
1074
|
+
if (options) {
|
|
1075
|
+
const optionKeys = Object.keys(options);
|
|
1076
|
+
for (const optKey of optionKeys) {
|
|
1077
|
+
const value = options[optKey].toString();
|
|
1078
|
+
text = replace(optKey, value, text);
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
return text;
|
|
1082
|
+
}
|
|
1083
|
+
return {
|
|
1084
|
+
currentLang,
|
|
1085
|
+
isZhCN,
|
|
1086
|
+
$t
|
|
1087
|
+
};
|
|
1088
|
+
};
|
|
1089
|
+
function canMatchKeywords(e, t2) {
|
|
1090
|
+
e = e.toLowerCase();
|
|
1091
|
+
const n2 = /[/\s;_-]/, s2 = /[/\s;_-]/;
|
|
1092
|
+
return t2.some((t3) => {
|
|
1093
|
+
const o2 = e.indexOf(t3.toLowerCase());
|
|
1094
|
+
if (-1 !== o2 && (n2.test(e[o2 - 1]) || 0 === o2) && (s2.test(e[o2 + t3.length]) || o2 + t3.length >= e.length)) return true;
|
|
1095
|
+
});
|
|
1096
|
+
}
|
|
1097
|
+
function canMatchModelRule(e, t2) {
|
|
1098
|
+
return !!/;\s*([^;)]*?)(?:\s+Build\/[^;)]+)?(?:;(?:\s*wv)?)?\)/.test(e) && t2.test(RegExp.$1);
|
|
1099
|
+
}
|
|
1100
|
+
function execRules(e, t2) {
|
|
1101
|
+
let n2;
|
|
1102
|
+
return t2.some((t3) => {
|
|
1103
|
+
let s2, o2 = false;
|
|
1104
|
+
return t3.regExp ? (o2 = t3.regExp.test(e), o2 && (s2 = RegExp.$1)) : t3.keywords ? o2 = canMatchKeywords(e, t3.keywords) : t3.modelRegExp && (o2 = canMatchModelRule(e, t3.modelRegExp)), o2 && (n2 = { name: t3.name, version: s2 }), o2;
|
|
1105
|
+
}), n2;
|
|
1106
|
+
}
|
|
1107
|
+
const osRules = [{ name: "windows", regExp: /\bWindows\s?NT\s?(([\d.]+))\b/ }, { name: "ios", regExp: /\bOS(?:\s([\d_.]+))?\slike\sMac\sOS\sX\b/ }, { name: "macos", regExp: /\bMac\sOS\sX(?:\s([\d_.]+))?/ }, { name: "openharmony", regExp: /\bOpenHarmony\s([\d.]+)\b/ }, { name: "android", regExp: /\bAndroid;?(?:[-/\s]([\d.]+))?(?:\b|_)/ }, { name: "android", regExp: /\bAdr\s([\d.]+)(?:\b|_)/ }];
|
|
1108
|
+
function compareVersions(r2, e) {
|
|
1109
|
+
const t2 = /(\.0+)+$/, n2 = String(r2).replace(t2, "").split("."), s2 = String(e).replace(t2, "").split("."), i2 = Math.min(n2.length, s2.length);
|
|
1110
|
+
for (let r3 = 0; r3 < i2; r3++) {
|
|
1111
|
+
const e2 = parseInt(n2[r3]) - parseInt(s2[r3]);
|
|
1112
|
+
if (e2) return e2;
|
|
1113
|
+
}
|
|
1114
|
+
return n2.length - s2.length;
|
|
1115
|
+
}
|
|
1116
|
+
class Version {
|
|
1117
|
+
constructor(r2) {
|
|
1118
|
+
this._ver = (r2 || "").replace(/_/g, ".").replace(/\.+$/, ""), Object.freeze(this);
|
|
1119
|
+
}
|
|
1120
|
+
_compare(r2, e) {
|
|
1121
|
+
if (!this._ver || !r2) return false;
|
|
1122
|
+
const t2 = Array.isArray(e) ? e : [e], n2 = compareVersions(this._ver, r2);
|
|
1123
|
+
return t2.some(function(r3) {
|
|
1124
|
+
return n2 * r3 > 0 || 0 === n2 && 0 === r3;
|
|
1125
|
+
});
|
|
1126
|
+
}
|
|
1127
|
+
gt(r2) {
|
|
1128
|
+
return this._compare(r2, 1);
|
|
1129
|
+
}
|
|
1130
|
+
gte(r2) {
|
|
1131
|
+
return this._compare(r2, [1, 0]);
|
|
1132
|
+
}
|
|
1133
|
+
lt(r2) {
|
|
1134
|
+
return this._compare(r2, -1);
|
|
1135
|
+
}
|
|
1136
|
+
lte(r2) {
|
|
1137
|
+
return this._compare(r2, [-1, 0]);
|
|
1138
|
+
}
|
|
1139
|
+
eq(r2) {
|
|
1140
|
+
return this._compare(r2, 0);
|
|
1141
|
+
}
|
|
1142
|
+
toString() {
|
|
1143
|
+
return this._ver;
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
const propMap$3 = { ios: "isIOS", openharmony: "isOpenHarmony", android: "isAndroid", windows: "isWindows", macos: "isMacOS" };
|
|
1147
|
+
function platformToOS(s2) {
|
|
1148
|
+
switch (s2) {
|
|
1149
|
+
case "Android":
|
|
1150
|
+
return "android";
|
|
1151
|
+
case "iPad":
|
|
1152
|
+
case "iPhone":
|
|
1153
|
+
case "iPod":
|
|
1154
|
+
return "ios";
|
|
1155
|
+
case "MacIntel":
|
|
1156
|
+
return "macos";
|
|
1157
|
+
case "Win32":
|
|
1158
|
+
return "windows";
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
class OSInfo {
|
|
1162
|
+
constructor(s2, o2) {
|
|
1163
|
+
var i2;
|
|
1164
|
+
let e;
|
|
1165
|
+
if (this.isIOS = false, this.isAndroid = false, this.isHarmonyOS = false, this.isOpenHarmony = false, this.isWindows = false, this.isMacOS = false, null == o2 ? void 0 : o2.platform) {
|
|
1166
|
+
const s3 = platformToOS(o2.platform);
|
|
1167
|
+
void 0 !== s3 && (e = { name: s3, version: "" });
|
|
1168
|
+
}
|
|
1169
|
+
let n2 = null !== (i2 = execRules(s2, osRules)) && void 0 !== i2 ? i2 : e;
|
|
1170
|
+
n2 ? (e && e.name !== n2.name && (n2 = e), "macos" === n2.name && (null == o2 ? void 0 : o2.maxTouchPoints) && (n2.name = "ios", n2.version = ""), this[propMap$3[n2.name]] = true, this.version = new Version(n2.version), this.isAndroid && /\bHarmonyOS\b/.test(s2) && (this.isHarmonyOS = true), Object.freeze(this)) : this.version = Object.freeze(new Version(""));
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
const appleRules = [{ name: "ipad", regExp: /iPad/ }, { name: "ipod", regExp: /iPod/ }, { name: "iphone", regExp: /iPhone/ }];
|
|
1174
|
+
const androidRules = [{ name: "huawei", regExp: /\b(?:huawei|honor)/i }, { name: "huawei", keywords: ["ideahub", "figi"] }, { name: "vivo", keywords: ["vivo"] }, { name: "oppo", keywords: ["oppo"] }, { name: "mi", keywords: ["redmi", "hongmi", "shark", "Mi", "MIX", "POCO", "POCOPHONE"] }, { name: "mi", regExp: /\bxiaomi/i }, { name: "samsung", keywords: ["samsung", "galaxy"] }, { name: "oneplus", keywords: ["oneplus", "one"] }, { name: "huawei", modelRegExp: /^Mate\s*\d{2}/i }, { name: "huawei", modelRegExp: /^Nova\s\d$/ }, { name: "huawei", regExp: /\b(?:Hi)?MatePad/i }, { name: "huawei", regExp: /\b(?:Liantong|UNICOMVSENS)VP\d{3}\b/ }, { name: "huawei", regExp: /\bCMDCSP\d{3}\b/ }, { name: "huawei", regExp: /\bTDTECH/i }, { name: "huawei", modelRegExp: /^[A-Z]{3}\d?-W[0-5]9[A-Z]*$/ }, { name: "huawei", modelRegExp: /^[A-Z][A-Za-z]{2,3}-(?:AN|BD|BX|AL|TL)\d{2}[A-Za-z]*$/ }, { name: "huawei", modelRegExp: /^TYH\d+[A-Z]?$/ }, { name: "huawei", modelRegExp: /^H60-L0[12]$/ }, { name: "mi", modelRegExp: /^MI\s?(?:\d|CC|Note|MAX|PLAY|PAD)/i }, { name: "mi", modelRegExp: /^(?:AWM|SKR|SKW|DLT)-/ }, { name: "mi", modelRegExp: /^XIG\d{2}$/ }, { name: "mi", modelRegExp: /^M\d{4}[A-Z]\d{1,2}[A-Z]{1,3}$/ }, { name: "mi", modelRegExp: /^2\d{3}[A-Z0-9]{6}$/ }, { name: "mi", modelRegExp: /^2\d{5}[0-9A-Z]{2}[A-Z]$/ }, { name: "mi", modelRegExp: /^2\d{6}[A-Z]$/ }, { name: "mi", modelRegExp: /^2\d{7}[A-Z]{2,3}$/ }, { name: "samsung", modelRegExp: /^S(?:M|[CGP]H)-[A-Za-z0-9]+$/ }, { name: "samsung", modelRegExp: /^SCV3\d$/ }, { name: "samsung", modelRegExp: /^SC-\d{2}[A-Z]$/ }, { name: "samsung", modelRegExp: /^SH[WV]-/ }, { name: "samsung", modelRegExp: /^GT[-_][A-Z][A-Z0-9]{3,}$/i }, { name: "oppo", modelRegExp: /^(?:CPH|OPD|iPA)\d{4}$/ }, { name: "oppo", modelRegExp: /^OPG\d{2}$/ }, { name: "oppo", modelRegExp: /^A[1-5]0[1-9]OP$/ }, { name: "oneplus", modelRegExp: /^(?:KB|HD|IN|GM|NE|LE|MT)\d{4}$/ }, { name: "vivo", modelRegExp: /^V[12]\d{3}[A-Z]{0,2}$/ }];
|
|
1175
|
+
const propMap$2 = { ipod: "isIPod", iphone: "isIPhone", ipad: "isIPad", huawei: "isHuawei", mi: "isMi", oppo: "isOppo", vivo: "isVivo", oneplus: "isOnePlus", samsung: "isSamsung" };
|
|
1176
|
+
class BrandInfo {
|
|
1177
|
+
constructor(i2, s2) {
|
|
1178
|
+
let e;
|
|
1179
|
+
if (this.isHuawei = false, this.isMi = false, this.isOppo = false, this.isVivo = false, this.isOnePlus = false, this.isSamsung = false, this.isIPod = false, this.isIPhone = false, this.isIPad = false, this.isMac = false, this.isApple = false, s2.isIOS ? (e = appleRules, this.isApple = true) : s2.isMacOS ? (this.isMac = true, this.isApple = true) : (s2.isAndroid || s2.isOpenHarmony) && (e = androidRules), e) {
|
|
1180
|
+
const o2 = execRules(i2, e);
|
|
1181
|
+
o2 ? this[propMap$2[o2.name]] = true : s2.isIOS && (this.isIPad = true);
|
|
1182
|
+
}
|
|
1183
|
+
Object.freeze(this);
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
const browserRules = [{ name: "edge", regExp: /\bEdge\/([\d.]+)/ }, { name: "chrome", regExp: /\b(?:Chrome|CrMo|CriOS)\/([\d.]+)/ }, { name: "safari", regExp: /\b(?:Version\/([\d.]+).*\s?)?Safari\b/ }, { name: "ie", regExp: /\bMSIE\s(\d+)/i }, { name: "ie", regExp: /\bTrident\/.*;\srv:(\d+)/ }, { name: "firefox", regExp: /\bFirefox\/([\d.]+)/ }, { name: "opera-presto", regExp: /\bOpera\/([\d.]+)/ }];
|
|
1187
|
+
const propMap$1 = { chrome: "isChrome", safari: "isSafari", edge: "isEdge", ie: "isIE", firefox: "isFirefox", "opera-presto": "isPrestoOpera" };
|
|
1188
|
+
class BrowserInfo {
|
|
1189
|
+
constructor(e) {
|
|
1190
|
+
this.isChrome = false, this.isSafari = false, this.isEdge = false, this.isIE = false, this.isFirefox = false, this.isPrestoOpera = false;
|
|
1191
|
+
const s2 = execRules(e, browserRules);
|
|
1192
|
+
s2 ? (this[propMap$1[s2.name]] = true, this.version = new Version(s2.version)) : this.version = new Version(""), Object.freeze(this);
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
let clientRules = [{ name: "wxwork", regExp: /\bwxwork\/([\d.]+)/ }, { name: "wx", regExp: /\bMicroMessenger\/([\d.]+)/ }, { name: "ding", regExp: /\bDingTalk\/([\d.]+)/ }, { name: "qq", regExp: /\bQQ\/([\d.]+)/ }, { name: "qq", regExp: /\bIPadQQ\b/ }, { name: "weibo", regExp: /(?:\b|_)Weibo(?:\b|_)/i }, { name: "edge", regExp: /\bEdge?\/([\d.]+)/ }, { name: "opera-blink", regExp: /\bOPR\/([\d.]+)/ }, { name: "qqbrowser", regExp: /\bM?QQBrowser(?:\/([\d.]+))?/i }, { name: "ucbrowser", regExp: /\b(?:UCBrowser|UCWEB)(?:-CMCC)?\/?\s?([\d.]+)/ }, { name: "ucbrowser", regExp: /\bUC\b/ }, { name: "quark", regExp: /\bQuark\/([\d.]+)/ }, { name: "maxthon", regExp: /\b(?:Maxthon|MxBrowser)(?:[/\s]([\d.]+))?/ }, { name: "theworld", regExp: /\bTheWorld(?:\s([\d.]+))?/i }, { name: "baidubrowser", regExp: /\b(?:baidubrowser|bdbrowser_i18n|BIDUBrowser)(?:[/\s]([\d.]+))?/i }, { name: "baidubrowser", regExp: /\bbaidubrowserpad\b/ }, { name: "baiduapp", regExp: /\bbaiduboxapp\b\/([\d.]+)?/i }, { name: "baiduapp", regExp: /\bbaiduboxpad\b/i }];
|
|
1196
|
+
clientRules = clientRules.concat(browserRules);
|
|
1197
|
+
const propMap = { wxwork: "isWxWork", wx: "isWx", ding: "isDing", qq: "isQQ", weibo: "isWeibo", edge: "isEdge", "opera-blink": "isOpera", "opera-presto": "isOpera", qqbrowser: "isQQBrowser", ucbrowser: "isUCBrowser", quark: "isQuark", maxthon: "isMaxthon", theworld: "isTheWorld", baidubrowser: "isBaiduBrowser", baiduapp: "isBaiduApp", chrome: "isChrome", safari: "isSafari", ie: "isIE", firefox: "isFirefox" };
|
|
1198
|
+
class ClientInfo {
|
|
1199
|
+
constructor(i2) {
|
|
1200
|
+
this.isWxWork = false, this.isWx = false, this.isWxMiniProgram = false, this.isDing = false, this.isQQ = false, this.isWeibo = false, this.isEdge = false, this.isOpera = false, this.isQQBrowser = false, this.isUCBrowser = false, this.isQuark = false, this.isMaxthon = false, this.isTheWorld = false, this.isBaiduBrowser = false, this.isBaiduApp = false, this.isChrome = false, this.isSafari = false, this.isIE = false, this.isFirefox = false;
|
|
1201
|
+
const s2 = execRules(i2, clientRules);
|
|
1202
|
+
s2 ? (this[propMap[s2.name]] = true, this.version = new Version(s2.version)) : this.version = new Version(""), this.isWxMiniProgram = (this.isWx || this.isWxWork) && /\bMiniProgramEnv\b/.test(i2), Object.freeze(this);
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
class UAInfo {
|
|
1206
|
+
constructor(t2, i2) {
|
|
1207
|
+
this.os = Object.freeze(new OSInfo(t2, i2)), this.brand = Object.freeze(new BrandInfo(t2, this.os)), this.browser = Object.freeze(new BrowserInfo(t2)), this.client = Object.freeze(new ClientInfo(t2)), this.isTablet = this.brand.isIPad || /\bTablet\b/i.test(t2) || this.os.isAndroid && !/\bMobile\b/i.test(t2), this.os.isIOS || this.os.isAndroid || this.isTablet ? this.isPortable = true : /\(X11[;)]/i.test(t2) || /\b(Windows\sNT|Macintosh)\b/.test(t2) ? this.isPortable = false : this.isPortable = /mobile|android/i.test(t2), Object.freeze(this);
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
let currentUAInfo;
|
|
1211
|
+
function getCurrentUAInfo() {
|
|
1212
|
+
return currentUAInfo || (currentUAInfo = Object.freeze("undefined" != typeof window ? new UAInfo(window.navigator.userAgent, window.navigator) : new UAInfo(""))), currentUAInfo;
|
|
1213
|
+
}
|
|
1214
|
+
const ua = navigator.userAgent.toLowerCase();
|
|
1215
|
+
const uaInfo = getCurrentUAInfo();
|
|
1216
|
+
uaInfo.os.isAndroid;
|
|
1217
|
+
uaInfo.os.isIOS;
|
|
1218
|
+
uaInfo.client.version;
|
|
1219
|
+
const isWeixin = uaInfo.client.isWx;
|
|
1220
|
+
const isWorkWeixin = uaInfo.client.isWxWork;
|
|
1221
|
+
const isPcMiniProgram = (isWeixin || isWorkWeixin) && /miniprogramenv/.test(ua);
|
|
1222
|
+
function __isMobile() {
|
|
1223
|
+
const ua2 = navigator.userAgent;
|
|
1224
|
+
if (/mobile|android/i.test(ua2)) {
|
|
1225
|
+
return true;
|
|
1226
|
+
} else {
|
|
1227
|
+
if (/\b(Windows\sNT|Macintosh|x86(_(32|64))?|amd64|i[1-6]86)\b/.test(ua2) || !("onorientationchange" in window)) {
|
|
1228
|
+
return false;
|
|
1229
|
+
} else {
|
|
1230
|
+
return true;
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
function __isTablet() {
|
|
1235
|
+
const ua2 = navigator.userAgent;
|
|
1236
|
+
if (/(?:iPad|PlayBook)/.test(ua2)) return true;
|
|
1237
|
+
if (uaInfo.os.isAndroid && !/(?:Mobile)/.test(ua2) || /(?:Tablet)/.test(ua2)) return true;
|
|
1238
|
+
return false;
|
|
1239
|
+
}
|
|
1240
|
+
const isMob = __isMobile();
|
|
1241
|
+
isMob && __isTablet();
|
|
1242
|
+
const isMobile = /* @__PURE__ */ (() => {
|
|
1243
|
+
return isMob || isPcMiniProgram;
|
|
1244
|
+
})();
|
|
1245
|
+
const paymentProps = () => ({
|
|
1246
|
+
/** 支付实例 */
|
|
1247
|
+
paymentTarget: PropUtils.object().isRequired
|
|
1248
|
+
});
|
|
1249
|
+
function getPaymentTargetExport(paymentTarget) {
|
|
1250
|
+
return {
|
|
1251
|
+
PaymentProvider: paymentTarget.PaymentProvider
|
|
1252
|
+
};
|
|
1253
|
+
}
|
|
1254
|
+
const usePayment = (options) => {
|
|
1255
|
+
const { props } = options;
|
|
1256
|
+
const { PaymentProvider } = getPaymentTargetExport(props.paymentTarget);
|
|
1257
|
+
const { injectData } = useGlobalInject();
|
|
1258
|
+
const { $t } = useI18n();
|
|
1259
|
+
const supportPayProviders = ref([]);
|
|
1260
|
+
const isSupportPay = computed(() => {
|
|
1261
|
+
const supportAlipay = supportPayProviders.value.includes(PaymentProvider.Alipay);
|
|
1262
|
+
return isMobile && (isWeixin || supportAlipay);
|
|
1263
|
+
});
|
|
1264
|
+
const onlySupportAlipay = computed(() => {
|
|
1265
|
+
return supportPayProviders.value.length === 1 && supportPayProviders.value[0] === PaymentProvider.Alipay;
|
|
1266
|
+
});
|
|
1267
|
+
const onlySupportWechatPay = computed(() => {
|
|
1268
|
+
return supportPayProviders.value.length === 1 && supportPayProviders.value[0] === PaymentProvider.Wechat;
|
|
1269
|
+
});
|
|
1270
|
+
function getPayProviders() {
|
|
1271
|
+
return __async(this, null, function* () {
|
|
1272
|
+
const data = yield props.paymentTarget.getPayProviders();
|
|
1273
|
+
supportPayProviders.value = data;
|
|
1274
|
+
});
|
|
1275
|
+
}
|
|
1276
|
+
function payWithWechat(payInfo) {
|
|
1277
|
+
return __async(this, null, function* () {
|
|
1278
|
+
return new Promise((resolve) => __async(null, null, function* () {
|
|
1279
|
+
if (!isWeixin) {
|
|
1280
|
+
return resolve({ success: false, failReason: "notInWechatBrowser", failMessage: $t("order.wechatPayTips") });
|
|
1281
|
+
}
|
|
1282
|
+
if (!injectData.getWeixinSdk) {
|
|
1283
|
+
return resolve({ success: false, failReason: "sdkNotAvailable", failMessage: $t("order.payFailed") });
|
|
1284
|
+
}
|
|
1285
|
+
let wx;
|
|
1286
|
+
try {
|
|
1287
|
+
wx = yield injectData.getWeixinSdk();
|
|
1288
|
+
} catch (err) {
|
|
1289
|
+
return resolve({ success: false, failReason: "sdkNotAvailable", failMessage: $t("order.payFailed") });
|
|
1290
|
+
}
|
|
1291
|
+
if (!wx) {
|
|
1292
|
+
return resolve({ success: false, failReason: "sdkNotAvailable", failMessage: $t("order.payFailed") });
|
|
1293
|
+
}
|
|
1294
|
+
wx.chooseWXPay({
|
|
1295
|
+
timestamp: payInfo.timestamp,
|
|
1296
|
+
nonceStr: payInfo.nonceStr,
|
|
1297
|
+
package: payInfo.package,
|
|
1298
|
+
signType: payInfo.signType,
|
|
1299
|
+
paySign: payInfo.paySign,
|
|
1300
|
+
success: (res) => {
|
|
1301
|
+
resolve({ success: true, data: res || {} });
|
|
1302
|
+
},
|
|
1303
|
+
cancel: () => {
|
|
1304
|
+
resolve({ success: false, failReason: "userCancelled", failMessage: $t("order.cancelPay") });
|
|
1305
|
+
},
|
|
1306
|
+
fail: (res) => {
|
|
1307
|
+
props.paymentTarget.iarCore.logger.error("wx", "choose-wx-pay-fail", JSON.stringify(res));
|
|
1308
|
+
resolve({ success: false, failReason: "payFailed", failMessage: (res == null ? void 0 : res.errMsg) || $t("order.payFailed") });
|
|
1309
|
+
}
|
|
1310
|
+
});
|
|
1311
|
+
}));
|
|
1312
|
+
});
|
|
1313
|
+
}
|
|
1314
|
+
function payWithAli(url) {
|
|
1315
|
+
const a2 = document.createElement("a");
|
|
1316
|
+
a2.href = url;
|
|
1317
|
+
a2.click();
|
|
1318
|
+
}
|
|
1319
|
+
return {
|
|
1320
|
+
supportPayProviders,
|
|
1321
|
+
isSupportPay,
|
|
1322
|
+
onlySupportAlipay,
|
|
1323
|
+
onlySupportWechatPay,
|
|
1324
|
+
getPayProviders,
|
|
1325
|
+
payWithWechat,
|
|
1326
|
+
payWithAli
|
|
1327
|
+
};
|
|
1328
|
+
};
|
|
1329
|
+
var OrderButtonAction = /* @__PURE__ */ ((OrderButtonAction2) => {
|
|
1330
|
+
OrderButtonAction2["ApplyRefund"] = "applyRefund";
|
|
1331
|
+
OrderButtonAction2["Pay"] = "pay";
|
|
1332
|
+
OrderButtonAction2["ViewDetail"] = "viewDetail";
|
|
1333
|
+
OrderButtonAction2["ConfirmReceipt"] = "confirmReceipt";
|
|
1334
|
+
return OrderButtonAction2;
|
|
1335
|
+
})(OrderButtonAction || {});
|
|
1336
|
+
var OrderListPopupRoute = /* @__PURE__ */ ((OrderListPopupRoute2) => {
|
|
1337
|
+
OrderListPopupRoute2["OrderList"] = "orderList";
|
|
1338
|
+
OrderListPopupRoute2["OrderDetail"] = "orderDetail";
|
|
1339
|
+
return OrderListPopupRoute2;
|
|
1340
|
+
})(OrderListPopupRoute || {});
|
|
1341
|
+
const orderProps = () => __spreadProps(__spreadValues({}, paymentProps()), {
|
|
1342
|
+
/** 订单 SDK 实例 */
|
|
1343
|
+
orderTarget: PropUtils.object().isRequired
|
|
1344
|
+
});
|
|
1345
|
+
function getOrderTargetExport(orderTarget) {
|
|
1346
|
+
return {
|
|
1347
|
+
OrderStatus: orderTarget.OrderStatus,
|
|
1348
|
+
PayStatus: orderTarget.PayStatus,
|
|
1349
|
+
PaymentProvider: orderTarget.PaymentProvider,
|
|
1350
|
+
ProductDeliveryType: orderTarget.ProductDeliveryType,
|
|
1351
|
+
ProductType: orderTarget.ProductType,
|
|
1352
|
+
ProductBuyType: orderTarget.ProductBuyType,
|
|
1353
|
+
RefundStatus: orderTarget.RefundStatus,
|
|
1354
|
+
CreateOrderFailReason: orderTarget.CreateOrderFailReason
|
|
1355
|
+
};
|
|
1356
|
+
}
|
|
1357
|
+
const ORDER_PROVIDE_KEY = Symbol("ORDER_PROVIDE_KEY");
|
|
1358
|
+
const useOrderProvide = (props) => {
|
|
1359
|
+
provide(ORDER_PROVIDE_KEY, {
|
|
1360
|
+
getOrderTarget: () => props.orderTarget
|
|
1361
|
+
});
|
|
1362
|
+
const orderTarget = props.orderTarget;
|
|
1363
|
+
const orderTargetExport = getOrderTargetExport(orderTarget);
|
|
1364
|
+
const { OrderStatus, PayStatus: PayStatus2, PaymentProvider, RefundStatus } = orderTargetExport;
|
|
1365
|
+
const { supportPayProviders, onlySupportAlipay, payWithWechat, payWithAli, getPayProviders } = usePayment({ props });
|
|
1366
|
+
const { getEmitter, messageBox, toast } = useGlobalInject();
|
|
1367
|
+
const { $t } = useI18n();
|
|
1368
|
+
function navToOrderDetail(orderNo) {
|
|
1369
|
+
getEmitter().emit(productEvents.OpenProductOrderDetailPopup, orderNo);
|
|
1370
|
+
}
|
|
1371
|
+
function emitRefreshEvents(params, syncPayStatus = false) {
|
|
1372
|
+
if (params.route === "orderList") {
|
|
1373
|
+
getEmitter().emit(productEvents.RefreshProductOrderListStatus, params.orderNo);
|
|
1374
|
+
} else {
|
|
1375
|
+
getEmitter().emit(productEvents.RefreshProductOrderDetailStatus, {
|
|
1376
|
+
orderNo: params.orderNo,
|
|
1377
|
+
syncPayStatus
|
|
1378
|
+
});
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
function handleConfirmReceipt(params) {
|
|
1382
|
+
return __async(this, null, function* () {
|
|
1383
|
+
if (params.orderStatus !== OrderStatus.Delivering) return;
|
|
1384
|
+
const confirm = yield messageBox({
|
|
1385
|
+
content: $t("order.confirmReceiptTips"),
|
|
1386
|
+
confirmButtonText: $t("common.confirm"),
|
|
1387
|
+
cancelButtonText: $t("common.cancel")
|
|
1388
|
+
});
|
|
1389
|
+
if (!confirm) return;
|
|
1390
|
+
yield props.orderTarget.confirmOrder(params.orderNo);
|
|
1391
|
+
toast($t("order.confirmedReceipt"));
|
|
1392
|
+
emitRefreshEvents(params);
|
|
1393
|
+
});
|
|
1394
|
+
}
|
|
1395
|
+
function handleRePay(params) {
|
|
1396
|
+
return __async(this, null, function* () {
|
|
1397
|
+
if (params.route === "orderList") {
|
|
1398
|
+
if (supportPayProviders.value.length > 1 || onlySupportAlipay.value) {
|
|
1399
|
+
navToOrderDetail(params.orderNo);
|
|
1400
|
+
return;
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
const payOrderParams = yield props.paymentTarget.getPayOrderParams({
|
|
1404
|
+
orderNo: params.orderNo,
|
|
1405
|
+
payProvider: params.payProvider || PaymentProvider.Wechat
|
|
1406
|
+
});
|
|
1407
|
+
if (payOrderParams.payStatus === PayStatus2.Free) {
|
|
1408
|
+
toast($t("order.paySuccess"));
|
|
1409
|
+
emitRefreshEvents(params, true);
|
|
1410
|
+
return;
|
|
1411
|
+
}
|
|
1412
|
+
if (params.payProvider && params.payProvider === PaymentProvider.Alipay) {
|
|
1413
|
+
payWithAli(payOrderParams.aliPayLink);
|
|
1414
|
+
emitRefreshEvents(params, true);
|
|
1415
|
+
return;
|
|
1416
|
+
}
|
|
1417
|
+
const res = yield payWithWechat({
|
|
1418
|
+
timestamp: payOrderParams.timeStamp,
|
|
1419
|
+
nonceStr: payOrderParams.nonceStr,
|
|
1420
|
+
package: payOrderParams.package,
|
|
1421
|
+
signType: payOrderParams.signType,
|
|
1422
|
+
paySign: payOrderParams.paySign
|
|
1423
|
+
});
|
|
1424
|
+
if (res.success) {
|
|
1425
|
+
toast($t("order.paySuccess"));
|
|
1426
|
+
emitRefreshEvents(params, true);
|
|
1427
|
+
} else {
|
|
1428
|
+
toast(res.failMessage);
|
|
1429
|
+
}
|
|
1430
|
+
});
|
|
1431
|
+
}
|
|
1432
|
+
function handleOrderRefund(params) {
|
|
1433
|
+
return __async(this, null, function* () {
|
|
1434
|
+
if (params.orderStatus !== OrderStatus.WaitDelivery) return;
|
|
1435
|
+
const text = $t("order.refundTips");
|
|
1436
|
+
const amount = params.orderAmount || "";
|
|
1437
|
+
const confirm = yield messageBox({
|
|
1438
|
+
content: `<div style="font-size: 16px; color: #3D3D3D;">${text}<span style="color: #FF5252;">¥${amount}</span></div>`,
|
|
1439
|
+
cancelButtonText: $t("common.cancel"),
|
|
1440
|
+
confirmButtonText: $t("order.confirmRefund")
|
|
1441
|
+
});
|
|
1442
|
+
if (!confirm) return;
|
|
1443
|
+
const res = yield props.orderTarget.applyOrderRefund(params.orderNo);
|
|
1444
|
+
if (!res.success) {
|
|
1445
|
+
toast($t("order.failed"));
|
|
1446
|
+
return;
|
|
1447
|
+
}
|
|
1448
|
+
if (res.refundStatus === RefundStatus.Fail) {
|
|
1449
|
+
toast($t("order.refundFailed"));
|
|
1450
|
+
}
|
|
1451
|
+
emitRefreshEvents(params);
|
|
1452
|
+
});
|
|
1453
|
+
}
|
|
1454
|
+
function handleOrderBtnClick(params) {
|
|
1455
|
+
switch (params.action) {
|
|
1456
|
+
case "pay":
|
|
1457
|
+
handleRePay(params);
|
|
1458
|
+
break;
|
|
1459
|
+
case "viewDetail":
|
|
1460
|
+
navToOrderDetail(params.orderNo);
|
|
1461
|
+
break;
|
|
1462
|
+
case "confirmReceipt":
|
|
1463
|
+
handleConfirmReceipt(params);
|
|
1464
|
+
break;
|
|
1465
|
+
case "applyRefund":
|
|
1466
|
+
handleOrderRefund(params);
|
|
1467
|
+
break;
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
return __spreadValues({
|
|
1471
|
+
orderTarget,
|
|
1472
|
+
supportPayProviders,
|
|
1473
|
+
onlySupportAlipay,
|
|
1474
|
+
getPayProviders,
|
|
1475
|
+
handleRePay,
|
|
1476
|
+
handleConfirmReceipt,
|
|
1477
|
+
navToOrderDetail,
|
|
1478
|
+
handleOrderBtnClick
|
|
1479
|
+
}, orderTargetExport);
|
|
1480
|
+
};
|
|
1481
|
+
const useOrderInject = () => {
|
|
1482
|
+
const data = inject(ORDER_PROVIDE_KEY);
|
|
1483
|
+
const { $t } = useI18n();
|
|
1484
|
+
const orderTarget = data.getOrderTarget();
|
|
1485
|
+
const orderTargetExport = getOrderTargetExport(orderTarget);
|
|
1486
|
+
const { OrderStatus } = orderTargetExport;
|
|
1487
|
+
function getOrderStatusText(status) {
|
|
1488
|
+
switch (status) {
|
|
1489
|
+
case OrderStatus.WaitPay:
|
|
1490
|
+
return $t("order.list.waitPay");
|
|
1491
|
+
case OrderStatus.WaitDelivery:
|
|
1492
|
+
return $t("order.list.waitDelivery");
|
|
1493
|
+
case OrderStatus.Delivering:
|
|
1494
|
+
return $t("order.list.delivering");
|
|
1495
|
+
case OrderStatus.Finish:
|
|
1496
|
+
return $t("order.list.finish");
|
|
1497
|
+
case OrderStatus.Close:
|
|
1498
|
+
return $t("order.list.close");
|
|
1499
|
+
case OrderStatus.Refunding:
|
|
1500
|
+
return $t("order.list.refunding");
|
|
1501
|
+
case OrderStatus.Refunded:
|
|
1502
|
+
return $t("order.list.refunded");
|
|
1503
|
+
default:
|
|
1504
|
+
return "";
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
return __spreadValues({
|
|
1508
|
+
orderTarget,
|
|
1509
|
+
getOrderStatusText
|
|
1510
|
+
}, orderTargetExport);
|
|
1511
|
+
};
|
|
1512
|
+
const emitFunc = () => () => true;
|
|
1513
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
1514
|
+
__name: "product-feature-tag",
|
|
1515
|
+
props: {
|
|
1516
|
+
tag: PropUtils.string.def(""),
|
|
1517
|
+
maxWidth: PropUtils.number.def(88)
|
|
1518
|
+
},
|
|
1519
|
+
setup(__props) {
|
|
1520
|
+
const props = __props;
|
|
1521
|
+
const containerStyle = computed(() => ({
|
|
1522
|
+
maxWidth: `${props.maxWidth}px`
|
|
1523
|
+
}));
|
|
1524
|
+
return { __sfc: true, props, containerStyle };
|
|
1525
|
+
}
|
|
1526
|
+
});
|
|
1527
|
+
function normalizeComponent(scriptExports, render12, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
1528
|
+
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
1529
|
+
if (render12) {
|
|
1530
|
+
options.render = render12;
|
|
1531
|
+
options.staticRenderFns = staticRenderFns;
|
|
1532
|
+
options._compiled = true;
|
|
1533
|
+
}
|
|
1534
|
+
return {
|
|
1535
|
+
exports: scriptExports,
|
|
1536
|
+
options
|
|
1537
|
+
};
|
|
1538
|
+
}
|
|
1539
|
+
var _sfc_render$a = function render() {
|
|
1540
|
+
var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
|
|
1541
|
+
return _c("div", { staticClass: "plv-product-c-item__tag-container", style: _setup.containerStyle, attrs: { "title": _vm.tag } }, [_vm.tag ? _c("span", { staticClass: "plv-product-c-item__tag" }, [_vm._v(_vm._s(_vm.tag))]) : _vm._e()]);
|
|
1542
|
+
};
|
|
1543
|
+
var _sfc_staticRenderFns$a = [];
|
|
1544
|
+
var __component__$a = /* @__PURE__ */ normalizeComponent(
|
|
1545
|
+
_sfc_main$a,
|
|
1546
|
+
_sfc_render$a,
|
|
1547
|
+
_sfc_staticRenderFns$a
|
|
1548
|
+
);
|
|
1549
|
+
const ProductFeatureTag = __component__$a.exports;
|
|
1550
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
1551
|
+
__name: "purchase-product",
|
|
1552
|
+
props: {
|
|
1553
|
+
product: PropUtils.object().isRequired
|
|
1554
|
+
},
|
|
1555
|
+
emits: {
|
|
1556
|
+
"click-purchase-product": emitFunc()
|
|
1557
|
+
},
|
|
1558
|
+
setup(__props, { emit }) {
|
|
1559
|
+
const props = __props;
|
|
1560
|
+
const { $t } = useI18n();
|
|
1561
|
+
const displayTotalPrice = computed(() => {
|
|
1562
|
+
if (props.product.realPrice === 0) return $t("product.price.free");
|
|
1563
|
+
return props.product.realPrice;
|
|
1564
|
+
});
|
|
1565
|
+
function onOrderProductClick() {
|
|
1566
|
+
emit("click-purchase-product");
|
|
1567
|
+
}
|
|
1568
|
+
return { __sfc: true, props, $t, displayTotalPrice, emit, onOrderProductClick, ProductFeatureTag };
|
|
1569
|
+
}
|
|
1570
|
+
});
|
|
1571
|
+
var _sfc_render$9 = function render2() {
|
|
1572
|
+
var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
|
|
1573
|
+
return _c("div", { staticClass: "plv-product-c-purchase-product", on: { "click": _setup.onOrderProductClick } }, [_c("img", { staticClass: "plv-product-c-purchase-product__image", attrs: { "src": _vm.product.cover, "alt": _vm.product.name } }), _c("div", { staticClass: "plv-product-c-purchase-product__info" }, [_c("div", { staticClass: "plv-product-c-purchase-product__name" }, [_vm._v(" " + _vm._s(_vm.product.name) + " ")]), _vm.product.featureTags ? _c("div", { staticClass: "plv-product-c-purchase-product__tags" }, _vm._l(_vm.product.featureTags, function(tag, index) {
|
|
1574
|
+
return _c(_setup.ProductFeatureTag, { key: index, attrs: { "tag": tag } });
|
|
1575
|
+
}), 1) : _vm._e(), _vm.product.description ? _c("div", { staticClass: "plv-product-c-purchase-product__description" }, [_vm._v(" " + _vm._s(_vm.product.description) + " ")]) : _vm._e(), _c("div", { staticClass: "plv-product-c-purchase-product__price" }, [_vm.product.realPrice > 0 ? _c("span", { staticClass: "plv-product-c-purchase-product__price-symbol" }, [_vm._v("¥")]) : _vm._e(), _c("span", { staticClass: "plv-product-c-purchase-product__price-value plv-font-din-pro-regular" }, [_vm._v(_vm._s(_setup.displayTotalPrice))])])])]);
|
|
1576
|
+
};
|
|
1577
|
+
var _sfc_staticRenderFns$9 = [];
|
|
1578
|
+
var __component__$9 = /* @__PURE__ */ normalizeComponent(
|
|
1579
|
+
_sfc_main$9,
|
|
1580
|
+
_sfc_render$9,
|
|
1581
|
+
_sfc_staticRenderFns$9
|
|
1582
|
+
);
|
|
1583
|
+
const PurchaseProduct = __component__$9.exports;
|
|
1584
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
1585
|
+
__name: "order-pay-countdown",
|
|
1586
|
+
props: {
|
|
1587
|
+
endTime: PropUtils.number.isRequired
|
|
1588
|
+
},
|
|
1589
|
+
emits: {
|
|
1590
|
+
"count-down-end": emitFunc()
|
|
1591
|
+
},
|
|
1592
|
+
setup(__props, { emit }) {
|
|
1593
|
+
const props = __props;
|
|
1594
|
+
const timeStr = ref("");
|
|
1595
|
+
const intervalId = ref(null);
|
|
1596
|
+
function clearCountdown() {
|
|
1597
|
+
if (intervalId.value !== null) {
|
|
1598
|
+
clearInterval(intervalId.value);
|
|
1599
|
+
intervalId.value = null;
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
function formattedTime() {
|
|
1603
|
+
if (!props.endTime || props.endTime - Date.now() <= 0) {
|
|
1604
|
+
emit("count-down-end");
|
|
1605
|
+
clearCountdown();
|
|
1606
|
+
return "00:00";
|
|
1607
|
+
}
|
|
1608
|
+
const remainingTime = props.endTime - Date.now();
|
|
1609
|
+
const minutes = Math.floor(remainingTime / (60 * 1e3));
|
|
1610
|
+
const seconds = Math.floor(remainingTime % (60 * 1e3) / 1e3);
|
|
1611
|
+
if (minutes < 0 || seconds < 0) {
|
|
1612
|
+
emit("count-down-end");
|
|
1613
|
+
clearCountdown();
|
|
1614
|
+
return "00:00";
|
|
1615
|
+
}
|
|
1616
|
+
return `${String(minutes).padStart(2, "0")}:${String(seconds).padStart(2, "0")}`;
|
|
1617
|
+
}
|
|
1618
|
+
onMounted(() => {
|
|
1619
|
+
timeStr.value = formattedTime();
|
|
1620
|
+
if (props.endTime > Date.now()) {
|
|
1621
|
+
intervalId.value = setInterval(() => {
|
|
1622
|
+
timeStr.value = formattedTime();
|
|
1623
|
+
}, 1e3);
|
|
1624
|
+
}
|
|
1625
|
+
});
|
|
1626
|
+
onBeforeUnmount(() => {
|
|
1627
|
+
clearCountdown();
|
|
1628
|
+
});
|
|
1629
|
+
return { __sfc: true, props, emit, timeStr, intervalId, clearCountdown, formattedTime };
|
|
1630
|
+
}
|
|
1631
|
+
});
|
|
1632
|
+
var _sfc_render$8 = function render3() {
|
|
1633
|
+
var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
|
|
1634
|
+
return _c("span", [_vm._v(_vm._s(_setup.timeStr))]);
|
|
1635
|
+
};
|
|
1636
|
+
var _sfc_staticRenderFns$8 = [];
|
|
1637
|
+
var __component__$8 = /* @__PURE__ */ normalizeComponent(
|
|
1638
|
+
_sfc_main$8,
|
|
1639
|
+
_sfc_render$8,
|
|
1640
|
+
_sfc_staticRenderFns$8
|
|
1641
|
+
);
|
|
1642
|
+
const OrderPayCountdown = __component__$8.exports;
|
|
1643
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
1644
|
+
__name: "pay-status",
|
|
1645
|
+
setup(__props) {
|
|
1646
|
+
const { getEmitter } = useGlobalInject();
|
|
1647
|
+
const { $t } = useI18n();
|
|
1648
|
+
const { getOrderStatusText, OrderStatus } = useOrderInject();
|
|
1649
|
+
const orderDetail2 = inject("orderDetail");
|
|
1650
|
+
const orderNo = computed(() => (orderDetail2 == null ? void 0 : orderDetail2.value.orderNo) || "");
|
|
1651
|
+
function handleCountDownEnd() {
|
|
1652
|
+
getEmitter().emit(productEvents.RefreshProductOrderListStatus, orderNo.value);
|
|
1653
|
+
}
|
|
1654
|
+
return { __sfc: true, getEmitter, $t, getOrderStatusText, OrderStatus, orderDetail: orderDetail2, orderNo, handleCountDownEnd, OrderPayCountdown };
|
|
1655
|
+
}
|
|
1656
|
+
});
|
|
1657
|
+
var _sfc_render$7 = function render4() {
|
|
1658
|
+
var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
|
|
1659
|
+
return _setup.orderDetail ? _c("div", { staticClass: "plv-product-c-pay-status" }, [_c("span", { staticClass: "plv-product-c-pay-status__text" }, [_vm._v(" " + _vm._s(_setup.getOrderStatusText(_setup.orderDetail.status)) + " ")]), _c("div", { staticClass: "plv-product-c-pay-status__actions" }, [_setup.orderDetail.status === _setup.OrderStatus.WaitPay ? _c("div", [_c(_setup.OrderPayCountdown, { attrs: { "end-time": _setup.orderDetail.expiredAt }, on: { "count-down-end": _setup.handleCountDownEnd } }), _c("span", [_vm._v(_vm._s(_setup.$t("order.detail.payAutoCancel")))])], 1) : _setup.orderDetail.status === _setup.OrderStatus.Close ? _c("div", [_c("span", [_vm._v(_vm._s(_setup.$t("order.detail.cancelReason")))]), _c("span", [_vm._v(": ")]), _c("span", [_vm._v(_vm._s(_setup.$t("order.detail.payTimeOut")))])]) : _setup.orderDetail.status === _setup.OrderStatus.Refunded ? _c("div", [_c("span", [_vm._v(_vm._s(_setup.$t("order.detail.refundTips")))])]) : _vm._e()])]) : _vm._e();
|
|
1660
|
+
};
|
|
1661
|
+
var _sfc_staticRenderFns$7 = [];
|
|
1662
|
+
var __component__$7 = /* @__PURE__ */ normalizeComponent(
|
|
1663
|
+
_sfc_main$7,
|
|
1664
|
+
_sfc_render$7,
|
|
1665
|
+
_sfc_staticRenderFns$7
|
|
1666
|
+
);
|
|
1667
|
+
const PayStatus = __component__$7.exports;
|
|
1668
|
+
const qrcodeExpiredImage = "data:image/png;base64,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";
|
|
1669
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
1670
|
+
__name: "customer-qrcode",
|
|
1671
|
+
setup(__props) {
|
|
1672
|
+
const { $t } = useI18n();
|
|
1673
|
+
const orderDetail2 = inject("orderDetail");
|
|
1674
|
+
const customerServiceTips = computed(() => {
|
|
1675
|
+
var _a;
|
|
1676
|
+
if ((_a = orderDetail2 == null ? void 0 : orderDetail2.value.products) == null ? void 0 : _a[0].customerServiceContact) {
|
|
1677
|
+
return $t("order.detail.qrCodeTips");
|
|
1678
|
+
}
|
|
1679
|
+
return $t("order.detail.qrCodeExpiredTips");
|
|
1680
|
+
});
|
|
1681
|
+
return { __sfc: true, $t, orderDetail: orderDetail2, customerServiceTips, qrcodeExpiredImage };
|
|
1682
|
+
}
|
|
1683
|
+
});
|
|
1684
|
+
var _sfc_render$6 = function render5() {
|
|
1685
|
+
var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
|
|
1686
|
+
return _c("div", { staticClass: "plv-product-c-customer-qrcode" }, [_c("div", { staticClass: "plv-product-c-customer-qrcode__img-wrap" }, [_setup.orderDetail && _setup.orderDetail.products[0].customerServiceContact ? [_c("img", { staticClass: "plv-product-c-customer-qrcode__img", attrs: { "src": _setup.orderDetail.products[0].customerServiceContact } })] : [_c("img", { staticClass: "plv-product-c-customer-qrcode__img--expired", attrs: { "src": _setup.qrcodeExpiredImage, "alt": "expired" } }), _c("span", { staticClass: "plv-product-c-customer-qrcode__img-text" }, [_vm._v(" " + _vm._s(_setup.$t("order.detail.expired")) + " ")])]], 2), _c("span", { staticClass: "plv-product-c-customer-qrcode__tips" }, [_vm._v(_vm._s(_setup.customerServiceTips))])]);
|
|
1687
|
+
};
|
|
1688
|
+
var _sfc_staticRenderFns$6 = [];
|
|
1689
|
+
var __component__$6 = /* @__PURE__ */ normalizeComponent(
|
|
1690
|
+
_sfc_main$6,
|
|
1691
|
+
_sfc_render$6,
|
|
1692
|
+
_sfc_staticRenderFns$6
|
|
1693
|
+
);
|
|
1694
|
+
const CustomerQrcode = __component__$6.exports;
|
|
1695
|
+
const htmlChars = ['"', "'", "&", "<", ">"], htmlEntities = [""", "'", "&", "<", ">"], charsToEntities = /* @__PURE__ */ Object.create(null), entitiesToChars = /* @__PURE__ */ Object.create(null);
|
|
1696
|
+
htmlChars.forEach((n2, e) => {
|
|
1697
|
+
charsToEntities[n2] = htmlEntities[e], entitiesToChars[htmlEntities[e]] = n2;
|
|
1698
|
+
});
|
|
1699
|
+
function maskChars(n2, e) {
|
|
1700
|
+
var t2, r2, o2;
|
|
1701
|
+
e = e || {};
|
|
1702
|
+
const i2 = n2.length, l2 = null !== (t2 = e.start) && void 0 !== t2 ? t2 : 0, s2 = null !== (r2 = e.end) && void 0 !== r2 ? r2 : i2 - 1, a2 = null !== (o2 = e.maskChar) && void 0 !== o2 ? o2 : "*";
|
|
1703
|
+
if (l2 >= 0 && s2 >= 0 && l2 <= s2 && s2 < i2) {
|
|
1704
|
+
let e2 = n2.substring(0, l2);
|
|
1705
|
+
return e2 += new Array(s2 - l2 + 2).join(a2), s2 < i2 - 1 && (e2 += n2.substring(s2 + 1)), e2;
|
|
1706
|
+
}
|
|
1707
|
+
if (l2 >= 0) return l2 >= i2 ? n2 : n2.substring(0, l2) + new Array(i2 - l2 + 1).join(a2);
|
|
1708
|
+
if (s2 >= 0) {
|
|
1709
|
+
let e2 = new Array(Math.min(s2, i2) + 2).join(a2);
|
|
1710
|
+
return s2 < i2 - 1 && (e2 += n2.substring(s2 + 1)), e2;
|
|
1711
|
+
}
|
|
1712
|
+
return n2;
|
|
1713
|
+
}
|
|
1714
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
1715
|
+
__name: "address-item",
|
|
1716
|
+
props: {
|
|
1717
|
+
addressInfo: PropUtils.object().isRequired
|
|
1718
|
+
},
|
|
1719
|
+
emits: {
|
|
1720
|
+
"choose-address": emitFunc()
|
|
1721
|
+
},
|
|
1722
|
+
setup(__props, { emit }) {
|
|
1723
|
+
const props = __props;
|
|
1724
|
+
function onClick() {
|
|
1725
|
+
emit("choose-address", props.addressInfo);
|
|
1726
|
+
}
|
|
1727
|
+
return { __sfc: true, props, emit, onClick, maskChars };
|
|
1728
|
+
}
|
|
1729
|
+
});
|
|
1730
|
+
var _sfc_render$5 = function render6() {
|
|
1731
|
+
var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
|
|
1732
|
+
return _c("div", { staticClass: "plv-product-address-item", on: { "click": _setup.onClick } }, [_c("div", { staticClass: "plv-product-address-item__top" }, [_c("div", { staticClass: "plv-product-address-item__content" }, [_c("div", { staticClass: "plv-product-address-item__header" }, [_c("span", [_vm._v(_vm._s(_vm.addressInfo.name))]), _c("span", { staticClass: "plv-product-address-item__header-phone" }, [_vm._v(_vm._s(_setup.maskChars(_vm.addressInfo.mobile, { start: 3, end: 6 })))])]), _c("div", { staticClass: "plv-product-address-item__address" }, [_vm._v(" " + _vm._s(_vm.addressInfo.address) + " ")])]), _vm.$slots.icon ? _c("div", { staticClass: "plv-product-address-item__icon-wrapper" }, [_vm._t("icon")], 2) : _vm._e()]), _vm._t("action")], 2);
|
|
1733
|
+
};
|
|
1734
|
+
var _sfc_staticRenderFns$5 = [];
|
|
1735
|
+
var __component__$5 = /* @__PURE__ */ normalizeComponent(
|
|
1736
|
+
_sfc_main$5,
|
|
1737
|
+
_sfc_render$5,
|
|
1738
|
+
_sfc_staticRenderFns$5
|
|
1739
|
+
);
|
|
1740
|
+
const AddressItem = __component__$5.exports;
|
|
1741
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
1742
|
+
__name: "express-info",
|
|
1743
|
+
setup(__props) {
|
|
1744
|
+
const orderDetail2 = inject("orderDetail");
|
|
1745
|
+
const { $t } = useI18n();
|
|
1746
|
+
return { __sfc: true, orderDetail: orderDetail2, $t, maskChars, AddressItem };
|
|
1747
|
+
}
|
|
1748
|
+
});
|
|
1749
|
+
var _sfc_render$4 = function render7() {
|
|
1750
|
+
var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
|
|
1751
|
+
return _setup.orderDetail ? _c("div", [_setup.orderDetail.expressEnabled ? _c(_setup.AddressItem, { staticClass: "plv-product-c-express-info", attrs: { "address-info": _setup.orderDetail.expressInfo } }) : _c("div", { staticClass: "plv-product-c-phone-info" }, [_c("span", [_vm._v(_vm._s(_setup.$t("order.phone")))]), _c("span", { staticClass: "plv-product-c-phone-info__text" }, [_vm._v(_vm._s(_setup.maskChars(_setup.orderDetail.expressInfo.mobile, { start: 3, end: 4 })))])])], 1) : _vm._e();
|
|
1752
|
+
};
|
|
1753
|
+
var _sfc_staticRenderFns$4 = [];
|
|
1754
|
+
var __component__$4 = /* @__PURE__ */ normalizeComponent(
|
|
1755
|
+
_sfc_main$4,
|
|
1756
|
+
_sfc_render$4,
|
|
1757
|
+
_sfc_staticRenderFns$4
|
|
1758
|
+
);
|
|
1759
|
+
const ExpressInfo = __component__$4.exports;
|
|
1760
|
+
function getDefaultExportFromCjs(x2) {
|
|
1761
|
+
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
1762
|
+
}
|
|
1763
|
+
var popperManager;
|
|
1764
|
+
var hasRequiredPopperManager;
|
|
1765
|
+
function requirePopperManager() {
|
|
1766
|
+
if (hasRequiredPopperManager) return popperManager;
|
|
1767
|
+
hasRequiredPopperManager = 1;
|
|
1768
|
+
popperManager = function(e) {
|
|
1769
|
+
var n2 = {};
|
|
1770
|
+
function t2(r2) {
|
|
1771
|
+
if (n2[r2]) return n2[r2].exports;
|
|
1772
|
+
var o2 = n2[r2] = { i: r2, l: false, exports: {} };
|
|
1773
|
+
return e[r2].call(o2.exports, o2, o2.exports, t2), o2.l = true, o2.exports;
|
|
1774
|
+
}
|
|
1775
|
+
return t2.m = e, t2.c = n2, t2.d = function(e2, n3, r2) {
|
|
1776
|
+
t2.o(e2, n3) || Object.defineProperty(e2, n3, { enumerable: true, get: r2 });
|
|
1777
|
+
}, t2.r = function(e2) {
|
|
1778
|
+
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e2, "__esModule", { value: true });
|
|
1779
|
+
}, t2.t = function(e2, n3) {
|
|
1780
|
+
if (1 & n3 && (e2 = t2(e2)), 8 & n3) return e2;
|
|
1781
|
+
if (4 & n3 && "object" == typeof e2 && e2 && e2.__esModule) return e2;
|
|
1782
|
+
var r2 = /* @__PURE__ */ Object.create(null);
|
|
1783
|
+
if (t2.r(r2), Object.defineProperty(r2, "default", { enumerable: true, value: e2 }), 2 & n3 && "string" != typeof e2) for (var o2 in e2) t2.d(r2, o2, function(n4) {
|
|
1784
|
+
return e2[n4];
|
|
1785
|
+
}.bind(null, o2));
|
|
1786
|
+
return r2;
|
|
1787
|
+
}, t2.n = function(e2) {
|
|
1788
|
+
var n3 = e2 && e2.__esModule ? function() {
|
|
1789
|
+
return e2.default;
|
|
1790
|
+
} : function() {
|
|
1791
|
+
return e2;
|
|
1792
|
+
};
|
|
1793
|
+
return t2.d(n3, "a", n3), n3;
|
|
1794
|
+
}, t2.o = function(e2, n3) {
|
|
1795
|
+
return Object.prototype.hasOwnProperty.call(e2, n3);
|
|
1796
|
+
}, t2.p = "", t2(t2.s = 14);
|
|
1797
|
+
}({ 14: function(e, n2, t2) {
|
|
1798
|
+
t2.r(n2);
|
|
1799
|
+
t2(41);
|
|
1800
|
+
var r2 = "@@polyvAdminUIzIndex", o2 = { ctx: r2, openPopper: function(e2) {
|
|
1801
|
+
o2.zIndex++, e2.style.zIndex = o2.zIndex;
|
|
1802
|
+
}, install: function(e2) {
|
|
1803
|
+
var n3 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, t3 = n3.defaultZIndex, o3 = void 0 === t3 ? 3e3 : t3;
|
|
1804
|
+
window[r2] = o3;
|
|
1805
|
+
} };
|
|
1806
|
+
Object.defineProperty(o2, "zIndex", { configurable: true, get: function() {
|
|
1807
|
+
return window[r2] || (window[r2] = 3e3), window[r2];
|
|
1808
|
+
}, set: function(e2) {
|
|
1809
|
+
window[r2] = e2;
|
|
1810
|
+
} }), n2.default = o2;
|
|
1811
|
+
}, 41: function(e, n2, t2) {
|
|
1812
|
+
} }).default;
|
|
1813
|
+
return popperManager;
|
|
1814
|
+
}
|
|
1815
|
+
requirePopperManager();
|
|
1816
|
+
var radio;
|
|
1817
|
+
var hasRequiredRadio;
|
|
1818
|
+
function requireRadio() {
|
|
1819
|
+
if (hasRequiredRadio) return radio;
|
|
1820
|
+
hasRequiredRadio = 1;
|
|
1821
|
+
radio = function(t2) {
|
|
1822
|
+
var e = {};
|
|
1823
|
+
function r2(n2) {
|
|
1824
|
+
if (e[n2]) return e[n2].exports;
|
|
1825
|
+
var o2 = e[n2] = { i: n2, l: false, exports: {} };
|
|
1826
|
+
return t2[n2].call(o2.exports, o2, o2.exports, r2), o2.l = true, o2.exports;
|
|
1827
|
+
}
|
|
1828
|
+
return r2.m = t2, r2.c = e, r2.d = function(t3, e2, n2) {
|
|
1829
|
+
r2.o(t3, e2) || Object.defineProperty(t3, e2, { enumerable: true, get: n2 });
|
|
1830
|
+
}, r2.r = function(t3) {
|
|
1831
|
+
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t3, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t3, "__esModule", { value: true });
|
|
1832
|
+
}, r2.t = function(t3, e2) {
|
|
1833
|
+
if (1 & e2 && (t3 = r2(t3)), 8 & e2) return t3;
|
|
1834
|
+
if (4 & e2 && "object" == typeof t3 && t3 && t3.__esModule) return t3;
|
|
1835
|
+
var n2 = /* @__PURE__ */ Object.create(null);
|
|
1836
|
+
if (r2.r(n2), Object.defineProperty(n2, "default", { enumerable: true, value: t3 }), 2 & e2 && "string" != typeof t3) for (var o2 in t3) r2.d(n2, o2, function(e3) {
|
|
1837
|
+
return t3[e3];
|
|
1838
|
+
}.bind(null, o2));
|
|
1839
|
+
return n2;
|
|
1840
|
+
}, r2.n = function(t3) {
|
|
1841
|
+
var e2 = t3 && t3.__esModule ? function() {
|
|
1842
|
+
return t3.default;
|
|
1843
|
+
} : function() {
|
|
1844
|
+
return t3;
|
|
1845
|
+
};
|
|
1846
|
+
return r2.d(e2, "a", e2), e2;
|
|
1847
|
+
}, r2.o = function(t3, e2) {
|
|
1848
|
+
return Object.prototype.hasOwnProperty.call(t3, e2);
|
|
1849
|
+
}, r2.p = "", r2(r2.s = 298);
|
|
1850
|
+
}({ 0: function(t2, e, r2) {
|
|
1851
|
+
function n2(t3, e2, r3, n3, o2, i2, a2, s2) {
|
|
1852
|
+
var u2, c2 = "function" == typeof t3 ? t3.options : t3;
|
|
1853
|
+
if (e2 && (c2.render = e2, c2.staticRenderFns = r3, c2._compiled = true), n3 && (c2.functional = true), i2 && (c2._scopeId = "data-v-" + i2), a2 ? (u2 = function(t4) {
|
|
1854
|
+
(t4 = t4 || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) || "undefined" == typeof __VUE_SSR_CONTEXT__ || (t4 = __VUE_SSR_CONTEXT__), o2 && o2.call(this, t4), t4 && t4._registeredComponents && t4._registeredComponents.add(a2);
|
|
1855
|
+
}, c2._ssrRegister = u2) : o2 && (u2 = s2 ? function() {
|
|
1856
|
+
o2.call(this, this.$root.$options.shadowRoot);
|
|
1857
|
+
} : o2), u2) if (c2.functional) {
|
|
1858
|
+
c2._injectStyles = u2;
|
|
1859
|
+
var l2 = c2.render;
|
|
1860
|
+
c2.render = function(t4, e3) {
|
|
1861
|
+
return u2.call(e3), l2(t4, e3);
|
|
1862
|
+
};
|
|
1863
|
+
} else {
|
|
1864
|
+
var f2 = c2.beforeCreate;
|
|
1865
|
+
c2.beforeCreate = f2 ? [].concat(f2, u2) : [u2];
|
|
1866
|
+
}
|
|
1867
|
+
return { exports: t3, options: c2 };
|
|
1868
|
+
}
|
|
1869
|
+
r2.d(e, "a", function() {
|
|
1870
|
+
return n2;
|
|
1871
|
+
});
|
|
1872
|
+
}, 115: function(t2, e, r2) {
|
|
1873
|
+
var n2 = { name: "plv-radio", mixins: [r2(15).a], inject: { radioGroup: { default: "" } }, props: { checked: { type: Boolean, default: false }, value: [String, Number, Boolean], label: String, trueLabel: String, falseLabel: String, type: { type: String, default: "", validator: function(t3) {
|
|
1874
|
+
return -1 !== ["", "border"].indexOf(t3);
|
|
1875
|
+
} }, disabled: { type: Boolean, default: false }, readonly: { type: Boolean, default: false }, corner: { type: Boolean, default: false } }, model: { prop: "checked", event: "change" }, computed: { inGroup: function() {
|
|
1876
|
+
return !!this.radioGroup;
|
|
1877
|
+
}, isChecked: function() {
|
|
1878
|
+
return this.inGroup ? this.radioGroup.value === this.value : this.checked;
|
|
1879
|
+
}, isDisabled: function() {
|
|
1880
|
+
return this.disabled || this.inGroup && this.radioGroup.disabled;
|
|
1881
|
+
}, isReadonly: function() {
|
|
1882
|
+
return this.readonly || this.radioGroup.readonly;
|
|
1883
|
+
}, radioLabel: function() {
|
|
1884
|
+
return this.isChecked ? this.trueLabel || this.label : this.falseLabel || this.label;
|
|
1885
|
+
}, radioType: function() {
|
|
1886
|
+
return this.type || this.radioGroup.type;
|
|
1887
|
+
}, isHasSlot: function() {
|
|
1888
|
+
return this.$slots.default || this.$slots.trueLabel || this.$slots.falseLabel;
|
|
1889
|
+
} }, methods: { emitChange: function(t3) {
|
|
1890
|
+
this.$emit("change", t3);
|
|
1891
|
+
}, handleClick: function() {
|
|
1892
|
+
this.isDisabled || this.isReadonly || (this.inGroup ? this.radioGroup.radioClick(this.value) : this.checked || this.emitChange(true), this.blurToValidateItem());
|
|
1893
|
+
} } }, o2 = (r2(354), r2(355), r2(0)), i2 = Object(o2.a)(n2, function() {
|
|
1894
|
+
var t3 = this, e2 = t3.$createElement, r3 = t3._self._c || e2;
|
|
1895
|
+
return r3("label", { staticClass: "plv-radio", class: { "plv-radio--checked": t3.isChecked, "plv-radio--disabled": t3.isDisabled, "plv-radio--readonly": t3.isReadonly, "plv-radio--border": "border" === t3.radioType }, on: { click: t3.handleClick } }, ["border" !== t3.radioType ? r3("span", { staticClass: "plv-radio__inner", class: { "plv-radio__inner--checked": t3.isChecked } }) : t3._e(), t3._v(" "), t3.radioLabel || t3.isHasSlot ? r3("span", { staticClass: "plv-radio__label" }, [t3.isChecked ? [t3.$slots.trueLabel ? [t3._t("trueLabel", [t3._v(t3._s(t3.trueLabel))])] : [t3._t("default", [t3._v(t3._s(t3.radioLabel))])]] : [t3.$slots.falseLabel ? [t3._t("falseLabel", [t3._v(t3._s(t3.falseLabel))])] : [t3._t("default", [t3._v(t3._s(t3.radioLabel))])]]], 2) : t3._e(), t3._v(" "), "border" === t3.type && t3.isChecked && t3.corner ? r3("div", { staticClass: "plv-radio__corner" }) : t3._e()]);
|
|
1896
|
+
}, [], false, null, null, null);
|
|
1897
|
+
e.a = i2.exports;
|
|
1898
|
+
}, 147: function(t2, e, r2) {
|
|
1899
|
+
}, 148: function(t2, e, r2) {
|
|
1900
|
+
}, 15: function(t2, e, r2) {
|
|
1901
|
+
r2.d(e, "a", function() {
|
|
1902
|
+
return i2;
|
|
1903
|
+
});
|
|
1904
|
+
var n2 = r2(2), o2 = r2.n(n2), i2 = { inject: { formItem: { default: void 0 } }, computed: { formItemIsError: function() {
|
|
1905
|
+
return !!this.formItem && this.formItem.formItemIsError;
|
|
1906
|
+
} }, watch: { showPopper: function() {
|
|
1907
|
+
this.showPopper ? this.focusToRemoveError() : this.blurToValidateItem();
|
|
1908
|
+
} }, methods: { validateCurrentFormItem: function() {
|
|
1909
|
+
if (this.formItem) return this.formItem.validate();
|
|
1910
|
+
}, blurToValidateItem: function() {
|
|
1911
|
+
return o2.a.async(function(t3) {
|
|
1912
|
+
for (; ; ) switch (t3.prev = t3.next) {
|
|
1913
|
+
case 0:
|
|
1914
|
+
return t3.prev = 0, t3.next = 3, o2.a.awrap(this.validateCurrentFormItem());
|
|
1915
|
+
case 3:
|
|
1916
|
+
t3.next = 8;
|
|
1917
|
+
break;
|
|
1918
|
+
case 5:
|
|
1919
|
+
t3.prev = 5, t3.t0 = t3.catch(0), console.error("blur-validate", t3.t0.message);
|
|
1920
|
+
case 8:
|
|
1921
|
+
case "end":
|
|
1922
|
+
return t3.stop();
|
|
1923
|
+
}
|
|
1924
|
+
}, null, this, [[0, 5]]);
|
|
1925
|
+
}, focusToRemoveError: function() {
|
|
1926
|
+
this.formItem && this.formItem.removeErrorMessage();
|
|
1927
|
+
} } };
|
|
1928
|
+
}, 2: function(t2, e, r2) {
|
|
1929
|
+
t2.exports = r2(24);
|
|
1930
|
+
}, 24: function(t2, e, r2) {
|
|
1931
|
+
var n2 = function(t3) {
|
|
1932
|
+
var e2, r3 = Object.prototype, n3 = r3.hasOwnProperty, o2 = "function" == typeof Symbol ? Symbol : {}, i2 = o2.iterator || "@@iterator", a2 = o2.asyncIterator || "@@asyncIterator", s2 = o2.toStringTag || "@@toStringTag";
|
|
1933
|
+
function u2(t4, e3, r4) {
|
|
1934
|
+
return Object.defineProperty(t4, e3, { value: r4, enumerable: true, configurable: true, writable: true }), t4[e3];
|
|
1935
|
+
}
|
|
1936
|
+
try {
|
|
1937
|
+
u2({}, "");
|
|
1938
|
+
} catch (t4) {
|
|
1939
|
+
u2 = function(t5, e3, r4) {
|
|
1940
|
+
return t5[e3] = r4;
|
|
1941
|
+
};
|
|
1942
|
+
}
|
|
1943
|
+
function c2(t4, e3, r4, n4) {
|
|
1944
|
+
var o3 = e3 && e3.prototype instanceof y2 ? e3 : y2, i3 = Object.create(o3.prototype), a3 = new O2(n4 || []);
|
|
1945
|
+
return i3._invoke = /* @__PURE__ */ function(t5, e4, r5) {
|
|
1946
|
+
var n5 = f2;
|
|
1947
|
+
return function(o4, i4) {
|
|
1948
|
+
if (n5 === d2) throw new Error("Generator is already running");
|
|
1949
|
+
if (n5 === p2) {
|
|
1950
|
+
if ("throw" === o4) throw i4;
|
|
1951
|
+
return T2();
|
|
1952
|
+
}
|
|
1953
|
+
for (r5.method = o4, r5.arg = i4; ; ) {
|
|
1954
|
+
var a4 = r5.delegate;
|
|
1955
|
+
if (a4) {
|
|
1956
|
+
var s3 = k2(a4, r5);
|
|
1957
|
+
if (s3) {
|
|
1958
|
+
if (s3 === v2) continue;
|
|
1959
|
+
return s3;
|
|
1960
|
+
}
|
|
1961
|
+
}
|
|
1962
|
+
if ("next" === r5.method) r5.sent = r5._sent = r5.arg;
|
|
1963
|
+
else if ("throw" === r5.method) {
|
|
1964
|
+
if (n5 === f2) throw n5 = p2, r5.arg;
|
|
1965
|
+
r5.dispatchException(r5.arg);
|
|
1966
|
+
} else "return" === r5.method && r5.abrupt("return", r5.arg);
|
|
1967
|
+
n5 = d2;
|
|
1968
|
+
var u3 = l2(t5, e4, r5);
|
|
1969
|
+
if ("normal" === u3.type) {
|
|
1970
|
+
if (n5 = r5.done ? p2 : h2, u3.arg === v2) continue;
|
|
1971
|
+
return { value: u3.arg, done: r5.done };
|
|
1972
|
+
}
|
|
1973
|
+
"throw" === u3.type && (n5 = p2, r5.method = "throw", r5.arg = u3.arg);
|
|
1974
|
+
}
|
|
1975
|
+
};
|
|
1976
|
+
}(t4, r4, a3), i3;
|
|
1977
|
+
}
|
|
1978
|
+
function l2(t4, e3, r4) {
|
|
1979
|
+
try {
|
|
1980
|
+
return { type: "normal", arg: t4.call(e3, r4) };
|
|
1981
|
+
} catch (t5) {
|
|
1982
|
+
return { type: "throw", arg: t5 };
|
|
1983
|
+
}
|
|
1984
|
+
}
|
|
1985
|
+
t3.wrap = c2;
|
|
1986
|
+
var f2 = "suspendedStart", h2 = "suspendedYield", d2 = "executing", p2 = "completed", v2 = {};
|
|
1987
|
+
function y2() {
|
|
1988
|
+
}
|
|
1989
|
+
function m2() {
|
|
1990
|
+
}
|
|
1991
|
+
function g2() {
|
|
1992
|
+
}
|
|
1993
|
+
var b2 = {};
|
|
1994
|
+
u2(b2, i2, function() {
|
|
1995
|
+
return this;
|
|
1996
|
+
});
|
|
1997
|
+
var _2 = Object.getPrototypeOf, w2 = _2 && _2(_2(S2([])));
|
|
1998
|
+
w2 && w2 !== r3 && n3.call(w2, i2) && (b2 = w2);
|
|
1999
|
+
var L2 = g2.prototype = y2.prototype = Object.create(b2);
|
|
2000
|
+
function x2(t4) {
|
|
2001
|
+
["next", "throw", "return"].forEach(function(e3) {
|
|
2002
|
+
u2(t4, e3, function(t5) {
|
|
2003
|
+
return this._invoke(e3, t5);
|
|
2004
|
+
});
|
|
2005
|
+
});
|
|
2006
|
+
}
|
|
2007
|
+
function E2(t4, e3) {
|
|
2008
|
+
var r4;
|
|
2009
|
+
this._invoke = function(o3, i3) {
|
|
2010
|
+
function a3() {
|
|
2011
|
+
return new e3(function(r5, a4) {
|
|
2012
|
+
!function r6(o4, i4, a5, s3) {
|
|
2013
|
+
var u3 = l2(t4[o4], t4, i4);
|
|
2014
|
+
if ("throw" !== u3.type) {
|
|
2015
|
+
var c3 = u3.arg, f3 = c3.value;
|
|
2016
|
+
return f3 && "object" == typeof f3 && n3.call(f3, "__await") ? e3.resolve(f3.__await).then(function(t5) {
|
|
2017
|
+
r6("next", t5, a5, s3);
|
|
2018
|
+
}, function(t5) {
|
|
2019
|
+
r6("throw", t5, a5, s3);
|
|
2020
|
+
}) : e3.resolve(f3).then(function(t5) {
|
|
2021
|
+
c3.value = t5, a5(c3);
|
|
2022
|
+
}, function(t5) {
|
|
2023
|
+
return r6("throw", t5, a5, s3);
|
|
2024
|
+
});
|
|
2025
|
+
}
|
|
2026
|
+
s3(u3.arg);
|
|
2027
|
+
}(o3, i3, r5, a4);
|
|
2028
|
+
});
|
|
2029
|
+
}
|
|
2030
|
+
return r4 = r4 ? r4.then(a3, a3) : a3();
|
|
2031
|
+
};
|
|
2032
|
+
}
|
|
2033
|
+
function k2(t4, r4) {
|
|
2034
|
+
var n4 = t4.iterator[r4.method];
|
|
2035
|
+
if (n4 === e2) {
|
|
2036
|
+
if (r4.delegate = null, "throw" === r4.method) {
|
|
2037
|
+
if (t4.iterator.return && (r4.method = "return", r4.arg = e2, k2(t4, r4), "throw" === r4.method)) return v2;
|
|
2038
|
+
r4.method = "throw", r4.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
2039
|
+
}
|
|
2040
|
+
return v2;
|
|
2041
|
+
}
|
|
2042
|
+
var o3 = l2(n4, t4.iterator, r4.arg);
|
|
2043
|
+
if ("throw" === o3.type) return r4.method = "throw", r4.arg = o3.arg, r4.delegate = null, v2;
|
|
2044
|
+
var i3 = o3.arg;
|
|
2045
|
+
return i3 ? i3.done ? (r4[t4.resultName] = i3.value, r4.next = t4.nextLoc, "return" !== r4.method && (r4.method = "next", r4.arg = e2), r4.delegate = null, v2) : i3 : (r4.method = "throw", r4.arg = new TypeError("iterator result is not an object"), r4.delegate = null, v2);
|
|
2046
|
+
}
|
|
2047
|
+
function C(t4) {
|
|
2048
|
+
var e3 = { tryLoc: t4[0] };
|
|
2049
|
+
1 in t4 && (e3.catchLoc = t4[1]), 2 in t4 && (e3.finallyLoc = t4[2], e3.afterLoc = t4[3]), this.tryEntries.push(e3);
|
|
2050
|
+
}
|
|
2051
|
+
function j2(t4) {
|
|
2052
|
+
var e3 = t4.completion || {};
|
|
2053
|
+
e3.type = "normal", delete e3.arg, t4.completion = e3;
|
|
2054
|
+
}
|
|
2055
|
+
function O2(t4) {
|
|
2056
|
+
this.tryEntries = [{ tryLoc: "root" }], t4.forEach(C, this), this.reset(true);
|
|
2057
|
+
}
|
|
2058
|
+
function S2(t4) {
|
|
2059
|
+
if (t4) {
|
|
2060
|
+
var r4 = t4[i2];
|
|
2061
|
+
if (r4) return r4.call(t4);
|
|
2062
|
+
if ("function" == typeof t4.next) return t4;
|
|
2063
|
+
if (!isNaN(t4.length)) {
|
|
2064
|
+
var o3 = -1, a3 = function r5() {
|
|
2065
|
+
for (; ++o3 < t4.length; ) if (n3.call(t4, o3)) return r5.value = t4[o3], r5.done = false, r5;
|
|
2066
|
+
return r5.value = e2, r5.done = true, r5;
|
|
2067
|
+
};
|
|
2068
|
+
return a3.next = a3;
|
|
2069
|
+
}
|
|
2070
|
+
}
|
|
2071
|
+
return { next: T2 };
|
|
2072
|
+
}
|
|
2073
|
+
function T2() {
|
|
2074
|
+
return { value: e2, done: true };
|
|
2075
|
+
}
|
|
2076
|
+
return m2.prototype = g2, u2(L2, "constructor", g2), u2(g2, "constructor", m2), m2.displayName = u2(g2, s2, "GeneratorFunction"), t3.isGeneratorFunction = function(t4) {
|
|
2077
|
+
var e3 = "function" == typeof t4 && t4.constructor;
|
|
2078
|
+
return !!e3 && (e3 === m2 || "GeneratorFunction" === (e3.displayName || e3.name));
|
|
2079
|
+
}, t3.mark = function(t4) {
|
|
2080
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t4, g2) : (t4.__proto__ = g2, u2(t4, s2, "GeneratorFunction")), t4.prototype = Object.create(L2), t4;
|
|
2081
|
+
}, t3.awrap = function(t4) {
|
|
2082
|
+
return { __await: t4 };
|
|
2083
|
+
}, x2(E2.prototype), u2(E2.prototype, a2, function() {
|
|
2084
|
+
return this;
|
|
2085
|
+
}), t3.AsyncIterator = E2, t3.async = function(e3, r4, n4, o3, i3) {
|
|
2086
|
+
void 0 === i3 && (i3 = Promise);
|
|
2087
|
+
var a3 = new E2(c2(e3, r4, n4, o3), i3);
|
|
2088
|
+
return t3.isGeneratorFunction(r4) ? a3 : a3.next().then(function(t4) {
|
|
2089
|
+
return t4.done ? t4.value : a3.next();
|
|
2090
|
+
});
|
|
2091
|
+
}, x2(L2), u2(L2, s2, "Generator"), u2(L2, i2, function() {
|
|
2092
|
+
return this;
|
|
2093
|
+
}), u2(L2, "toString", function() {
|
|
2094
|
+
return "[object Generator]";
|
|
2095
|
+
}), t3.keys = function(t4) {
|
|
2096
|
+
var e3 = [];
|
|
2097
|
+
for (var r4 in t4) e3.push(r4);
|
|
2098
|
+
return e3.reverse(), function r5() {
|
|
2099
|
+
for (; e3.length; ) {
|
|
2100
|
+
var n4 = e3.pop();
|
|
2101
|
+
if (n4 in t4) return r5.value = n4, r5.done = false, r5;
|
|
2102
|
+
}
|
|
2103
|
+
return r5.done = true, r5;
|
|
2104
|
+
};
|
|
2105
|
+
}, t3.values = S2, O2.prototype = { constructor: O2, reset: function(t4) {
|
|
2106
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = e2, this.done = false, this.delegate = null, this.method = "next", this.arg = e2, this.tryEntries.forEach(j2), !t4) for (var r4 in this) "t" === r4.charAt(0) && n3.call(this, r4) && !isNaN(+r4.slice(1)) && (this[r4] = e2);
|
|
2107
|
+
}, stop: function() {
|
|
2108
|
+
this.done = true;
|
|
2109
|
+
var t4 = this.tryEntries[0].completion;
|
|
2110
|
+
if ("throw" === t4.type) throw t4.arg;
|
|
2111
|
+
return this.rval;
|
|
2112
|
+
}, dispatchException: function(t4) {
|
|
2113
|
+
if (this.done) throw t4;
|
|
2114
|
+
var r4 = this;
|
|
2115
|
+
function o3(n4, o4) {
|
|
2116
|
+
return s3.type = "throw", s3.arg = t4, r4.next = n4, o4 && (r4.method = "next", r4.arg = e2), !!o4;
|
|
2117
|
+
}
|
|
2118
|
+
for (var i3 = this.tryEntries.length - 1; i3 >= 0; --i3) {
|
|
2119
|
+
var a3 = this.tryEntries[i3], s3 = a3.completion;
|
|
2120
|
+
if ("root" === a3.tryLoc) return o3("end");
|
|
2121
|
+
if (a3.tryLoc <= this.prev) {
|
|
2122
|
+
var u3 = n3.call(a3, "catchLoc"), c3 = n3.call(a3, "finallyLoc");
|
|
2123
|
+
if (u3 && c3) {
|
|
2124
|
+
if (this.prev < a3.catchLoc) return o3(a3.catchLoc, true);
|
|
2125
|
+
if (this.prev < a3.finallyLoc) return o3(a3.finallyLoc);
|
|
2126
|
+
} else if (u3) {
|
|
2127
|
+
if (this.prev < a3.catchLoc) return o3(a3.catchLoc, true);
|
|
2128
|
+
} else {
|
|
2129
|
+
if (!c3) throw new Error("try statement without catch or finally");
|
|
2130
|
+
if (this.prev < a3.finallyLoc) return o3(a3.finallyLoc);
|
|
2131
|
+
}
|
|
2132
|
+
}
|
|
2133
|
+
}
|
|
2134
|
+
}, abrupt: function(t4, e3) {
|
|
2135
|
+
for (var r4 = this.tryEntries.length - 1; r4 >= 0; --r4) {
|
|
2136
|
+
var o3 = this.tryEntries[r4];
|
|
2137
|
+
if (o3.tryLoc <= this.prev && n3.call(o3, "finallyLoc") && this.prev < o3.finallyLoc) {
|
|
2138
|
+
var i3 = o3;
|
|
2139
|
+
break;
|
|
2140
|
+
}
|
|
2141
|
+
}
|
|
2142
|
+
i3 && ("break" === t4 || "continue" === t4) && i3.tryLoc <= e3 && e3 <= i3.finallyLoc && (i3 = null);
|
|
2143
|
+
var a3 = i3 ? i3.completion : {};
|
|
2144
|
+
return a3.type = t4, a3.arg = e3, i3 ? (this.method = "next", this.next = i3.finallyLoc, v2) : this.complete(a3);
|
|
2145
|
+
}, complete: function(t4, e3) {
|
|
2146
|
+
if ("throw" === t4.type) throw t4.arg;
|
|
2147
|
+
return "break" === t4.type || "continue" === t4.type ? this.next = t4.arg : "return" === t4.type ? (this.rval = this.arg = t4.arg, this.method = "return", this.next = "end") : "normal" === t4.type && e3 && (this.next = e3), v2;
|
|
2148
|
+
}, finish: function(t4) {
|
|
2149
|
+
for (var e3 = this.tryEntries.length - 1; e3 >= 0; --e3) {
|
|
2150
|
+
var r4 = this.tryEntries[e3];
|
|
2151
|
+
if (r4.finallyLoc === t4) return this.complete(r4.completion, r4.afterLoc), j2(r4), v2;
|
|
2152
|
+
}
|
|
2153
|
+
}, catch: function(t4) {
|
|
2154
|
+
for (var e3 = this.tryEntries.length - 1; e3 >= 0; --e3) {
|
|
2155
|
+
var r4 = this.tryEntries[e3];
|
|
2156
|
+
if (r4.tryLoc === t4) {
|
|
2157
|
+
var n4 = r4.completion;
|
|
2158
|
+
if ("throw" === n4.type) {
|
|
2159
|
+
var o3 = n4.arg;
|
|
2160
|
+
j2(r4);
|
|
2161
|
+
}
|
|
2162
|
+
return o3;
|
|
2163
|
+
}
|
|
2164
|
+
}
|
|
2165
|
+
throw new Error("illegal catch attempt");
|
|
2166
|
+
}, delegateYield: function(t4, r4, n4) {
|
|
2167
|
+
return this.delegate = { iterator: S2(t4), resultName: r4, nextLoc: n4 }, "next" === this.method && (this.arg = e2), v2;
|
|
2168
|
+
} }, t3;
|
|
2169
|
+
}(t2.exports);
|
|
2170
|
+
try {
|
|
2171
|
+
regeneratorRuntime = n2;
|
|
2172
|
+
} catch (t3) {
|
|
2173
|
+
"object" == typeof globalThis ? globalThis.regeneratorRuntime = n2 : Function("r", "regeneratorRuntime = r")(n2);
|
|
2174
|
+
}
|
|
2175
|
+
}, 298: function(t2, e, r2) {
|
|
2176
|
+
r2.r(e);
|
|
2177
|
+
var n2 = r2(115);
|
|
2178
|
+
n2.a.install = function(t3) {
|
|
2179
|
+
t3.component(n2.a.name, n2.a);
|
|
2180
|
+
}, e.default = n2.a;
|
|
2181
|
+
}, 354: function(t2, e, r2) {
|
|
2182
|
+
var n2 = r2(147);
|
|
2183
|
+
r2.n(n2).a;
|
|
2184
|
+
}, 355: function(t2, e, r2) {
|
|
2185
|
+
var n2 = r2(148);
|
|
2186
|
+
r2.n(n2).a;
|
|
2187
|
+
} }).default;
|
|
2188
|
+
return radio;
|
|
2189
|
+
}
|
|
2190
|
+
var radioExports = requireRadio();
|
|
2191
|
+
const PlvRadio = /* @__PURE__ */ getDefaultExportFromCjs(radioExports);
|
|
2192
|
+
const IconWechat = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1_31044'%3e%3crect%20x='0'%20y='0'%20width='24'%20height='24'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_1_31044)'%3e%3cg%3e%3cpath%20d='M7.9075653125,8.011559448241844C7.4913803125000005,8.011559448241844,7.0751953125,8.289016532714843,7.0751953125,8.705201532714844C7.0751953125,9.121388532714844,7.4913803125000005,9.398838532714844,7.9075653125,9.398838532714844C8.3237453125,9.398838532714844,8.6012053125,9.121388532714844,8.6012053125,8.705201532714844C8.6012053125,8.271675532714843,8.3237453125,8.011559448241844,7.9075653125,8.011559448241844ZM13.5434053125,12.034678532714842C13.265945312500001,12.034678532714842,13.0058353125,12.329478532714845,13.0058353125,12.589588532714844C13.0058353125,12.884388532714844,13.2832853125,13.144508532714845,13.5434053125,13.144508532714845C13.9595853125,13.144508532714845,14.237045312500001,12.867048532714843,14.237045312500001,12.589588532714844C14.237045312500001,12.312138532714844,13.9595853125,12.034678532714842,13.5434053125,12.034678532714842ZM11.7572753125,9.398838532714844C12.1734653125,9.398838532714844,12.450915312500001,9.104048532714843,12.450915312500001,8.705200532714844C12.450915312500001,8.289015532714844,12.1734653125,8.011558532714844,11.7572753125,8.011558532714844C11.3410953125,8.011558532714844,10.9249053125,8.289015532714844,10.9249053125,8.705200532714844C10.9249053125,9.121388532714844,11.3410953125,9.398838532714844,11.7572753125,9.398838532714844ZM16.5607453125,12.034678532714842C16.2832853125,12.034678532714842,16.0231753125,12.329478532714845,16.0231753125,12.589588532714844C16.0231753125,12.884388532714844,16.3006253125,13.144508532714845,16.5607453125,13.144508532714845C16.9769253125,13.144508532714845,17.2543953125,12.867048532714843,17.2543953125,12.589588532714844C17.2543953125,12.312138532714844,16.9769353125,12.034678532714842,16.5607453125,12.034678532714842Z'%20fill='%2328C445'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M11.9653,0.069366455078125C5.35838,0.069366455078125,0,5.427746455078125,0,12.034666455078124C0,18.641666455078123,5.35838,23.999966455078123,11.9653,23.999966455078123C18.5723,23.999966455078123,23.9306,18.641666455078123,23.9306,12.034666455078124C23.9306,5.427746455078125,18.5723,0.069366297722125,11.9653,0.069366455078125ZM9.69364,15.104066455078126C9,15.104066455078126,8.44509,14.965366455078126,7.78613,14.809266455078125L5.87861,15.780366455078125L6.41619,14.098266455078125C5.04624,13.127166455078125,4.21387,11.861266455078125,4.21387,10.352566455078126C4.21387,7.699426455078125,6.69364,5.618496455078125,9.69364,5.618496455078125C12.3815,5.618496455078125,14.7572,7.283236455078125,15.2254,9.520236455078125C15.052,9.502896455078124,14.8786,9.485546455078126,14.7052,9.485546455078126C12.104,9.520236455078125,10.0578,11.479766455078124,10.0578,13.907566455078126C10.0578,14.306366455078125,10.1272,14.687866455078124,10.2312,15.069366455078125C10.0578,15.086666455078126,9.86705,15.104066455078126,9.69364,15.104066455078126ZM17.8092,17.046266455078126L18.2254,18.433566455078125L16.7341,17.601166455078125C16.1965,17.739866455078126,15.6416,17.878566455078126,15.0867,17.878566455078126C12.4682,17.878566455078126,10.4046,16.075166455078126,10.4046,13.838166455078126C10.3873,11.618466455078124,12.4509,9.815026455078126,15.052,9.815026455078126C17.5318,9.815026455078126,19.7168,11.635866455078125,19.7168,13.855466455078124C19.7168,15.104066455078126,18.9017,16.213866455078126,17.8092,17.046266455078126Z'%20fill='%232AAE67'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e";
|
|
2193
|
+
const IconAlipay = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1_31591'%3e%3crect%20x='0'%20y='0'%20width='24'%20height='24'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_1_31591)'%3e%3cg%3e%3cpath%20d='M5.4087,13.513C5.11304,13.7391,4.81739,14.0696,4.73043,14.5043C4.6087,15.0783,4.71304,15.8087,5.25217,16.3826C5.93043,17.0609,6.95652,17.2522,7.4087,17.287C8.6087,17.3739,9.89565,16.7652,10.8696,16.1043C11.2522,15.8435,11.8957,15.3043,12.5217,14.4696C11.1304,13.7565,9.3913,12.9565,7.54783,13.0261C6.57391,13.0609,5.89565,13.2522,5.4087,13.513ZM23.0435,16.6957C23.6522,15.2522,24,13.6696,24,12C24,5.3913,18.6087,0,12,0C5.3913,0,0,5.3913,0,12C0,18.6087,5.3913,24,12,24C16,24,19.5304,22.0348,21.7217,19.0261C19.6522,18.0174,16.2609,16.313,14.1565,15.3043C13.1652,16.4522,11.687,17.5826,10.0174,18.0696C8.97391,18.3826,8.01739,18.5043,7.04348,18.2957C6.05217,18.087,5.33913,17.6348,4.92174,17.1826C4.71304,16.9391,4.46957,16.6609,4.27826,16.2957C4.29565,16.313,4.29565,16.3478,4.29565,16.3652Q4.1913,16.1913,4.12174,15.913C4.08696,15.7739,4.05217,15.6348,4.03478,15.4957C4.01739,15.3913,4.01739,15.287,4.03478,15.2C4.01739,15.0261,4.03478,14.8348,4.06957,14.6435C4.17391,14.1565,4.36522,13.6174,4.90435,13.113C6.05217,11.9826,7.6,11.9304,8.4,11.9304C9.58261,11.9478,11.6348,12.4522,13.3739,13.0783C13.8609,12.0522,14.1739,10.9739,14.3652,10.2261L7.14783,10.2261L7.14783,9.44348L10.8522,9.44348L10.8522,7.87826L6.38261,7.87826L6.38261,7.07826L10.8522,7.07826L10.8522,5.51305C10.8522,5.30435,10.9043,5.13044,11.2348,5.13044L12.9913,5.13044L12.9913,7.07826L17.8435,7.07826L17.8435,7.86087L12.9913,7.86087L12.9913,9.42609L16.8696,9.42609Q16.4696,11.6,15.2696,13.7391C17.9652,14.6957,21.7739,16.1913,23.0435,16.6957Z'%20fill='%231777FF'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e";
|
|
2194
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
2195
|
+
__name: "payment-method",
|
|
2196
|
+
props: {
|
|
2197
|
+
/**
|
|
2198
|
+
* 默认选中的支付方式
|
|
2199
|
+
*/
|
|
2200
|
+
value: PropUtils.string.def("WECHAT"),
|
|
2201
|
+
/**
|
|
2202
|
+
* 自定义支付方式
|
|
2203
|
+
*/
|
|
2204
|
+
paymentMethods: PropUtils.array().def([]),
|
|
2205
|
+
/**
|
|
2206
|
+
* 是否禁用支付方式
|
|
2207
|
+
*/
|
|
2208
|
+
disabled: PropUtils.bool.def(false)
|
|
2209
|
+
},
|
|
2210
|
+
emits: {
|
|
2211
|
+
"input": emitFunc()
|
|
2212
|
+
},
|
|
2213
|
+
setup(__props, { emit }) {
|
|
2214
|
+
const props = __props;
|
|
2215
|
+
const { $t } = useI18n();
|
|
2216
|
+
const { PaymentProvider } = useOrderInject();
|
|
2217
|
+
const defaultPaymentMethods = computed(() => [
|
|
2218
|
+
{
|
|
2219
|
+
label: $t("order.detail.wechat"),
|
|
2220
|
+
value: PaymentProvider.Wechat,
|
|
2221
|
+
icon: IconWechat
|
|
2222
|
+
},
|
|
2223
|
+
{
|
|
2224
|
+
label: $t("order.detail.alipay"),
|
|
2225
|
+
value: PaymentProvider.Alipay,
|
|
2226
|
+
icon: IconAlipay
|
|
2227
|
+
}
|
|
2228
|
+
]);
|
|
2229
|
+
const paymentMethodList = computed(() => {
|
|
2230
|
+
if (props.paymentMethods.length) return props.paymentMethods;
|
|
2231
|
+
return defaultPaymentMethods.value;
|
|
2232
|
+
});
|
|
2233
|
+
function selectPaymentMethod(methodValue) {
|
|
2234
|
+
if (props.disabled) return;
|
|
2235
|
+
emit("input", methodValue);
|
|
2236
|
+
}
|
|
2237
|
+
return { __sfc: true, props, emit, $t, PaymentProvider, defaultPaymentMethods, paymentMethodList, selectPaymentMethod, PlvRadio };
|
|
2238
|
+
}
|
|
2239
|
+
});
|
|
2240
|
+
var _sfc_render$3 = function render8() {
|
|
2241
|
+
var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
|
|
2242
|
+
return _c("div", { staticClass: "plv-product-c-payment-methods" }, [_c("div", { staticClass: "plv-product-c-payment-methods__title" }, [_vm._v(" " + _vm._s(_setup.$t("order.detail.paymentMethod")) + " ")]), _c("div", { staticClass: "plv-product-c-payment-methods__list" }, _vm._l(_setup.paymentMethodList, function(method, index) {
|
|
2243
|
+
return _c("div", { key: index, staticClass: "plv-product-c-payment-methods__item", on: { "click": function($event) {
|
|
2244
|
+
return _setup.selectPaymentMethod(method.value);
|
|
2245
|
+
} } }, [_c("div", { staticClass: "plv-product-c-payment-methods__item-info" }, [_c("div", { staticClass: "plv-product-c-payment-methods__item-icon" }, [_c("img", { attrs: { "src": method.icon, "alt": "icon" } })]), _c("span", { staticClass: "plv-product-c-payment-methods__item-label" }, [_vm._v(_vm._s(method.label))])]), _c(_setup.PlvRadio, { attrs: { "checked": _vm.value === method.value, "disabled": _vm.disabled } })], 1);
|
|
2246
|
+
}), 0)]);
|
|
2247
|
+
};
|
|
2248
|
+
var _sfc_staticRenderFns$3 = [];
|
|
2249
|
+
var __component__$3 = /* @__PURE__ */ normalizeComponent(
|
|
2250
|
+
_sfc_main$3,
|
|
2251
|
+
_sfc_render$3,
|
|
2252
|
+
_sfc_staticRenderFns$3
|
|
2253
|
+
);
|
|
2254
|
+
const PaymentMethod = __component__$3.exports;
|
|
2255
|
+
function ensureDate(e) {
|
|
2256
|
+
return "object" != typeof e && (e = new Date(e)), e;
|
|
2257
|
+
}
|
|
2258
|
+
function formatDate(e, t2) {
|
|
2259
|
+
const n2 = { Y: (e = ensureDate(e)).getFullYear(), M: e.getMonth() + 1, D: e.getDate(), h: e.getHours(), m: e.getMinutes(), s: e.getSeconds() };
|
|
2260
|
+
return t2.replace(/([YMDhms])\1*/g, function(e2) {
|
|
2261
|
+
let t3 = n2[e2[0]].toString();
|
|
2262
|
+
const r2 = e2.length;
|
|
2263
|
+
return r2 > t3.length && (t3 = new Array(r2 - t3.length + 1).join("0") + t3), t3;
|
|
2264
|
+
});
|
|
2265
|
+
}
|
|
2266
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
2267
|
+
__name: "order-info",
|
|
2268
|
+
setup(__props) {
|
|
2269
|
+
const { $t } = useI18n();
|
|
2270
|
+
const orderDetail2 = inject("orderDetail");
|
|
2271
|
+
const { OrderStatus, ProductDeliveryType } = useOrderInject();
|
|
2272
|
+
const orderCreatedAt = computed(() => {
|
|
2273
|
+
if (!(orderDetail2 == null ? void 0 : orderDetail2.value.createAt)) return "";
|
|
2274
|
+
return formatDate(orderDetail2.value.createAt, "YYYY.MM.DD hh:mm");
|
|
2275
|
+
});
|
|
2276
|
+
const orderDeliveryAt = computed(() => {
|
|
2277
|
+
if (!(orderDetail2 == null ? void 0 : orderDetail2.value)) return "";
|
|
2278
|
+
if (orderDetail2.value.status !== OrderStatus.Finish && orderDetail2.value.status !== OrderStatus.Delivering) return "";
|
|
2279
|
+
return formatDate(orderDetail2.value.deliveryAt, "YYYY.MM.DD hh:mm");
|
|
2280
|
+
});
|
|
2281
|
+
const orderFinishAt = computed(() => {
|
|
2282
|
+
if (!(orderDetail2 == null ? void 0 : orderDetail2.value)) return "";
|
|
2283
|
+
if (orderDetail2.value.status !== OrderStatus.Finish) return "";
|
|
2284
|
+
return formatDate(orderDetail2.value.finishAt, "YYYY.MM.DD hh:mm");
|
|
2285
|
+
});
|
|
2286
|
+
return { __sfc: true, $t, orderDetail: orderDetail2, OrderStatus, ProductDeliveryType, orderCreatedAt, orderDeliveryAt, orderFinishAt };
|
|
2287
|
+
}
|
|
2288
|
+
});
|
|
2289
|
+
var _sfc_render$2 = function render9() {
|
|
2290
|
+
var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
|
|
2291
|
+
return _setup.orderDetail ? _c("div", [_c("div", { staticClass: "plv-product-c-order-info__text" }, [_c("span", [_vm._v(_vm._s(_setup.$t("order.detail.orderNo")))]), _c("span", [_vm._v(_vm._s(_setup.orderDetail.orderNo))])]), _c("div", { staticClass: "plv-product-c-order-info__text" }, [_c("span", [_vm._v(_vm._s(_setup.$t("order.detail.createTime")))]), _c("span", [_vm._v(_vm._s(_setup.orderCreatedAt))])]), _setup.orderDetail.status !== _setup.OrderStatus.WaitPay && _setup.orderDetail.status !== _setup.OrderStatus.Close ? _c("div", { staticClass: "plv-product-c-order-info__text" }, [_c("span", [_vm._v(_vm._s(_setup.$t("order.detail.payTime")))]), _c("span", [_vm._v(_vm._s(_setup.orderDetail.payAt))])]) : _vm._e(), (_setup.orderDetail.status === _setup.OrderStatus.Finish || _setup.orderDetail.status === _setup.OrderStatus.Delivering) && _setup.orderDetail.products[0].deliveryType === _setup.ProductDeliveryType.Express ? _c("div", { staticClass: "plv-product-c-order-info__text" }, [_c("span", [_vm._v(_vm._s(_setup.$t("order.detail.deliveryTime")))]), _c("span", [_vm._v(_vm._s(_setup.orderDeliveryAt))])]) : _vm._e(), _setup.orderDetail.status === _setup.OrderStatus.Finish ? _c("div", { staticClass: "plv-product-c-order-info__text" }, [_c("span", [_vm._v(_vm._s(_setup.$t("order.detail.finishTime")))]), _c("span", [_vm._v(_vm._s(_setup.orderFinishAt))])]) : _vm._e(), _setup.orderDetail.status !== _setup.OrderStatus.WaitPay && _setup.orderDetail.status !== _setup.OrderStatus.Close ? _c("div", { staticClass: "plv-product-c-order-info__text" }, [_c("span", [_vm._v(_vm._s(_setup.$t("order.detail.actualPay")))]), _c("div", { staticClass: "plv-product-c-order-info__amount" }, [_c("span", { staticClass: "plv-product-c-order-info__amount-symbol" }, [_vm._v("¥")]), _c("span", { staticClass: "plv-product-c-order-info__amount-value plv-font-din-pro-regular" }, [_vm._v(_vm._s(_setup.orderDetail.amount))])])]) : _vm._e()]) : _vm._e();
|
|
2292
|
+
};
|
|
2293
|
+
var _sfc_staticRenderFns$2 = [];
|
|
2294
|
+
var __component__$2 = /* @__PURE__ */ normalizeComponent(
|
|
2295
|
+
_sfc_main$2,
|
|
2296
|
+
_sfc_render$2,
|
|
2297
|
+
_sfc_staticRenderFns$2
|
|
2298
|
+
);
|
|
2299
|
+
const OrderInfo = __component__$2.exports;
|
|
2300
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
2301
|
+
__name: "bottom-operate-panel",
|
|
2302
|
+
emits: {
|
|
2303
|
+
"click-order-btn": emitFunc()
|
|
2304
|
+
},
|
|
2305
|
+
setup(__props, { emit }) {
|
|
2306
|
+
const orderDetail2 = inject("orderDetail");
|
|
2307
|
+
const { $t } = useI18n();
|
|
2308
|
+
const { OrderStatus, ProductDeliveryType } = useOrderInject();
|
|
2309
|
+
const operatePanelVisible = computed(() => {
|
|
2310
|
+
if (!orderDetail2 || !orderDetail2.value) return false;
|
|
2311
|
+
return [OrderStatus.WaitPay, OrderStatus.Delivering, OrderStatus.WaitDelivery].includes(orderDetail2.value.status);
|
|
2312
|
+
});
|
|
2313
|
+
function onOrderBtnClick(action) {
|
|
2314
|
+
emit("click-order-btn", action);
|
|
2315
|
+
}
|
|
2316
|
+
return { __sfc: true, emit, orderDetail: orderDetail2, $t, OrderStatus, ProductDeliveryType, operatePanelVisible, onOrderBtnClick, OrderButtonAction };
|
|
2317
|
+
}
|
|
2318
|
+
});
|
|
2319
|
+
var _sfc_render$1 = function render10() {
|
|
2320
|
+
var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
|
|
2321
|
+
return _setup.orderDetail && _setup.operatePanelVisible ? _c("div", { staticClass: "plv-product-c-bottom-operate-panel" }, [_setup.orderDetail.status === _setup.OrderStatus.WaitPay ? _c("div", { staticClass: "plv-product-c-bottom-operate-panel__item" }, [_c("div", [_c("span", [_vm._v(_vm._s(_setup.$t("order.detail.actualPay")))]), _c("span", [_vm._v("¥")]), _c("span", [_vm._v(_vm._s(_setup.orderDetail.amount))])]), _c("span", { staticClass: "plv-product-c-bottom-operate-panel__btn", on: { "click": function($event) {
|
|
2322
|
+
return _setup.onOrderBtnClick(_setup.OrderButtonAction.Pay);
|
|
2323
|
+
} } }, [_vm._v(" " + _vm._s(_setup.$t("order.detail.payNow")) + " ")])]) : _vm._e(), _setup.orderDetail.status === _setup.OrderStatus.Delivering ? _c("div", { staticClass: "plv-product-c-bottom-operate-panel__item", on: { "click": function($event) {
|
|
2324
|
+
return _setup.onOrderBtnClick(_setup.OrderButtonAction.ConfirmReceipt);
|
|
2325
|
+
} } }, [_c("span", { staticClass: "plv-product-c-bottom-operate-panel__btn" }, [_vm._v(" " + _vm._s(_setup.$t("order.detail.confirmReceipt")) + " ")])]) : _vm._e(), _setup.orderDetail.status === _setup.OrderStatus.WaitDelivery && _setup.orderDetail.products[0].deliveryType === _setup.ProductDeliveryType.Express && _setup.orderDetail.products[0].realPrice > 0 ? _c("div", { staticClass: "plv-product-c-bottom-operate-panel__item", on: { "click": function($event) {
|
|
2326
|
+
return _setup.onOrderBtnClick(_setup.OrderButtonAction.ApplyRefund);
|
|
2327
|
+
} } }, [_c("span", { staticClass: "plv-product-c-bottom-operate-panel__btn plv-product-c-bottom-operate-panel__btn-refund" }, [_vm._v(" " + _vm._s(_setup.$t("order.applyRefund")) + " ")])]) : _vm._e()]) : _vm._e();
|
|
2328
|
+
};
|
|
2329
|
+
var _sfc_staticRenderFns$1 = [];
|
|
2330
|
+
var __component__$1 = /* @__PURE__ */ normalizeComponent(
|
|
2331
|
+
_sfc_main$1,
|
|
2332
|
+
_sfc_render$1,
|
|
2333
|
+
_sfc_staticRenderFns$1
|
|
2334
|
+
);
|
|
2335
|
+
const BottomOperatePanel = __component__$1.exports;
|
|
2336
|
+
const orderDetailProps = () => __spreadProps(__spreadValues({}, orderProps()), {
|
|
2337
|
+
/** 是否同步支付状态 */
|
|
2338
|
+
syncPayStatus: PropUtils.bool.def(false),
|
|
2339
|
+
/** 订单号 */
|
|
2340
|
+
orderNo: PropUtils.string.isRequired
|
|
2341
|
+
});
|
|
2342
|
+
const useOrderDetail = (options) => {
|
|
2343
|
+
const { props } = options;
|
|
2344
|
+
const { OrderStatus, PaymentProvider } = getOrderTargetExport(props.orderTarget);
|
|
2345
|
+
const { getEmitter } = useGlobalInject();
|
|
2346
|
+
const { onlySupportAlipay, getPayProviders } = usePayment({ props });
|
|
2347
|
+
const orderDetail2 = ref();
|
|
2348
|
+
const selectedPayMethod = ref(PaymentProvider.Wechat);
|
|
2349
|
+
const customerQrcodeVisible = computed(() => {
|
|
2350
|
+
var _a;
|
|
2351
|
+
if (!orderDetail2.value) return false;
|
|
2352
|
+
return orderDetail2.value.status !== OrderStatus.WaitPay && orderDetail2.value.status !== OrderStatus.Close && ((_a = orderDetail2.value.products) == null ? void 0 : _a[0].customerServiceType);
|
|
2353
|
+
});
|
|
2354
|
+
function getOrderDetail(_0) {
|
|
2355
|
+
return __async(this, arguments, function* (orderNo, syncPayStatus = props.syncPayStatus) {
|
|
2356
|
+
if (!props.orderTarget || !orderNo) return;
|
|
2357
|
+
const res = yield props.orderTarget.getOrderDetail({ orderNo, syncPayStatus });
|
|
2358
|
+
orderDetail2.value = res;
|
|
2359
|
+
return res;
|
|
2360
|
+
});
|
|
2361
|
+
}
|
|
2362
|
+
function isPaySucceeded(status) {
|
|
2363
|
+
if (!status) return false;
|
|
2364
|
+
return [
|
|
2365
|
+
OrderStatus.WaitDelivery,
|
|
2366
|
+
OrderStatus.Delivering,
|
|
2367
|
+
OrderStatus.Finish
|
|
2368
|
+
].includes(status);
|
|
2369
|
+
}
|
|
2370
|
+
function handleVisibilityChange() {
|
|
2371
|
+
return __async(this, null, function* () {
|
|
2372
|
+
var _a;
|
|
2373
|
+
const visible = document.visibilityState === "visible";
|
|
2374
|
+
if (!visible) return;
|
|
2375
|
+
const currentOrderStatus = (_a = orderDetail2.value) == null ? void 0 : _a.status;
|
|
2376
|
+
if (currentOrderStatus !== OrderStatus.WaitPay) {
|
|
2377
|
+
return;
|
|
2378
|
+
}
|
|
2379
|
+
const latestOrderDetail = yield getOrderDetail(props.orderNo);
|
|
2380
|
+
let newStatus = latestOrderDetail == null ? void 0 : latestOrderDetail.status;
|
|
2381
|
+
if (newStatus === OrderStatus.WaitPay) {
|
|
2382
|
+
yield new Promise((resolve) => setTimeout(resolve, 2e3));
|
|
2383
|
+
const data = yield getOrderDetail(props.orderNo);
|
|
2384
|
+
newStatus = data == null ? void 0 : data.status;
|
|
2385
|
+
}
|
|
2386
|
+
const paySucceeded = isPaySucceeded(newStatus);
|
|
2387
|
+
if (paySucceeded) {
|
|
2388
|
+
getEmitter().emit(productEvents.RefreshProductOrderListStatus, props.orderNo);
|
|
2389
|
+
}
|
|
2390
|
+
});
|
|
2391
|
+
}
|
|
2392
|
+
function setSelectedPayMethod() {
|
|
2393
|
+
if (onlySupportAlipay.value) {
|
|
2394
|
+
selectedPayMethod.value = PaymentProvider.Alipay;
|
|
2395
|
+
}
|
|
2396
|
+
}
|
|
2397
|
+
useEventBusListener(productEvents.RefreshProductOrderDetailStatus, (data) => {
|
|
2398
|
+
getOrderDetail(data.orderNo, data.syncPayStatus);
|
|
2399
|
+
});
|
|
2400
|
+
watch(
|
|
2401
|
+
() => props.orderNo,
|
|
2402
|
+
(val) => {
|
|
2403
|
+
if (val) {
|
|
2404
|
+
getOrderDetail(val);
|
|
2405
|
+
}
|
|
2406
|
+
},
|
|
2407
|
+
{ immediate: true }
|
|
2408
|
+
);
|
|
2409
|
+
onMounted(() => __async(null, null, function* () {
|
|
2410
|
+
yield getPayProviders();
|
|
2411
|
+
setSelectedPayMethod();
|
|
2412
|
+
window.addEventListener("visibilitychange", handleVisibilityChange);
|
|
2413
|
+
}));
|
|
2414
|
+
onBeforeUnmount(() => {
|
|
2415
|
+
window.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
2416
|
+
});
|
|
2417
|
+
return {
|
|
2418
|
+
orderDetail: orderDetail2,
|
|
2419
|
+
OrderStatus,
|
|
2420
|
+
selectedPayMethod,
|
|
2421
|
+
customerQrcodeVisible
|
|
2422
|
+
};
|
|
2423
|
+
};
|
|
2424
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
2425
|
+
__name: "order-detail",
|
|
2426
|
+
props: orderDetailProps(),
|
|
2427
|
+
setup(__props) {
|
|
2428
|
+
const props = __props;
|
|
2429
|
+
const { orderDetail: orderDetail2, OrderStatus, selectedPayMethod, customerQrcodeVisible } = useOrderDetail({ props });
|
|
2430
|
+
const { supportPayProviders, handleOrderBtnClick, getPayProviders } = useOrderProvide(props);
|
|
2431
|
+
function onClickOrderBtn(action) {
|
|
2432
|
+
var _a, _b, _c;
|
|
2433
|
+
handleOrderBtnClick({
|
|
2434
|
+
action,
|
|
2435
|
+
orderNo: ((_a = orderDetail2.value) == null ? void 0 : _a.orderNo) || "",
|
|
2436
|
+
orderStatus: ((_b = orderDetail2.value) == null ? void 0 : _b.status) || "",
|
|
2437
|
+
route: OrderListPopupRoute.OrderDetail,
|
|
2438
|
+
payProvider: selectedPayMethod.value,
|
|
2439
|
+
orderAmount: (_c = orderDetail2.value) == null ? void 0 : _c.amount
|
|
2440
|
+
});
|
|
2441
|
+
}
|
|
2442
|
+
onMounted(() => {
|
|
2443
|
+
getPayProviders();
|
|
2444
|
+
});
|
|
2445
|
+
provide("orderDetail", orderDetail2);
|
|
2446
|
+
return { __sfc: true, props, orderDetail: orderDetail2, OrderStatus, selectedPayMethod, customerQrcodeVisible, supportPayProviders, handleOrderBtnClick, getPayProviders, onClickOrderBtn, PurchaseProduct, PayStatus, CustomerQrcode, ExpressInfo, PaymentMethod, OrderInfo, BottomOperatePanel };
|
|
2447
|
+
}
|
|
2448
|
+
});
|
|
2449
|
+
var _sfc_render = function render11() {
|
|
2450
|
+
var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
|
|
2451
|
+
return _setup.orderDetail ? _c("div", { staticClass: "plv-product-order-detail" }, [_c("div", { staticClass: "plv-product-order-detail__content" }, [_c(_setup.PayStatus), _setup.customerQrcodeVisible ? _c(_setup.CustomerQrcode) : _vm._e(), _c(_setup.ExpressInfo), _c("div", { staticClass: "plv-product-order-detail__info" }, [_vm._l(_setup.orderDetail.products, function(product, index) {
|
|
2452
|
+
return _c(_setup.PurchaseProduct, { key: index, attrs: { "product": product } });
|
|
2453
|
+
}), _setup.orderDetail.status === _setup.OrderStatus.WaitPay && _setup.supportPayProviders.length > 1 ? _c(_setup.PaymentMethod, { model: { value: _setup.selectedPayMethod, callback: function($$v) {
|
|
2454
|
+
_setup.selectedPayMethod = $$v;
|
|
2455
|
+
}, expression: "selectedPayMethod" } }) : _vm._e(), _c(_setup.OrderInfo)], 2)], 1), _c(_setup.BottomOperatePanel, { on: { "click-order-btn": _setup.onClickOrderBtn } })], 1) : _vm._e();
|
|
2456
|
+
};
|
|
2457
|
+
var _sfc_staticRenderFns = [];
|
|
2458
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
2459
|
+
_sfc_main,
|
|
2460
|
+
_sfc_render,
|
|
2461
|
+
_sfc_staticRenderFns
|
|
2462
|
+
);
|
|
2463
|
+
const orderDetail = __component__.exports;
|
|
2464
|
+
;
|
|
2465
|
+
console.log(
|
|
2466
|
+
"%c@polyv/product-ui",
|
|
2467
|
+
"background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff",
|
|
2468
|
+
"[component: order-detail]",
|
|
2469
|
+
"[version: 1.0.0-rc-20250612.3]",
|
|
2470
|
+
"[buildTime: 2025-06-12 02:29:11]"
|
|
2471
|
+
);
|
|
2472
|
+
export {
|
|
2473
|
+
orderDetail as default
|
|
2474
|
+
};
|