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.
@@ -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: "info" | "error" | "warning" | "success", message: string, description?: import("react").ReactNode, options?: import("./notification").NotificationOption): void;
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 moment from 'moment';
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 moment(time).format(format);
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(moment(str).valueOf());
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 (moment(currentTime).format('YYYY/MM/DD') === moment(oldTime).format('YYYY/MM/DD')) {
306
+ if (dayjs(currentTime).format('YYYY/MM/DD') === dayjs(oldTime).format('YYYY/MM/DD')) {
304
307
  out = '今天';
305
- } else if (moment(currentTime - 86400000).format('YYYY/MM/DD') === moment(oldTime).format('YYYY/MM/DD')) {
308
+ } else if (dayjs(currentTime - 86400000).format('YYYY/MM/DD') === dayjs(oldTime).format('YYYY/MM/DD')) {
306
309
  out = '昨天';
307
- } else if (moment(currentTime - 86400000 * 2).format('YYYY/MM/DD') === moment(oldTime).format('YYYY/MM/DD')) {
310
+ } else if (dayjs(currentTime - 86400000 * 2).format('YYYY/MM/DD') === dayjs(oldTime).format('YYYY/MM/DD')) {
308
311
  out = '前天';
309
- } else if (moment(currentTime + 86400000).format('YYYY/MM/DD') === moment(oldTime).format('YYYY/MM/DD')) {
312
+ } else if (dayjs(currentTime + 86400000).format('YYYY/MM/DD') === dayjs(oldTime).format('YYYY/MM/DD')) {
310
313
  out = '明天';
311
- } else if (moment(currentTime + 86400000 * 2).format('YYYY/MM/DD') === moment(oldTime).format('YYYY/MM/DD')) {
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 (moment(oldTime).format('YYYY') === moment(currentTime).format('YYYY')) {
316
- out = moment(oldTime).format(format.replace(/^YYYY[-\/]/g, ''));
318
+ if (dayjs(oldTime).format('YYYY') === dayjs(currentTime).format('YYYY')) {
319
+ out = dayjs(oldTime).format(format.replace(/^YYYY[-\/]/g, ''));
317
320
  } else {
318
- out = moment(oldTime).format(format);
321
+ out = dayjs(oldTime).format(format);
319
322
  }
320
323
  }
321
324
  return out;
package/dist/pay/qr.d.ts CHANGED
@@ -3,6 +3,7 @@ import './qr.less';
3
3
  interface Props {
4
4
  productKind: Pay.ProductKind;
5
5
  vipId: number;
6
+ idKey?: string;
6
7
  couponCode: string;
7
8
  payChannel: Pay.PayChannel;
8
9
  productCount: number;
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, {
@@ -41,7 +41,6 @@ declare namespace User {
41
41
  gender: Gender;
42
42
  avatarUrl: string;
43
43
  enabled: boolean;
44
- expired: moment.Moment;
45
44
  }
46
45
 
47
46
  interface CreateQuery{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-sanzhizhou",
3
- "version": "1.1.2",
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
  },