component-sanzhizhou 1.1.2 → 1.1.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/dist/lib/Tool.d.ts +1 -1
- package/dist/lib/Tool.js +14 -11
- package/dist/pay/qr.d.ts +1 -0
- package/dist/pay/qr.js +2 -0
- package/dist/pay/vip.js +1 -0
- package/dist/types/User.d.ts +0 -1
- package/package.json +1 -2
package/dist/lib/Tool.d.ts
CHANGED
|
@@ -162,7 +162,7 @@ declare const Tool: {
|
|
|
162
162
|
getTitleByPath(path: string): string;
|
|
163
163
|
getDirByPath(path: string): string;
|
|
164
164
|
h5Pay(query: Pay.H5PayQuery): void;
|
|
165
|
-
notification(type: "
|
|
165
|
+
notification(type: "success" | "info" | "warning" | "error", message: string, description?: import("react").ReactNode, options?: import("./notification").NotificationOption): void;
|
|
166
166
|
notificationSuccess(message: string, description?: import("react").ReactNode, options?: import("./notification").NotificationOption): void;
|
|
167
167
|
notificationError(message: string, description?: import("react").ReactNode, options?: import("./notification").NotificationOption): void;
|
|
168
168
|
notificationWarning(message: string, description?: import("react").ReactNode, options?: import("./notification").NotificationOption): void;
|
package/dist/lib/Tool.js
CHANGED
|
@@ -15,7 +15,7 @@ if (!window.__events) {
|
|
|
15
15
|
|
|
16
16
|
import ReactDOM from 'react-dom/client';
|
|
17
17
|
import { useRequest } from '@umijs/hooks';
|
|
18
|
-
import
|
|
18
|
+
import dayjs from 'dayjs';
|
|
19
19
|
import DialogDrawer from "../UI/DialogDrawer";
|
|
20
20
|
import notification from "./notification";
|
|
21
21
|
import JsError from "./js-error";
|
|
@@ -178,7 +178,7 @@ var Tool = _objectSpread(_objectSpread({
|
|
|
178
178
|
time = time * 1000;
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
return
|
|
181
|
+
return dayjs(time).format(format);
|
|
182
182
|
},
|
|
183
183
|
openWindow: function openWindow(url) {
|
|
184
184
|
var _this = this;
|
|
@@ -220,7 +220,10 @@ var Tool = _objectSpread(_objectSpread({
|
|
|
220
220
|
var getWidthString = function getWidthString(num) {
|
|
221
221
|
return num < 10 ? "0".concat(num) : num;
|
|
222
222
|
};
|
|
223
|
-
oldTime = new Date(
|
|
223
|
+
oldTime = new Date(dayjs(str).valueOf());
|
|
224
|
+
if (oldTime.getTime() < 864000e3) {
|
|
225
|
+
return '';
|
|
226
|
+
}
|
|
224
227
|
delta = currentTime.getTime() - oldTime.getTime();
|
|
225
228
|
if (delta < 0) {
|
|
226
229
|
return this.getFriendlyTimeFuture(delta);
|
|
@@ -300,22 +303,22 @@ var Tool = _objectSpread(_objectSpread({
|
|
|
300
303
|
// delta = currentTime - oldTime.getTime();
|
|
301
304
|
|
|
302
305
|
var out = '';
|
|
303
|
-
if (
|
|
306
|
+
if (dayjs(currentTime).format('YYYY/MM/DD') === dayjs(oldTime).format('YYYY/MM/DD')) {
|
|
304
307
|
out = '今天';
|
|
305
|
-
} else if (
|
|
308
|
+
} else if (dayjs(currentTime - 86400000).format('YYYY/MM/DD') === dayjs(oldTime).format('YYYY/MM/DD')) {
|
|
306
309
|
out = '昨天';
|
|
307
|
-
} else if (
|
|
310
|
+
} else if (dayjs(currentTime - 86400000 * 2).format('YYYY/MM/DD') === dayjs(oldTime).format('YYYY/MM/DD')) {
|
|
308
311
|
out = '前天';
|
|
309
|
-
} else if (
|
|
312
|
+
} else if (dayjs(currentTime + 86400000).format('YYYY/MM/DD') === dayjs(oldTime).format('YYYY/MM/DD')) {
|
|
310
313
|
out = '明天';
|
|
311
|
-
} else if (
|
|
314
|
+
} else if (dayjs(currentTime + 86400000 * 2).format('YYYY/MM/DD') === dayjs(oldTime).format('YYYY/MM/DD')) {
|
|
312
315
|
out = '后天';
|
|
313
316
|
} else {
|
|
314
317
|
// 如果是今年,就不展示年
|
|
315
|
-
if (
|
|
316
|
-
out =
|
|
318
|
+
if (dayjs(oldTime).format('YYYY') === dayjs(currentTime).format('YYYY')) {
|
|
319
|
+
out = dayjs(oldTime).format(format.replace(/^YYYY[-\/]/g, ''));
|
|
317
320
|
} else {
|
|
318
|
-
out =
|
|
321
|
+
out = dayjs(oldTime).format(format);
|
|
319
322
|
}
|
|
320
323
|
}
|
|
321
324
|
return out;
|
package/dist/pay/qr.d.ts
CHANGED
package/dist/pay/qr.js
CHANGED
|
@@ -26,6 +26,7 @@ var UserVipOrderPayQr = function UserVipOrderPayQr(_ref) {
|
|
|
26
26
|
moneyAmount = _ref.moneyAmount,
|
|
27
27
|
productCount = _ref.productCount,
|
|
28
28
|
vipId = _ref.vipId,
|
|
29
|
+
idKey = _ref.idKey,
|
|
29
30
|
couponCode = _ref.couponCode,
|
|
30
31
|
_ref$size = _ref.size,
|
|
31
32
|
size = _ref$size === void 0 ? 260 : _ref$size,
|
|
@@ -86,6 +87,7 @@ var UserVipOrderPayQr = function UserVipOrderPayQr(_ref) {
|
|
|
86
87
|
return TradeController.commonCreate({
|
|
87
88
|
productKind: productKind,
|
|
88
89
|
productTypeId: vipId,
|
|
90
|
+
productTypeIdKey: idKey || '',
|
|
89
91
|
productCount: moneyAmount,
|
|
90
92
|
userId: 0,
|
|
91
93
|
payChannel: 'alipay',
|
package/dist/pay/vip.js
CHANGED
|
@@ -231,6 +231,7 @@ var PayVip = function PayVip(_ref) {
|
|
|
231
231
|
}), /*#__PURE__*/_jsxs("div", {
|
|
232
232
|
children: [['pay-channel'].includes(step) && /*#__PURE__*/_jsxs(Button, {
|
|
233
233
|
type: "primary",
|
|
234
|
+
disabled: !(allowPayChannelList !== null && allowPayChannelList !== void 0 && allowPayChannelList.length),
|
|
234
235
|
htmlType: "submit",
|
|
235
236
|
children: [formatMessage('下一步'), " ", /*#__PURE__*/_jsx(CaretRightOutlined, {})]
|
|
236
237
|
}), ['qr-show'].includes(step) && /*#__PURE__*/_jsx(Button, {
|
package/dist/types/User.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "component-sanzhizhou",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -73,7 +73,6 @@
|
|
|
73
73
|
"jr-qrcode": "^1.1.4",
|
|
74
74
|
"js-base64": "^3.7.8",
|
|
75
75
|
"markdown-to-jsx": "^7.5.0",
|
|
76
|
-
"moment": "^2.29.4",
|
|
77
76
|
"styled-components": "^6.1.8",
|
|
78
77
|
"umi-request": "^1.4.0"
|
|
79
78
|
},
|