component-shipinlv 0.1.22 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
package/dist/UI/Money/index.js
CHANGED
@@ -26,7 +26,7 @@ var Money = function Money(_ref) {
|
|
26
26
|
children: pre
|
27
27
|
}), /*#__PURE__*/_jsx("span", {
|
28
28
|
className: "value ".concat(value === 0 ? 'zero' : '', " "),
|
29
|
-
children: typeof value === 'number' ? disabledMoneySimple ? value.toFixed(precision) : moneySimple(value, false, precision) : ''
|
29
|
+
children: typeof value === 'number' ? disabledMoneySimple ? parseFloat(value.toFixed(precision)) : moneySimple(value, false, precision) : ''
|
30
30
|
}), /*#__PURE__*/_jsx("span", {
|
31
31
|
className: "yen",
|
32
32
|
children: end
|
package/dist/VipList/index.js
CHANGED
@@ -88,6 +88,7 @@ var VipList = function VipList(_ref) {
|
|
88
88
|
var _useRequest = useRequest(function () {
|
89
89
|
return VipPowerController.list({
|
90
90
|
productType: productType,
|
91
|
+
domain: document.location.hostname,
|
91
92
|
dealerId: Tool.getLocalSiteInfo().dealerId || 0
|
92
93
|
}, {
|
93
94
|
env: env
|
@@ -277,7 +278,8 @@ var VipList = function VipList(_ref) {
|
|
277
278
|
var price = getPrice(result.vipList, item.id);
|
278
279
|
value = /*#__PURE__*/_jsx(Money, {
|
279
280
|
value: price,
|
280
|
-
precision:
|
281
|
+
precision: 2,
|
282
|
+
disabledMoneySimple: true
|
281
283
|
});
|
282
284
|
}
|
283
285
|
itemData["vipLevel".concat(item.vipLevel)] = value;
|
package/dist/lib/Tool.d.ts
CHANGED
@@ -1,16 +1,11 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { useRequest } from '@umijs/hooks';
|
3
|
-
interface EventItem {
|
4
|
-
name: string;
|
5
|
-
fn: (data?: any) => void;
|
6
|
-
}
|
7
3
|
declare const Tool: {
|
8
4
|
event: {
|
9
5
|
run(name: string, data?: any): void;
|
10
6
|
on(name: string, fn: (data: any) => void, isGlobalOnly?: boolean): void;
|
11
7
|
one(name: string, fn: (data: any) => void): void;
|
12
8
|
off(name: string): void;
|
13
|
-
events: EventItem[];
|
14
9
|
};
|
15
10
|
formatTime(time: number | string, format?: string): string;
|
16
11
|
openWindow(url: string): Promise<void>;
|
package/dist/lib/Tool.js
CHANGED
@@ -116,7 +116,7 @@ var Tool = _objectSpread(_objectSpread({
|
|
116
116
|
if (!name) {
|
117
117
|
return;
|
118
118
|
}
|
119
|
-
|
119
|
+
window.__events.forEach(function (item) {
|
120
120
|
// 命中 子集事件
|
121
121
|
if (item.name === name || "".concat(item.name, ".").indexOf(name) === 0) {
|
122
122
|
item.fn(data);
|
@@ -130,12 +130,12 @@ var Tool = _objectSpread(_objectSpread({
|
|
130
130
|
name: name,
|
131
131
|
fn: fn
|
132
132
|
};
|
133
|
-
|
133
|
+
window.__events.push(eventItem);
|
134
134
|
},
|
135
135
|
// 只绑定一次,但会运行多次;
|
136
136
|
one: function one(name, fn) {
|
137
137
|
var isBind = false;
|
138
|
-
|
138
|
+
window.__events.forEach(function (items) {
|
139
139
|
if (items.name === name) {
|
140
140
|
isBind = true;
|
141
141
|
}
|
@@ -148,8 +148,7 @@ var Tool = _objectSpread(_objectSpread({
|
|
148
148
|
},
|
149
149
|
// 删除事件
|
150
150
|
off: function off(name) {
|
151
|
-
|
152
|
-
this.events.forEach(function (item, index) {
|
151
|
+
window.__events.forEach(function (item, index) {
|
153
152
|
var isDel;
|
154
153
|
// 匹配到子集事件
|
155
154
|
if ("".concat(item.name, ".").indexOf(name) > -1) {
|
@@ -160,12 +159,11 @@ var Tool = _objectSpread(_objectSpread({
|
|
160
159
|
}
|
161
160
|
if (isDel) {
|
162
161
|
item.fn = function () {};
|
163
|
-
|
162
|
+
window.__events.splice(index, 1);
|
164
163
|
}
|
165
164
|
});
|
166
|
-
}
|
167
|
-
//
|
168
|
-
events: []
|
165
|
+
} // 记录
|
166
|
+
// events: [] as EventItem[],
|
169
167
|
},
|
170
168
|
formatTime: function formatTime(time) {
|
171
169
|
var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'YYYY-MM-DD HH:mm:ss';
|
@@ -180,7 +178,7 @@ var Tool = _objectSpread(_objectSpread({
|
|
180
178
|
return moment(time).format(format);
|
181
179
|
},
|
182
180
|
openWindow: function openWindow(url) {
|
183
|
-
var
|
181
|
+
var _this = this;
|
184
182
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
185
183
|
var $link;
|
186
184
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -192,7 +190,7 @@ var Tool = _objectSpread(_objectSpread({
|
|
192
190
|
document.body.append($link);
|
193
191
|
$link.click();
|
194
192
|
_context.next = 7;
|
195
|
-
return
|
193
|
+
return _this.sleep(500);
|
196
194
|
case 7:
|
197
195
|
$link.remove();
|
198
196
|
case 8:
|
@@ -1104,15 +1102,14 @@ var Tool = _objectSpread(_objectSpread({
|
|
1104
1102
|
});
|
1105
1103
|
|
1106
1104
|
//
|
1107
|
-
|
1108
|
-
//
|
1109
|
-
//
|
1110
|
-
//
|
1111
|
-
//
|
1112
|
-
//
|
1113
|
-
//
|
1114
|
-
// window._Tool = Tool;
|
1115
|
-
// }
|
1105
|
+
if (window) {
|
1106
|
+
// if ( !window?._GData) {
|
1107
|
+
// window._GData = {};
|
1108
|
+
// }
|
1109
|
+
//
|
1110
|
+
// Tool.GData = window._GData;
|
1116
1111
|
|
1112
|
+
window._Tool = Tool;
|
1113
|
+
}
|
1117
1114
|
Tool.onWindowError();
|
1118
1115
|
export default Tool;
|