component-shipinlv 1.0.15 → 1.0.17
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/VideoPublish/creat-task/hour-enabled.d.ts +8 -0
- package/dist/VideoPublish/creat-task/hour-enabled.js +38 -0
- package/dist/VideoPublish/creat-task/hour-enabled.less +21 -0
- package/dist/VideoPublish/creat-task/index.js +43 -3
- package/dist/types/VideoPublish.d.ts +4 -0
- package/package.json +1 -1
@@ -0,0 +1,8 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import "./hour-enabled.less";
|
3
|
+
interface Props {
|
4
|
+
hourEnabled: number[];
|
5
|
+
onHourEnabled: (hourEnabled: number[]) => void;
|
6
|
+
}
|
7
|
+
declare const VideoPublishCreateTaskHourSelect: React.FC<Props>;
|
8
|
+
export default VideoPublishCreateTaskHourSelect;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import "./hour-enabled.less";
|
3
|
+
import { Col, Row } from "antd";
|
4
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
6
|
+
var VideoPublishCreateTaskHourSelect = function VideoPublishCreateTaskHourSelect(_ref) {
|
7
|
+
var _ref$hourEnabled = _ref.hourEnabled,
|
8
|
+
hourEnabled = _ref$hourEnabled === void 0 ? [] : _ref$hourEnabled,
|
9
|
+
_ref$onHourEnabled = _ref.onHourEnabled,
|
10
|
+
onHourEnabled = _ref$onHourEnabled === void 0 ? function () {} : _ref$onHourEnabled;
|
11
|
+
var onHour = function onHour(hour) {
|
12
|
+
var index = hourEnabled.indexOf(hour);
|
13
|
+
if (index > -1) {
|
14
|
+
hourEnabled.splice(index, 1);
|
15
|
+
} else {
|
16
|
+
hourEnabled.push(hour);
|
17
|
+
}
|
18
|
+
onHourEnabled(hourEnabled);
|
19
|
+
};
|
20
|
+
return /*#__PURE__*/_jsx("div", {
|
21
|
+
className: "videoPublishCreatTaskHourSelect",
|
22
|
+
children: /*#__PURE__*/_jsx(Row, {
|
23
|
+
children: Array(24).join(',').split(',').map(function (item, i) {
|
24
|
+
return /*#__PURE__*/_jsx(Col, {
|
25
|
+
span: 3,
|
26
|
+
children: /*#__PURE__*/_jsxs("div", {
|
27
|
+
className: "items-hour ".concat(hourEnabled.includes(i) ? 'active' : ''),
|
28
|
+
onClick: function onClick() {
|
29
|
+
return onHour(i);
|
30
|
+
},
|
31
|
+
children: [i, ":00"]
|
32
|
+
})
|
33
|
+
}, i);
|
34
|
+
})
|
35
|
+
})
|
36
|
+
});
|
37
|
+
};
|
38
|
+
export default VideoPublishCreateTaskHourSelect;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
.videoPublishCreatTaskHourSelect{
|
2
|
+
max-width: 720px;
|
3
|
+
.items-hour{
|
4
|
+
background-color: #F2F2F2;
|
5
|
+
padding: 7px 0;
|
6
|
+
line-height: 1em;
|
7
|
+
margin: 0 3px 3px 0;
|
8
|
+
text-align: center;
|
9
|
+
border-radius: 2px;
|
10
|
+
-webkit-user-select: none;
|
11
|
+
-ms-user-select: none;
|
12
|
+
user-select: none;
|
13
|
+
cursor: pointer;
|
14
|
+
transition: all 0.3s ease-in-out;
|
15
|
+
-webkit-transition: all 0.3s ease-in-out;
|
16
|
+
&.active{
|
17
|
+
background-color: #722ED1;
|
18
|
+
color: #FFF;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
@@ -16,6 +16,7 @@ import { useRequest } from "@umijs/hooks";
|
|
16
16
|
import * as VideoPublishController from "../../service/api/VideoPublishController";
|
17
17
|
import VideoPlatformLogo from "../../component/video-platform/logo";
|
18
18
|
import fileSelect from "../../base/fileSelect";
|
19
|
+
import VideoPublishCreateTaskHourEnabled from "./hour-enabled";
|
19
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
20
21
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
21
22
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
@@ -30,10 +31,13 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
|
|
30
31
|
normalVideoRate: 1,
|
31
32
|
normalVideoRateType: 'hour',
|
32
33
|
normalDayMaxCount: 1,
|
34
|
+
normalVideoKindRateType: '',
|
33
35
|
startTime: null,
|
34
36
|
salesVideoRate: 2,
|
35
37
|
salesVideoRateType: 'hour',
|
36
38
|
salesDayMaxCount: 2,
|
39
|
+
salesVideoKindRateType: '',
|
40
|
+
hourEnabled: [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23],
|
37
41
|
videoList: []
|
38
42
|
}),
|
39
43
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -382,7 +386,7 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
|
|
382
386
|
}),
|
383
387
|
addonAfter: "\u6761\u89C6\u9891"
|
384
388
|
})
|
385
|
-
}), /*#__PURE__*/_jsx(Form.Item, {
|
389
|
+
}), formData.normalVideoRateType === 'hour' && /*#__PURE__*/_jsx(Form.Item, {
|
386
390
|
label: "\u6570\u91CF\u9650\u5236",
|
387
391
|
name: "normalDayMaxCount",
|
388
392
|
children: /*#__PURE__*/_jsx(InputNumber, {
|
@@ -392,6 +396,18 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
|
|
392
396
|
addonBefore: "\u6BCF\u5929\u6700\u591A\u53D1\u5E03",
|
393
397
|
addonAfter: "\u6761\u89C6\u9891"
|
394
398
|
})
|
399
|
+
}), /*#__PURE__*/_jsx(Form.Item, {
|
400
|
+
label: "\u9891\u7387\u65B9\u5F0F",
|
401
|
+
name: "normalVideoKindRateType",
|
402
|
+
children: /*#__PURE__*/_jsxs(Radio.Group, {
|
403
|
+
children: [/*#__PURE__*/_jsx(Radio, {
|
404
|
+
value: "",
|
405
|
+
children: "\u65F6\u95F4\u5E73\u5747\u4E00\u4F1A\u53D1\u4E00\u4E2A"
|
406
|
+
}), /*#__PURE__*/_jsx(Radio, {
|
407
|
+
value: "now",
|
408
|
+
children: "\u4E00\u6B21\u6027\u5168\u53D1\u5E03"
|
409
|
+
})]
|
410
|
+
})
|
395
411
|
}), /*#__PURE__*/_jsxs(Divider, {
|
396
412
|
orientation: "left",
|
397
413
|
children: [/*#__PURE__*/_jsx(ShoppingOutlined, {
|
@@ -421,7 +437,7 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
|
|
421
437
|
}),
|
422
438
|
addonAfter: "\u6761\u89C6\u9891"
|
423
439
|
})
|
424
|
-
}), /*#__PURE__*/_jsx(Form.Item, {
|
440
|
+
}), formData.salesVideoRateType === 'hour' && /*#__PURE__*/_jsx(Form.Item, {
|
425
441
|
label: "\u6570\u91CF\u9650\u5236",
|
426
442
|
name: "salesDayMaxCount",
|
427
443
|
children: /*#__PURE__*/_jsx(InputNumber, {
|
@@ -431,6 +447,30 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
|
|
431
447
|
addonBefore: "\u6BCF\u5929\u6700\u591A\u53D1\u5E03",
|
432
448
|
addonAfter: "\u6761\u89C6\u9891"
|
433
449
|
})
|
450
|
+
}), /*#__PURE__*/_jsx(Form.Item, {
|
451
|
+
label: "\u9891\u7387\u65B9\u5F0F",
|
452
|
+
name: "salesVideoKindRateType",
|
453
|
+
children: /*#__PURE__*/_jsxs(Radio.Group, {
|
454
|
+
children: [/*#__PURE__*/_jsx(Radio, {
|
455
|
+
value: "",
|
456
|
+
children: "\u65F6\u95F4\u5E73\u5747\u4E00\u4F1A\u53D1\u4E00\u4E2A"
|
457
|
+
}), /*#__PURE__*/_jsx(Radio, {
|
458
|
+
value: "now",
|
459
|
+
children: "\u4E00\u6B21\u6027\u5168\u53D1\u5E03"
|
460
|
+
})]
|
461
|
+
})
|
462
|
+
}), /*#__PURE__*/_jsx(Divider, {
|
463
|
+
orientation: "left",
|
464
|
+
children: "\u54EA\u4E9B\u5C0F\u65F6\u533A\u95F4\u53EF\u53D1"
|
465
|
+
}), /*#__PURE__*/_jsx(Form.Item, {
|
466
|
+
label: "\u65F6\u95F4\u6BB5",
|
467
|
+
children: /*#__PURE__*/_jsx(VideoPublishCreateTaskHourEnabled, {
|
468
|
+
hourEnabled: formData.hourEnabled,
|
469
|
+
onHourEnabled: function onHourEnabled(hourEnabled) {
|
470
|
+
formData.hourEnabled = hourEnabled;
|
471
|
+
setFormData(_objectSpread({}, formData));
|
472
|
+
}
|
473
|
+
})
|
434
474
|
}), /*#__PURE__*/_jsx(Divider, {
|
435
475
|
orientation: "left",
|
436
476
|
children: "\u5176\u4ED6\u8BBE\u7F6E"
|
@@ -440,7 +480,7 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
|
|
440
480
|
children: /*#__PURE__*/_jsx(DatePicker, {
|
441
481
|
showTime: true,
|
442
482
|
disabledDate: function disabledDate(e) {
|
443
|
-
return e.valueOf() + 86400e3 < Date.now();
|
483
|
+
return e.valueOf() + 86400e3 < Date.now() || e.valueOf() > Date.now() + 86400e3 * 14;
|
444
484
|
},
|
445
485
|
onChange: function onChange(value, dateString) {
|
446
486
|
console.log('Selected Time: ', value);
|
@@ -2,6 +2,7 @@
|
|
2
2
|
declare namespace VideoPublish {
|
3
3
|
type ProductType = 'long-video-sales';
|
4
4
|
type VideoKindTag = 'shopping' | 'location' | 'min-app';
|
5
|
+
type VideoKindRateType = '' | 'now';
|
5
6
|
interface CreateTaskList {
|
6
7
|
id: number;
|
7
8
|
title: string;
|
@@ -94,11 +95,14 @@ declare namespace VideoPublish {
|
|
94
95
|
normalVideoRate: number;
|
95
96
|
normalVideoRateType: 'hour' | 'day';
|
96
97
|
normalDayMaxCount: number;
|
98
|
+
normalVideoKindRateType: VideoKindRateType;
|
97
99
|
salesVideoRate: number;
|
98
100
|
salesVideoRateType: 'hour' | 'day';
|
99
101
|
salesDayMaxCount: number;
|
102
|
+
salesVideoKindRateType: VideoKindRateType;
|
100
103
|
accountList: string[];
|
101
104
|
startTime: number | null;
|
105
|
+
hourEnabled: number[];
|
102
106
|
videoList: {
|
103
107
|
taskId: number;
|
104
108
|
productType: string;
|