component-shipinlv 1.3.2 → 1.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. package/dist/UI/LayoutContent.less +4 -0
  2. package/dist/VideoPublish/account-manage/home.js +3 -3
  3. package/dist/VideoPublish/account-manage/list.js +8 -1
  4. package/dist/VideoPublish/account-manage/setting/index.js +25 -2
  5. package/dist/VideoPublish/account-manage/setting/index.less +3 -1
  6. package/dist/VideoPublish/create-task/base/index.js +29 -0
  7. package/dist/VideoPublish/create-task/index.js +2 -0
  8. package/dist/VideoPublish/index.js +18 -2
  9. package/dist/VideoPublish/publish-task-plan/tool.js +8 -1
  10. package/dist/VideoPublish/task-list/index.js +20 -3
  11. package/dist/VideoPublish/task-list/plan/list.d.ts +3 -0
  12. package/dist/VideoPublish/task-list/plan/list.js +38 -18
  13. package/dist/VideoPublish/task-list/plan/query.d.ts +8 -0
  14. package/dist/VideoPublish/task-list/plan/query.js +45 -0
  15. package/dist/VideoPublish/task-list/plan/query.less +3 -0
  16. package/dist/VideoPublish/task-list/who-can-view.d.ts +12 -0
  17. package/dist/VideoPublish/task-list/who-can-view.js +37 -0
  18. package/dist/VideoPublish/video-publish-statistic/index.d.ts +2 -0
  19. package/dist/VideoPublish/video-publish-statistic/index.js +11 -0
  20. package/dist/VideoPublish/video-publish-statistic/list.d.ts +7 -0
  21. package/dist/VideoPublish/video-publish-statistic/list.js +225 -0
  22. package/dist/VideoPublish/video-publish-statistic/list.less +105 -0
  23. package/dist/VideoPublish/video-publish-statistic/query.d.ts +8 -0
  24. package/dist/VideoPublish/video-publish-statistic/query.js +57 -0
  25. package/dist/VideoPublish/video-publish-statistic/query.less +3 -0
  26. package/dist/config/apiUrls.js +1 -1
  27. package/dist/lib/Tool.d.ts +1 -1
  28. package/dist/lib/accountManageSettingConfig.js +2 -1
  29. package/dist/lib/openChrome.js +34 -23
  30. package/dist/service/api/VideoPublishStatisticPublishController.d.ts +4 -0
  31. package/dist/service/api/VideoPublishStatisticPublishController.js +28 -0
  32. package/dist/service/api/VideoPublishTaskPlanController.d.ts +1 -0
  33. package/dist/service/local/VideoPublishTaskController.d.ts +1 -0
  34. package/dist/service/local/VideoPublishTaskController.js +32 -0
  35. package/dist/types/PublishTaskPlan.d.ts +2 -0
  36. package/dist/types/VideoPublish.d.ts +4 -0
  37. package/dist/types/VideoPublishStatistic.d.ts +16 -0
  38. package/dist/types/VideoPublishStatistic.js +0 -0
  39. package/dist/types/VideoPublishTaskPlan.d.ts +2 -0
  40. package/dist/types/VideoPublishVideoAccount.d.ts +1 -0
  41. package/dist/typings/VideoPublishAccountManageSetting.d.ts +1 -0
  42. package/package.json +2 -2
@@ -34,6 +34,10 @@
34
34
  right: 0;
35
35
  font-size: 14px;
36
36
  line-height: 38px;
37
+
38
+ .ant-form-item{
39
+ margin-bottom: 0 !important;
40
+ }
37
41
  }
38
42
  }
39
43
 
@@ -91,7 +91,7 @@ var VideoPublishAccountManageHomePage = function VideoPublishAccountManageHomePa
91
91
  _useState4 = _slicedToArray(_useState3, 2),
92
92
  openMenuItems = _useState4[0],
93
93
  setOpenMenuItems = _useState4[1];
94
- var onOpen = function onOpen(url) {
94
+ var onOpen = function onOpen(key) {
95
95
  // window.getBridge()?.openVideoAccountBrowser(
96
96
  // accountDetail.platform,
97
97
  // '',
@@ -107,7 +107,7 @@ var VideoPublishAccountManageHomePage = function VideoPublishAccountManageHomePa
107
107
  nickname: accountDetail.nickname,
108
108
  chromeProfileName: accountDetail.chromeProfileName,
109
109
  taskId: 0,
110
- url: url,
110
+ url: 'https://creator.douyin.com/creator-micro/content/manage',
111
111
  proxyInfo: accountDetail.proxyInfo,
112
112
  isOpen: true
113
113
  }, false);
@@ -118,7 +118,7 @@ var VideoPublishAccountManageHomePage = function VideoPublishAccountManageHomePa
118
118
  case 'douyin':
119
119
  setOpenMenuItems([{
120
120
  label: '创作者中心(发视频)',
121
- key: 'https://creator.douyin.com/'
121
+ key: 'douyin-create'
122
122
  }]);
123
123
  break;
124
124
  case 'tiktok':
@@ -192,6 +192,13 @@ var HomePageAccountList = function HomePageAccountList(_ref) {
192
192
  onMenu('setting');
193
193
  return _context.abrupt("return");
194
194
  case 10:
195
+ if (!(listData.length >= 100)) {
196
+ _context.next = 13;
197
+ break;
198
+ }
199
+ notification.notificationError('这电脑绑定到上限了', '每台电脑最多绑定 100个账号');
200
+ return _context.abrupt("return");
201
+ case 13:
195
202
  toast('正在启动浏览器,请扫码登录', 12);
196
203
 
197
204
  // const platformName = platform ; // == 'kuaishou' ? 'kwai' : '';
@@ -251,7 +258,7 @@ var HomePageAccountList = function HomePageAccountList(_ref) {
251
258
  // proxyId: proxyInfo.id || 0,
252
259
  // };
253
260
  // runCreate(postData);
254
- case 13:
261
+ case 16:
255
262
  case "end":
256
263
  return _context.stop();
257
264
  }
@@ -4,7 +4,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
5
  import _objectDestructuringEmpty from "@babel/runtime/helpers/esm/objectDestructuringEmpty";
6
6
  import React, { useEffect, useState } from 'react';
7
- import { ConfigProvider, Form, Modal, Switch, Tooltip } from 'antd';
7
+ import { ConfigProvider, Divider, Form, InputNumber, Modal, Space, Switch, Tag, Tooltip } from 'antd';
8
8
  import "./index.less";
9
9
  import LayoutContent from "../../../UI/LayoutContent";
10
10
  import AccountManageSettingConfig from "../../../lib/accountManageSettingConfig";
@@ -121,7 +121,6 @@ var AccountManageSettingPage = function AccountManageSettingPage(_ref) {
121
121
  })
122
122
  }), /*#__PURE__*/_jsx(Form.Item, {
123
123
  label: "\u8C37\u6B4C\u6D4F\u89C8\u5668 - \u591A\u5F00\u4F4D\u7F6E",
124
- extra: /*#__PURE__*/_jsx("div", {}),
125
124
  children: /*#__PURE__*/_jsx(FolderSelect, {
126
125
  path: formData.chromeUserDataDir,
127
126
  disabled: false,
@@ -153,6 +152,30 @@ var AccountManageSettingPage = function AccountManageSettingPage(_ref) {
153
152
  _onFinish(formData);
154
153
  }
155
154
  })
155
+ }), /*#__PURE__*/_jsx(Divider, {}), /*#__PURE__*/_jsx(Form.Item, {
156
+ label: "\u4EFB\u52A1\u901A\u77E5\u7AEF\u53E3",
157
+ children: /*#__PURE__*/_jsxs(Space, {
158
+ size: 20,
159
+ children: [/*#__PURE__*/_jsx(InputNumber, {
160
+ className: "sendMessageToPort",
161
+ min: 80,
162
+ max: 65535,
163
+ value: formData.sendMessageToPort,
164
+ placeholder: "\u53D1\u9001\u6D88\u606F\u5230\u672C\u673A\u7AEF\u53E3",
165
+ onChange: function onChange(e) {
166
+ formData.sendMessageToPort = e || 9514;
167
+ setFormData(_objectSpread({}, formData));
168
+ _onFinish(formData);
169
+ }
170
+ }), /*#__PURE__*/_jsx(Divider, {
171
+ type: "vertical"
172
+ }), /*#__PURE__*/_jsxs("div", {
173
+ children: [/*#__PURE__*/_jsx(Tag, {
174
+ color: "orange",
175
+ children: "POST"
176
+ }), " http://127.0.0.1:", formData.sendMessageToPort, "/publish/result"]
177
+ })]
178
+ })
156
179
  })]
157
180
  })
158
181
  });
@@ -1,5 +1,7 @@
1
1
  .videoPublishAccountManageSetting{
2
-
2
+ .sendMessageToPort{
3
+ width: 180px;
4
+ }
3
5
  }
4
6
 
5
7
  .select{
@@ -270,6 +270,35 @@ var VideoPublishCreateTaskBase = function VideoPublishCreateTaskBase(_ref) {
270
270
  children: "\u4E00\u6B21\u6027\u5168\u53D1\u5E03"
271
271
  })]
272
272
  })
273
+ }), /*#__PURE__*/_jsx(Divider, {
274
+ orientation: "left",
275
+ children: "\u63A8\u8350\u8BDD\u9898"
276
+ }), /*#__PURE__*/_jsx(Form.Item, {
277
+ label: "\u63A8\u8350\u8BDD\u9898",
278
+ name: "noTopicIsUserRecommendTopic",
279
+ extra: "\u5F53\u6CA1\u6709\u8F93\u5165\u8BDD\u9898\u7684\u65F6\u5019\uFF0C\u4F7F\u7528\u63A8\u8350\u8BDD\u9898",
280
+ children: /*#__PURE__*/_jsx(Switch, {
281
+ checkedChildren: "\u4F7F\u7528\u63A8\u8350\u8BDD\u9898",
282
+ unCheckedChildren: "\u7981\u7528\u63A8\u8350\u8BDD\u9898"
283
+ })
284
+ }), /*#__PURE__*/_jsx(Divider, {
285
+ orientation: "left",
286
+ children: "\u54EA\u4E9B\u5C0F\u65F6\u533A\u95F4\u53EF\u53D1"
287
+ }), /*#__PURE__*/_jsx(Form.Item, {
288
+ label: "\u8C01\u53EF\u4EE5\u770B",
289
+ name: "whoCanView",
290
+ children: /*#__PURE__*/_jsxs(Radio.Group, {
291
+ children: [/*#__PURE__*/_jsx(Radio, {
292
+ value: "0",
293
+ children: "\u516C\u5F00"
294
+ }), /*#__PURE__*/_jsx(Radio, {
295
+ value: "2",
296
+ children: "\u597D\u53CB\u53EF\u89C1"
297
+ }), /*#__PURE__*/_jsx(Radio, {
298
+ value: "1",
299
+ children: "\u4EC5\u81EA\u5DF1\u53EF\u89C1"
300
+ })]
301
+ })
273
302
  }), /*#__PURE__*/_jsx(Divider, {
274
303
  orientation: "left",
275
304
  children: "\u54EA\u4E9B\u5C0F\u65F6\u533A\u95F4\u53EF\u53D1"
@@ -32,6 +32,8 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
32
32
  normalVideoRateType: 'hour',
33
33
  normalDayMaxCount: 1,
34
34
  normalVideoKindRateType: '',
35
+ whoCanView: '0',
36
+ noTopicIsUserRecommendTopic: false,
35
37
  startTime: null,
36
38
  salesVideoRate: 2,
37
39
  salesVideoRateType: 'hour',
@@ -4,7 +4,7 @@ import "./index.less";
4
4
  import { Menu, Tabs } from "antd";
5
5
  import VideoPublishCreateTask from "./create-task";
6
6
  import isInClient from "../lib/isInClient";
7
- import { BorderlessTableOutlined, ClockCircleOutlined, FileSearchOutlined, GlobalOutlined, SettingOutlined, UsergroupAddOutlined, VideoCameraAddOutlined } from "@ant-design/icons";
7
+ import { BorderlessTableOutlined, ClockCircleOutlined, FileSearchOutlined, FileTextOutlined, GlobalOutlined, PieChartOutlined, SettingOutlined, UsergroupAddOutlined, VideoCameraAddOutlined } from "@ant-design/icons";
8
8
  import VideoPublishVideoAccount from "./video-account";
9
9
  import VideoPublishTaskList from "./task-list";
10
10
  import VideoPublishLog from "./log";
@@ -13,6 +13,8 @@ import VideoPublishAccountManageHomePage from "./account-manage/home";
13
13
  import VideoPublishPublishVideoPlan from "./publish-task-plan";
14
14
  import VideoPublishVideoAccountProxy from "./proxy/list";
15
15
  import VideoPublishTaskVideoTopic from "./video-topic";
16
+ import VideoPublishTaskPlanList from "./task-list/plan/list";
17
+ import VideoPublishStatisticPublish from "./video-publish-statistic";
16
18
  import { jsx as _jsx } from "react/jsx-runtime";
17
19
  import { jsxs as _jsxs } from "react/jsx-runtime";
18
20
  var VideoPublish = function VideoPublish(_ref) {
@@ -89,12 +91,26 @@ var VideoPublish = function VideoPublish(_ref) {
89
91
  }, {
90
92
  key: 'task-list',
91
93
  icon: /*#__PURE__*/_jsx(ClockCircleOutlined, {}),
92
- label: '发布列表',
94
+ label: '发布任务',
93
95
  // disabled: ! canPublish,
94
96
  children: /*#__PURE__*/_jsx(VideoPublishTaskList, {
95
97
  disabled: disabled,
96
98
  env: env
97
99
  })
100
+ }, {
101
+ key: 'task-plan-list',
102
+ icon: /*#__PURE__*/_jsx(FileTextOutlined, {}),
103
+ label: '发布任务计划',
104
+ // disabled: ! canPublish,
105
+ children: /*#__PURE__*/_jsx(VideoPublishTaskPlanList, {
106
+ env: env,
107
+ publishTaskId: 0
108
+ })
109
+ }, {
110
+ key: 'statistic',
111
+ icon: /*#__PURE__*/_jsx(PieChartOutlined, {}),
112
+ label: '统计',
113
+ children: /*#__PURE__*/_jsx(VideoPublishStatisticPublish, {})
98
114
  }, {
99
115
  key: 'setting',
100
116
  icon: /*#__PURE__*/_jsx(SettingOutlined, {}),
@@ -13,6 +13,7 @@ import SSE from "../../component/sse";
13
13
  import param from "../../component/param";
14
14
  import { notification } from "antd";
15
15
  import openChrome from "../../lib/openChrome";
16
+ import * as LocalVideoPublishTaskController from "../../service/local/VideoPublishTaskController";
16
17
  var PublishTaskPlanClass = /*#__PURE__*/function () {
17
18
  function PublishTaskPlanClass(env) {
18
19
  var clientIdentity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
@@ -249,6 +250,12 @@ var PublishTaskPlanClass = /*#__PURE__*/function () {
249
250
  value: function onReport(success, code,
250
251
  // not-login
251
252
  message, saveBaseData) {
253
+ // 发消息 , 不管结果,无论失败
254
+ LocalVideoPublishTaskController.sendMessageToPort(_objectSpread({
255
+ code: code,
256
+ success: success,
257
+ message: message
258
+ }, saveBaseData));
252
259
  return VideoPublishCrawlerTaskController.report(_objectSpread({
253
260
  success: success,
254
261
  code: code,
@@ -489,7 +496,7 @@ var PublishTaskPlanClass = /*#__PURE__*/function () {
489
496
  platformAccountId: query.platformVideoAccountId,
490
497
  nickname: query.nickname,
491
498
  taskId: query.taskInfo.taskId,
492
- url: 'https://creator.douyin.com/creator-micro/home',
499
+ url: 'https://creator.douyin.com/creator-micro/content/upload',
493
500
  chromePath: settingConfig.chromePath,
494
501
  chromeProfileName: query.chromeProfileName,
495
502
  isOpen: query.open
@@ -12,6 +12,8 @@ import Money from "../../UI/Money";
12
12
  import ProductTypeDict from "../../Product/dict";
13
13
  import Tool from "../../lib/Tool";
14
14
  import VideoPublishTaskPlanList from "./plan/list";
15
+ import VideoPublishTaskPlanStatus from "./plan/status";
16
+ import VideoPublishTaskWhoCanView from "./who-can-view";
15
17
  import { jsx as _jsx } from "react/jsx-runtime";
16
18
  import { Fragment as _Fragment } from "react/jsx-runtime";
17
19
  var VideoPublishTaskList = function VideoPublishTaskList(_ref) {
@@ -87,11 +89,26 @@ var VideoPublishTaskList = function VideoPublishTaskList(_ref) {
87
89
  dataIndex: 'planStatus',
88
90
  key: 'planStatus',
89
91
  render: function render(planStatus) {
90
- return ''; // <VideoPublishTaskPlanStatus status={ planStatus } />
92
+ return /*#__PURE__*/_jsx(VideoPublishTaskPlanStatus, {
93
+ status: planStatus
94
+ });
91
95
  }
92
96
  }, {
93
97
  title: /*#__PURE__*/_jsx(_Fragment, {
94
- children: "\u5F00\u59CB\u65F6\u95F4"
98
+ children: "\u8C01\u80FD\u770B"
99
+ }),
100
+ dataIndex: 'whoCanView',
101
+ key: 'whoCanView',
102
+ render: function render(whoCanView) {
103
+ return /*#__PURE__*/_jsx(VideoPublishTaskWhoCanView, {
104
+ whoCanView: whoCanView
105
+ });
106
+ }
107
+ },
108
+ //
109
+ {
110
+ title: /*#__PURE__*/_jsx(_Fragment, {
111
+ children: "\u5B9A\u65F6\u5C55\u793A\u65F6\u95F4"
95
112
  }),
96
113
  dataIndex: 'startTime',
97
114
  key: 'startTime',
@@ -150,7 +167,7 @@ var VideoPublishTaskList = function VideoPublishTaskList(_ref) {
150
167
  errorTaskList = _useRequest.error;
151
168
  var onTaskPlan = function onTaskPlan(publishTaskId) {
152
169
  var dialog = Tool.drawer({
153
- title: '视频任务计划',
170
+ title: '发布任务计划',
154
171
  content: /*#__PURE__*/_jsx(VideoPublishTaskPlanList, {
155
172
  env: env,
156
173
  publishTaskId: publishTaskId
@@ -3,6 +3,9 @@ import "./list.less";
3
3
  interface Props {
4
4
  env?: Global.Env;
5
5
  publishTaskId: number;
6
+ accountId?: number;
7
+ startTime?: number;
8
+ endTime?: number;
6
9
  }
7
10
  declare const VideoPublishTaskPlanList: React.FC<Props>;
8
11
  export default VideoPublishTaskPlanList;
@@ -2,7 +2,6 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import React, { useState } from "react";
4
4
  import "./list.less";
5
- import PageContentWarp from "../../../UI/PageContentWarp";
6
5
  import { useRequest } from "@umijs/hooks";
7
6
  import * as VideoPublishTaskPlanController from "../../../service/api/VideoPublishTaskPlanController";
8
7
  import { Popover, Table, Tooltip } from "antd";
@@ -13,13 +12,22 @@ import VideoKindTag from "../../../component/videoKindTag";
13
12
  import { onMediaShowView } from "../../../component/media-show";
14
13
  import VideoPublishVideoAccountBaseInfo from "../../video-account/base-info";
15
14
  import VideoPublishTaskPlanOperate from "./operate";
15
+ import LayoutContent from "../../../UI/LayoutContent";
16
+ import VideoPublishTaskPlanListQuery from "./query";
17
+ import dayjs from "dayjs";
16
18
  import { jsx as _jsx } from "react/jsx-runtime";
17
19
  import { Fragment as _Fragment } from "react/jsx-runtime";
18
20
  import { jsxs as _jsxs } from "react/jsx-runtime";
19
21
  var VideoPublishTaskPlanList = function VideoPublishTaskPlanList(_ref) {
20
22
  var env = _ref.env,
21
23
  _ref$publishTaskId = _ref.publishTaskId,
22
- publishTaskId = _ref$publishTaskId === void 0 ? 0 : _ref$publishTaskId;
24
+ publishTaskId = _ref$publishTaskId === void 0 ? 0 : _ref$publishTaskId,
25
+ _ref$accountId = _ref.accountId,
26
+ accountId = _ref$accountId === void 0 ? 0 : _ref$accountId,
27
+ _ref$startTime = _ref.startTime,
28
+ startTime = _ref$startTime === void 0 ? 0 : _ref$startTime,
29
+ _ref$endTime = _ref.endTime,
30
+ endTime = _ref$endTime === void 0 ? 0 : _ref$endTime;
23
31
  var _useState = useState([]),
24
32
  _useState2 = _slicedToArray(_useState, 2),
25
33
  listData = _useState2[0],
@@ -36,9 +44,9 @@ var VideoPublishTaskPlanList = function VideoPublishTaskPlanList(_ref) {
36
44
  pagination = _useState4[0],
37
45
  setPagination = _useState4[1];
38
46
  var _useState5 = useState({
39
- startTime: 0,
47
+ startTime: startTime,
40
48
  // Date.now(),
41
- endTime: 0 //Date.now(),
49
+ endTime: endTime //Date.now(),
42
50
  // taskStatus: '',
43
51
  // keyword: '',
44
52
  }),
@@ -180,6 +188,17 @@ var VideoPublishTaskPlanList = function VideoPublishTaskPlanList(_ref) {
180
188
  time: publishTime
181
189
  });
182
190
  }
191
+ }, {
192
+ title: /*#__PURE__*/_jsx(_Fragment, {
193
+ children: "\u521B\u5EFA"
194
+ }),
195
+ dataIndex: 'created',
196
+ key: 'created',
197
+ render: function render(created) {
198
+ return /*#__PURE__*/_jsx(Time, {
199
+ time: created
200
+ });
201
+ }
183
202
  }, {
184
203
  title: '操作',
185
204
  dataIndex: '——',
@@ -198,7 +217,7 @@ var VideoPublishTaskPlanList = function VideoPublishTaskPlanList(_ref) {
198
217
  });
199
218
  }
200
219
  }];
201
- var onQuery = function onQuery(query) {
220
+ var _onQuery = function onQuery(query) {
202
221
  setQuery(_objectSpread({}, query));
203
222
  runTaskList(query, 1);
204
223
  };
@@ -206,8 +225,11 @@ var VideoPublishTaskPlanList = function VideoPublishTaskPlanList(_ref) {
206
225
  var postQuery = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : query;
207
226
  var current = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : pagination.current;
208
227
  return VideoPublishTaskPlanController.list(_objectSpread(_objectSpread({
209
- publishTaskId: publishTaskId
228
+ publishTaskId: publishTaskId,
229
+ accountId: accountId
210
230
  }, postQuery), {}, {
231
+ startTime: postQuery.startTime > 10000 ? Math.floor(dayjs(postQuery.startTime).startOf('date').valueOf() * 0.001) || 0 : 0,
232
+ endTime: postQuery.endTime > 10000 ? Math.floor(dayjs(postQuery.endTime).endOf('date').valueOf() * 0.001) || 0 : 0,
211
233
  current: current,
212
234
  pageSize: pagination.pageSize
213
235
  }), {
@@ -222,20 +244,18 @@ var VideoPublishTaskPlanList = function VideoPublishTaskPlanList(_ref) {
222
244
  runTaskList = _useRequest.run,
223
245
  loadingTaskList = _useRequest.loading,
224
246
  errorTaskList = _useRequest.error;
225
- return /*#__PURE__*/_jsx(PageContentWarp, {
247
+ return /*#__PURE__*/_jsx(LayoutContent, {
226
248
  loading: loadingTaskList,
227
249
  error: errorTaskList,
228
- onReload: runTaskList
229
- // title="发布列表"
230
- ,
231
- className: "videoPublishTaskPlanList"
232
- // extInfo={(
233
- // <VideoPublishTaskListQuery
234
- // defaultQuery={ query }
235
- // onQuery={ query => onQuery( query ) }
236
- // />
237
- // )}
238
- ,
250
+ onReload: runTaskList,
251
+ title: "\u4EFB\u52A1\u8BA1\u5212",
252
+ className: "videoPublishTaskPlanList",
253
+ extInfo: /*#__PURE__*/_jsx(VideoPublishTaskPlanListQuery, {
254
+ defaultQuery: query,
255
+ onQuery: function onQuery(query) {
256
+ return _onQuery(query);
257
+ }
258
+ }),
239
259
  children: /*#__PURE__*/_jsx(Table, {
240
260
  size: "small",
241
261
  bordered: true,
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import './query.less';
3
+ interface Props {
4
+ defaultQuery: VideoPublishTaskPlan.ListQuery;
5
+ onQuery: (query: VideoPublishTaskPlan.ListQuery) => void;
6
+ }
7
+ declare const VideoPublishTaskPlanListQuery: React.FC<Props>;
8
+ export default VideoPublishTaskPlanListQuery;
@@ -0,0 +1,45 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
+ import React, { useState } from 'react';
4
+ import { Button, Form, Space } from "antd";
5
+ import "./query.less";
6
+ import dayjs from "dayjs";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ var VideoPublishTaskPlanListQuery = function VideoPublishTaskPlanListQuery(_ref) {
9
+ var defaultQuery = _ref.defaultQuery,
10
+ _ref$onQuery = _ref.onQuery,
11
+ onQuery = _ref$onQuery === void 0 ? function () {} : _ref$onQuery;
12
+ var _Form$useForm = Form.useForm(),
13
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
14
+ form = _Form$useForm2[0];
15
+ var _useState = useState(_objectSpread({}, defaultQuery)),
16
+ _useState2 = _slicedToArray(_useState, 2),
17
+ query = _useState2[0],
18
+ setQuery = _useState2[1];
19
+ var todayEnd = dayjs(dayjs(Date.now()).format('YYYY-MM-DD 23:59:59')).valueOf();
20
+ var onTime = function onTime(startTime, endTime) {
21
+ query.startTime = startTime;
22
+ query.endTime = endTime;
23
+ setQuery(_objectSpread({}, query));
24
+ };
25
+ var onFinish = function onFinish() {
26
+ var values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
27
+ onQuery(_objectSpread(_objectSpread({}, query), values));
28
+ };
29
+ return /*#__PURE__*/_jsx("div", {
30
+ className: "videoPublishTaskPlanListQuery",
31
+ children: /*#__PURE__*/_jsx(Form, {
32
+ form: form,
33
+ initialValues: _objectSpread({}, query),
34
+ onFinish: onFinish,
35
+ children: /*#__PURE__*/_jsx(Space, {
36
+ children: /*#__PURE__*/_jsx(Button, {
37
+ type: "primary",
38
+ htmlType: "submit",
39
+ children: "\u641C\u7D22"
40
+ })
41
+ })
42
+ })
43
+ });
44
+ };
45
+ export default VideoPublishTaskPlanListQuery;
@@ -0,0 +1,3 @@
1
+ .videoPublishTaskPlanListQuery{
2
+
3
+ }
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ whoCanView: VideoPublish.WhoCanView;
4
+ }
5
+ interface VideoPublishTaskWhoCanViewList {
6
+ whoCanView: VideoPublish.WhoCanView;
7
+ title: string;
8
+ color: string;
9
+ }
10
+ export declare const VideoPublishTaskWhoCanViewList: VideoPublishTaskWhoCanViewList[];
11
+ declare const VideoPublishTaskWhoCanView: React.FC<Props>;
12
+ export default VideoPublishTaskWhoCanView;
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import { Tag } from 'antd';
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ // ENUM('wait', 'progress', 'finish', 'fail')
5
+ export var VideoPublishTaskWhoCanViewList = [{
6
+ whoCanView: '0',
7
+ title: '公开',
8
+ color: ''
9
+ }, {
10
+ whoCanView: '1',
11
+ title: '仅自己',
12
+ color: 'red'
13
+ }, {
14
+ whoCanView: '2',
15
+ title: '好友可见',
16
+ color: 'blue'
17
+ }];
18
+ var VideoPublishTaskWhoCanViewDict = function () {
19
+ var dict = {};
20
+ VideoPublishTaskWhoCanViewList.forEach(function (items) {
21
+ dict[items.whoCanView] = items;
22
+ });
23
+ return dict;
24
+ }();
25
+ var VideoPublishTaskWhoCanView = function VideoPublishTaskWhoCanView(_ref) {
26
+ var whoCanView = _ref.whoCanView;
27
+ var itemData = VideoPublishTaskWhoCanViewDict[whoCanView] || {
28
+ icon: '',
29
+ title: '',
30
+ color: ''
31
+ };
32
+ return whoCanView ? /*#__PURE__*/_jsx(Tag, {
33
+ color: itemData.color,
34
+ children: itemData.title || whoCanView
35
+ }) : null;
36
+ };
37
+ export default VideoPublishTaskWhoCanView;
@@ -0,0 +1,2 @@
1
+ declare const VideoPublishStatisticPublish: ({}: {}) => import("react/jsx-runtime").JSX.Element;
2
+ export default VideoPublishStatisticPublish;
@@ -0,0 +1,11 @@
1
+ import _objectDestructuringEmpty from "@babel/runtime/helpers/esm/objectDestructuringEmpty";
2
+ import VideoPublishStatisticPublishList from "./list";
3
+ import { getApiEnv } from "../../lib/getApiUrl";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ var VideoPublishStatisticPublish = function VideoPublishStatisticPublish(_ref) {
6
+ _objectDestructuringEmpty(_ref);
7
+ return /*#__PURE__*/_jsx(VideoPublishStatisticPublishList, {
8
+ env: getApiEnv()
9
+ });
10
+ };
11
+ export default VideoPublishStatisticPublish;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import "./list.less";
3
+ interface Props {
4
+ env?: Global.Env;
5
+ }
6
+ declare const VideoPublishStatisticPublishList: React.FC<Props>;
7
+ export default VideoPublishStatisticPublishList;
@@ -0,0 +1,225 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
+ import React, { useState } from "react";
4
+ import "./list.less";
5
+ import { useRequest } from "@umijs/hooks";
6
+ import * as VideoPublishPublishStatisticController from "../../service/api/VideoPublishStatisticPublishController";
7
+ import { Button, Divider, Space, Table, Tag } from "antd";
8
+ import VideoPublishVideoAccountBaseInfo from "../video-account/base-info";
9
+ import LayoutContent from "../../UI/LayoutContent";
10
+ import VideoPublishStatisticPublishListQuery from "./query";
11
+ import dayjs from "dayjs";
12
+ import Tool from "../../lib/Tool";
13
+ import VideoPublishTaskPlanList from "../task-list/plan/list";
14
+ import { SwapRightOutlined } from "@ant-design/icons";
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
+ import { jsxs as _jsxs } from "react/jsx-runtime";
17
+ import { Fragment as _Fragment } from "react/jsx-runtime";
18
+ var VideoPublishStatisticPublishList = function VideoPublishStatisticPublishList(_ref) {
19
+ var env = _ref.env;
20
+ var _useState = useState([]),
21
+ _useState2 = _slicedToArray(_useState, 2),
22
+ listData = _useState2[0],
23
+ setListData = _useState2[1];
24
+ var _useState3 = useState({
25
+ current: 1,
26
+ pageSize: 100,
27
+ total: 0,
28
+ simple: true,
29
+ showSizeChanger: false,
30
+ showQuickJumper: false
31
+ }),
32
+ _useState4 = _slicedToArray(_useState3, 2),
33
+ pagination = _useState4[0],
34
+ setPagination = _useState4[1];
35
+ var _useState5 = useState({
36
+ startTime: Date.now(),
37
+ endTime: Date.now()
38
+ // taskStatus: '',
39
+ // keyword: '',
40
+ }),
41
+ _useState6 = _slicedToArray(_useState5, 2),
42
+ query = _useState6[0],
43
+ setQuery = _useState6[1];
44
+ var columns = [{
45
+ title: '序号',
46
+ dataIndex: '-',
47
+ key: '-',
48
+ render: function render(_, _1) {
49
+ var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
50
+ return index + 1;
51
+ }
52
+ }, {
53
+ title: '发布账号',
54
+ dataIndex: 'platform',
55
+ key: 'platform',
56
+ render: function render(platform, record) {
57
+ return /*#__PURE__*/_jsx(VideoPublishVideoAccountBaseInfo, {
58
+ accountInfo: record === null || record === void 0 ? void 0 : record.accountInfo
59
+ });
60
+ }
61
+ }, {
62
+ title: '粉丝数',
63
+ dataIndex: 'followerCount',
64
+ key: 'followerCount'
65
+ }, {
66
+ title: /*#__PURE__*/_jsx("div", {
67
+ className: "status-amount ",
68
+ children: /*#__PURE__*/_jsxs("span", {
69
+ className: "finish",
70
+ children: ["\u6210\u529F ", /*#__PURE__*/_jsx("small", {
71
+ children: " / \u6761"
72
+ })]
73
+ })
74
+ }),
75
+ dataIndex: 'finishAmount',
76
+ key: 'finishAmount',
77
+ render: function render(finishAmount, record) {
78
+ return /*#__PURE__*/_jsx("div", {
79
+ className: "status-amount in-td",
80
+ children: /*#__PURE__*/_jsx(Space, {
81
+ children: /*#__PURE__*/_jsx("span", {
82
+ className: "finish amount-".concat(finishAmount),
83
+ children: finishAmount
84
+ })
85
+ })
86
+ });
87
+ }
88
+ }, {
89
+ title: /*#__PURE__*/_jsx("div", {
90
+ className: "status-amount ",
91
+ children: /*#__PURE__*/_jsxs("span", {
92
+ className: "fail",
93
+ children: ["\u5931\u8D25 ", /*#__PURE__*/_jsx("small", {
94
+ children: " / \u6761"
95
+ })]
96
+ })
97
+ }),
98
+ dataIndex: 'failAmount',
99
+ key: 'failAmount',
100
+ render: function render(failAmount) {
101
+ return /*#__PURE__*/_jsx("div", {
102
+ className: "status-amount in-td",
103
+ children: /*#__PURE__*/_jsx("span", {
104
+ className: "fail amount-".concat(failAmount),
105
+ children: failAmount
106
+ })
107
+ });
108
+ }
109
+ }, {
110
+ title: /*#__PURE__*/_jsx("div", {
111
+ className: "status-amount ",
112
+ children: /*#__PURE__*/_jsxs("span", {
113
+ className: "progress",
114
+ children: ["\u6267\u884C\u4E2D ", /*#__PURE__*/_jsx("small", {
115
+ children: " / \u6761"
116
+ })]
117
+ })
118
+ }),
119
+ dataIndex: 'progressAmount',
120
+ key: 'progressAmount',
121
+ render: function render(progressAmount, record) {
122
+ return /*#__PURE__*/_jsx("div", {
123
+ className: "status-amount in-td",
124
+ children: /*#__PURE__*/_jsx("span", {
125
+ className: "progress amount-".concat(progressAmount),
126
+ children: progressAmount
127
+ })
128
+ });
129
+ }
130
+ }, {
131
+ title: '操作',
132
+ dataIndex: '-',
133
+ key: '-',
134
+ render: function render(_, record) {
135
+ return /*#__PURE__*/_jsx("div", {
136
+ className: "operate",
137
+ children: /*#__PURE__*/_jsx(Space, {
138
+ children: /*#__PURE__*/_jsx(Button, {
139
+ type: "link",
140
+ ghost: true,
141
+ size: "small",
142
+ onClick: function onClick() {
143
+ return onAccountPublishPlanList((record === null || record === void 0 ? void 0 : record.accountInfo.id) || 0, record === null || record === void 0 ? void 0 : record.accountInfo.nickname);
144
+ },
145
+ children: "\u53D1\u5E03\u8BE6\u60C5"
146
+ })
147
+ })
148
+ });
149
+ }
150
+ }];
151
+ var _onQuery = function onQuery(query) {
152
+ setQuery(_objectSpread({}, query));
153
+ runTaskList(query, 1);
154
+ };
155
+ var _useRequest = useRequest(function () {
156
+ var postQuery = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : query;
157
+ var current = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : pagination.current;
158
+ return VideoPublishPublishStatisticController.list(_objectSpread(_objectSpread({}, postQuery), {}, {
159
+ startTime: postQuery.startTime > 100000 ? Math.floor(dayjs(postQuery.startTime).startOf('date').valueOf() * 0.001) || 0 : 0,
160
+ endTime: postQuery.endTime > 100000 ? Math.floor(dayjs(postQuery.endTime).endOf('date').valueOf() * 0.001) || 0 : 0,
161
+ current: current,
162
+ pageSize: pagination.pageSize
163
+ }), {
164
+ env: env
165
+ });
166
+ }, {
167
+ onSuccess: function onSuccess(result) {
168
+ setListData(result.list);
169
+ setPagination(result.pagination);
170
+ }
171
+ }),
172
+ runTaskList = _useRequest.run,
173
+ loadingTaskList = _useRequest.loading,
174
+ errorTaskList = _useRequest.error;
175
+ var onAccountPublishPlanList = function onAccountPublishPlanList(accountId) {
176
+ var nickname = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
177
+ Tool.drawer({
178
+ title: /*#__PURE__*/_jsxs(_Fragment, {
179
+ children: ["\u53D1\u5E03\u4EFB\u52A1\u8BA1\u5212\uFF1A", /*#__PURE__*/_jsx(Tag, {
180
+ color: "blue",
181
+ children: nickname
182
+ }), /*#__PURE__*/_jsx(Divider, {
183
+ type: "vertical"
184
+ }), query.startTime > 0 && /*#__PURE__*/_jsxs(_Fragment, {
185
+ children: [dayjs(query.startTime).format('YYYY-MM-DD'), " ", /*#__PURE__*/_jsx(SwapRightOutlined, {}), " ", dayjs(query.endTime).format('YYYY-MM-DD')]
186
+ })]
187
+ }),
188
+ content: /*#__PURE__*/_jsx(VideoPublishTaskPlanList, {
189
+ env: env,
190
+ publishTaskId: 0,
191
+ accountId: accountId,
192
+ startTime: query.startTime,
193
+ endTime: query.endTime
194
+ }),
195
+ width: 1200
196
+ });
197
+ };
198
+ return /*#__PURE__*/_jsx(LayoutContent, {
199
+ loading: loadingTaskList,
200
+ error: errorTaskList,
201
+ onReload: runTaskList,
202
+ title: "\u53D1\u5E03\u7EDF\u8BA1",
203
+ className: "video-publish-statistic-list",
204
+ extInfo: /*#__PURE__*/_jsx(VideoPublishStatisticPublishListQuery, {
205
+ defaultQuery: query,
206
+ onQuery: function onQuery(query) {
207
+ return _onQuery(query);
208
+ }
209
+ }),
210
+ children: /*#__PURE__*/_jsx(Table, {
211
+ size: "small",
212
+ bordered: true,
213
+ rowKey: function rowKey(record) {
214
+ return "".concat(record.accountInfo.id);
215
+ }
216
+ // rowClassName={ ( record ) => `row-${ record.status }` }
217
+ ,
218
+ loading: false,
219
+ columns: columns,
220
+ dataSource: listData,
221
+ pagination: false
222
+ })
223
+ });
224
+ };
225
+ export default VideoPublishStatisticPublishList;
@@ -0,0 +1,105 @@
1
+ .video-publish-statistic-list{
2
+
3
+ .article{
4
+ position: relative;
5
+ display: flex;
6
+ flex-direction: row;
7
+ cursor: pointer;
8
+ &.valid{
9
+ .isLoginValid{
10
+ background-color: #00bc00;
11
+ }
12
+ .shopName{
13
+ color: #005a00;
14
+ }
15
+ }
16
+ &.invalid{
17
+ background-color: #e1e1e1;
18
+ .isLoginValid{
19
+ background-color: red;
20
+ }
21
+ .shopName{
22
+ color: #999;
23
+ font-weight: 300;
24
+ }
25
+ .avatarUrl{
26
+ opacity: 0.5;
27
+ filter: grayscale(100%);
28
+ }
29
+ }
30
+ .avatar{
31
+ position: relative;
32
+ width: 40px;
33
+ //box-shadow: 0 0 5px #EEE;
34
+ .avatarUrl{
35
+ border-radius: 100px;
36
+ box-shadow: 0 0 5px #EEE;
37
+ }
38
+ .isLoginValid{
39
+ position: absolute;
40
+ left: 35px;
41
+ top: 35px;
42
+ width: 8px;
43
+ height: 8px;
44
+ border-radius: 100px;
45
+ }
46
+ }
47
+ .shopName{
48
+ max-width: 150px;
49
+ color: #666;
50
+ display: inline-block;
51
+ text-overflow: ellipsis;
52
+ //line-height: 30px;
53
+ font-size: 12px;
54
+ padding: 1px 0 0 12px;
55
+ line-height: 1.1em;
56
+ word-break: keep-all;
57
+ white-space: nowrap;
58
+ overflow: hidden;
59
+ }
60
+ .nicknameRemark{
61
+ max-width: 150px;
62
+ color: #666;
63
+ text-overflow: ellipsis;
64
+ overflow: hidden;
65
+ //background-color: #F6F6F6;
66
+ padding: 2px 0 1px;
67
+ font-weight: 300;
68
+ }
69
+ .uniqueId{
70
+ padding: 1px 0 0;
71
+ font-size: 12px;
72
+ opacity: 0.6;
73
+ }
74
+ }
75
+
76
+ .status-amount{
77
+ &.in-td{
78
+ font-size: 32px;
79
+ line-height: 1em;
80
+ }
81
+ .amount-0{
82
+ font-weight: 300;
83
+ color: #CCC !important;
84
+ }
85
+ small{
86
+ color: #999;
87
+ font-weight: 300;
88
+ }
89
+ .finish{
90
+ color: green;
91
+ }
92
+ .fail{
93
+ color: #C00;
94
+ }
95
+ .progress{
96
+ color: blue;
97
+ }
98
+ }
99
+
100
+ .row-repeal{
101
+ //opacity: 0.5;
102
+ -webkit-filter: grayscale(100%);
103
+ filter: grayscale(100%);
104
+ }
105
+ }
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import './query.less';
3
+ interface Props {
4
+ defaultQuery: VideoPublishStatisticPublish.ListQuery;
5
+ onQuery: (query: VideoPublishStatisticPublish.ListQuery) => void;
6
+ }
7
+ declare const VideoPublishStatisticPublishListQuery: React.FC<Props>;
8
+ export default VideoPublishStatisticPublishListQuery;
@@ -0,0 +1,57 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
+ import React, { useState } from 'react';
4
+ import { Button, DatePicker, Form, Space } from "antd";
5
+ import "./query.less";
6
+ import dayjs from "dayjs";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ import { jsxs as _jsxs } from "react/jsx-runtime";
9
+ var VideoPublishStatisticPublishListQuery = function VideoPublishStatisticPublishListQuery(_ref) {
10
+ var defaultQuery = _ref.defaultQuery,
11
+ _ref$onQuery = _ref.onQuery,
12
+ onQuery = _ref$onQuery === void 0 ? function () {} : _ref$onQuery;
13
+ var _Form$useForm = Form.useForm(),
14
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
15
+ form = _Form$useForm2[0];
16
+ var _useState = useState(_objectSpread({}, defaultQuery)),
17
+ _useState2 = _slicedToArray(_useState, 2),
18
+ query = _useState2[0],
19
+ setQuery = _useState2[1];
20
+ var todayEnd = dayjs(dayjs(Date.now()).format('YYYY-MM-DD 23:59:59')).valueOf();
21
+ var onTime = function onTime(startTime, endTime) {
22
+ query.startTime = startTime;
23
+ query.endTime = endTime;
24
+ setQuery(_objectSpread({}, query));
25
+ };
26
+ var onFinish = function onFinish() {
27
+ var values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
28
+ onQuery(_objectSpread(_objectSpread({}, query), values));
29
+ };
30
+ return /*#__PURE__*/_jsx("div", {
31
+ className: "videoPublishTaskPlanListQuery",
32
+ children: /*#__PURE__*/_jsx(Form, {
33
+ form: form,
34
+ initialValues: _objectSpread({}, query),
35
+ onFinish: onFinish,
36
+ children: /*#__PURE__*/_jsxs(Space, {
37
+ children: [/*#__PURE__*/_jsx(Form.Item, {
38
+ children: /*#__PURE__*/_jsx(DatePicker.RangePicker, {
39
+ defaultValue: query.startTime > 0 ? [query.startTime <= 0 ? null : dayjs(query.startTime), query.endTime <= 0 ? null : dayjs(query.endTime)] : undefined,
40
+ disabledDate: function disabledDate(currentDate) {
41
+ return currentDate.valueOf() > todayEnd;
42
+ },
43
+ onChange: function onChange(dates, dateStrings) {
44
+ var _dates$, _dates$2;
45
+ onTime((dates === null || dates === void 0 || (_dates$ = dates[0]) === null || _dates$ === void 0 ? void 0 : _dates$.valueOf()) || 0, (dates === null || dates === void 0 || (_dates$2 = dates[1]) === null || _dates$2 === void 0 ? void 0 : _dates$2.valueOf()) || 0);
46
+ }
47
+ })
48
+ }), /*#__PURE__*/_jsx(Button, {
49
+ type: "primary",
50
+ htmlType: "submit",
51
+ children: "\u641C\u7D22"
52
+ })]
53
+ })
54
+ })
55
+ });
56
+ };
57
+ export default VideoPublishStatisticPublishListQuery;
@@ -0,0 +1,3 @@
1
+ .videoPublishTaskPlanListQuery{
2
+
3
+ }
@@ -1,5 +1,5 @@
1
1
  // 业务服务器 api
2
- export var currentEnv = 'prod';
2
+ export var currentEnv = 'local';
3
3
  var ApiUrls = {
4
4
  local: {
5
5
  api: 'http://localhost:9999/',
@@ -161,7 +161,7 @@ declare const Tool: {
161
161
  OsPathSeparator(): string;
162
162
  getTitleByPath(path: string): string;
163
163
  h5Pay(query: Pay.H5PayQuery): void;
164
- notification(type: "success" | "info" | "warning" | "error", message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
164
+ notification(type: "error" | "success" | "info" | "warning", message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
165
165
  notificationSuccess(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
166
166
  notificationError(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
167
167
  notificationWarning(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
@@ -14,7 +14,8 @@ var AccountManageSettingConfig = function AccountManageSettingConfig(data) {
14
14
  var storeData = store.get(AccountManageSettingConfigKey);
15
15
  var outData = _objectSpread(_objectSpread({
16
16
  isChromeOpen: false,
17
- disabledApplyTask: false
17
+ disabledApplyTask: false,
18
+ sendMessageToPort: 9514
18
19
  }, storeData), {}, {
19
20
  // 优先用存储的;
20
21
  chromePath: storeData.chromePath || chromePath
@@ -6,8 +6,8 @@ import Tool from "./Tool";
6
6
  import notification from "./notification";
7
7
  import userAgent from "./user-agent";
8
8
  import VideoApiOpenChrome from "./video-api/open-chrome";
9
- import * as VideoPublishCrawlerTaskController from "../service/api/VideoPublishCrawlerTaskController";
10
-
9
+ import sleep from "./sleep";
10
+ import VideoApiQuitChrome from "./video-api/quit-chrome";
11
11
  // @isNew: 只有 新建账户,才要 isNew
12
12
  var openChrome = /*#__PURE__*/function () {
13
13
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(query, isNew) {
@@ -26,32 +26,43 @@ var openChrome = /*#__PURE__*/function () {
26
26
  notification.notificationError('没找到 Google 浏览器', '请设置 谷歌浏览器地址,或者重新安装 https://google.cn/chrome/');
27
27
  return _context.abrupt("return");
28
28
  case 5:
29
- data = getOpenQuery(query, isNew, settingConfig); //唤起 浏览器;
30
- // onOpenChromeRun({
31
- // ...query,
32
- // ...data,
33
- // chromeUserDataDir: settingConfig.chromeUserDataDir,
34
- // chromePath,
35
- // });
36
- _context.next = 8;
29
+ data = getOpenQuery(query, isNew, settingConfig);
30
+ if (!query.chromeProfileName) {
31
+ _context.next = 11;
32
+ break;
33
+ }
34
+ _context.next = 9;
35
+ return VideoApiQuitChrome({
36
+ platform: query.platform,
37
+ platformVideoAccountId: query.platformAccountId,
38
+ chromeProfileName: query.chromeProfileName
39
+ }).catch(function (err) {
40
+ console.warn('关闭 chrome 失败', query);
41
+ });
42
+ case 9:
43
+ _context.next = 11;
44
+ return sleep(2e3);
45
+ case 11:
46
+ _context.next = 13;
37
47
  return VideoApiOpenChrome({
38
48
  commandList: data.commandList
39
49
  }).catch(function (err) {
40
50
  // todo 上报
41
51
  console.log('open chrome err:', err);
42
- VideoPublishCrawlerTaskController.report({
43
- success: false,
44
- code: 'open-chrome-fail',
45
- message: err === null || err === void 0 ? void 0 : err.message,
46
- taskType: '',
47
- taskId: query.taskId,
48
- platform: query.platform,
49
- platformAccountId: query.platformAccountId
50
- }, {
51
- // env,
52
- });
52
+ // VideoPublishCrawlerTaskController.report({
53
+ // success: false,
54
+ // code: 'open-chrome-fail',
55
+ // message: err?.message,
56
+ //
57
+ // taskType: '',
58
+ // taskId: query.taskId,
59
+ // platform: query.platform,
60
+ // platformAccountId: query.platformAccountId,
61
+ // },{
62
+ // // env,
63
+ // });
53
64
  });
54
- case 8:
65
+ case 13:
55
66
  cmdResult = _context.sent;
56
67
  console.log("cmd:", query);
57
68
  if (!cmdResult) {
@@ -62,7 +73,7 @@ var openChrome = /*#__PURE__*/function () {
62
73
  // chromeProfileName: query.chromeProfileName,
63
74
  // });
64
75
  }
65
- case 11:
76
+ case 16:
66
77
  case "end":
67
78
  return _context.stop();
68
79
  }
@@ -0,0 +1,4 @@
1
+ export declare function list(body: {
2
+ current: number;
3
+ pageSize: number;
4
+ }, options?: Global.RequestOptions): Promise<VideoPublishStatisticPublish.ListResult>;
@@ -0,0 +1,28 @@
1
+ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
4
+ import request from "../../lib/request";
5
+ import { PublishDomainApi } from "./VideoPublishController";
6
+ export function list(_x, _x2) {
7
+ return _list.apply(this, arguments);
8
+ }
9
+ function _list() {
10
+ _list = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(body, options) {
11
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
12
+ while (1) switch (_context.prev = _context.next) {
13
+ case 0:
14
+ return _context.abrupt("return", request(PublishDomainApi("user/statisticPublish/list", options === null || options === void 0 ? void 0 : options.env), _objectSpread({
15
+ method: 'POST',
16
+ headers: {
17
+ 'Content-Type': 'application/json'
18
+ },
19
+ data: _objectSpread({}, body)
20
+ }, options || {})));
21
+ case 1:
22
+ case "end":
23
+ return _context.stop();
24
+ }
25
+ }, _callee);
26
+ }));
27
+ return _list.apply(this, arguments);
28
+ }
@@ -1,5 +1,6 @@
1
1
  export declare function list(body: {
2
2
  publishTaskId: number;
3
+ accountId: number;
3
4
  current: number;
4
5
  pageSize: number;
5
6
  }, options?: Global.RequestOptions): Promise<VideoPublishTaskPlan.ListResult>;
@@ -0,0 +1 @@
1
+ export declare function sendMessageToPort(body: PublishTaskPlan.ReportTaskQuery, options?: Global.RequestOptions): Promise<PublishTaskPlan.TaskDetail>;
@@ -0,0 +1,32 @@
1
+ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
4
+ import request from "../../lib/request";
5
+ import AccountManageSettingConfig from "../../lib/accountManageSettingConfig";
6
+ export function sendMessageToPort(_x, _x2) {
7
+ return _sendMessageToPort.apply(this, arguments);
8
+ }
9
+ function _sendMessageToPort() {
10
+ _sendMessageToPort = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(body, options) {
11
+ var setting;
12
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
13
+ while (1) switch (_context.prev = _context.next) {
14
+ case 0:
15
+ setting = AccountManageSettingConfig();
16
+ return _context.abrupt("return", request("http://127.0.0.1:".concat(setting.sendMessageToPort, "/publish/result"), _objectSpread({
17
+ method: 'POST',
18
+ headers: {
19
+ 'Content-Type': 'application/json'
20
+ },
21
+ data: _objectSpread({}, body),
22
+ timeout: 6e3,
23
+ silent: true
24
+ }, options || {})));
25
+ case 2:
26
+ case "end":
27
+ return _context.stop();
28
+ }
29
+ }, _callee);
30
+ }));
31
+ return _sendMessageToPort.apply(this, arguments);
32
+ }
@@ -29,6 +29,8 @@ declare namespace PublishTaskPlan {
29
29
  publishCoverUrl: string;
30
30
  goodsTitle: string;
31
31
  publishTime: number;
32
+ whoCanView: VideoPublish.WhoCanView;
33
+ noTopicIsUserRecommendTopic: boolean;
32
34
  }
33
35
  interface TaskDetailComment {
34
36
  content: string;
@@ -5,6 +5,7 @@ declare namespace VideoPublish {
5
5
  type VideoKindRateType = '' | 'now';
6
6
  type VideoFrom = 'local' | 'task';
7
7
  type VideoRateType = 'hour' | 'day';
8
+ type WhoCanView = '0' | '1' | '2';
8
9
  interface CreateTaskList {
9
10
  id: number;
10
11
  title: string;
@@ -37,6 +38,7 @@ declare namespace VideoPublish {
37
38
  salesVideoRate: number;
38
39
  salesVideoRateType: VideoRateType;
39
40
  salesDayMaxCount: number;
41
+ whoCanView: WhoCanView;
40
42
  startTime: number;
41
43
  created: number;
42
44
  taskFromProductType: string;
@@ -122,6 +124,8 @@ declare namespace VideoPublish {
122
124
  salesDayMaxCount: number;
123
125
  salesVideoKindRateType: VideoKindRateType;
124
126
  accountList: string[];
127
+ whoCanView: WhoCanView;
128
+ noTopicIsUserRecommendTopic: boolean;
125
129
  startTime: number | null;
126
130
  hourEnabled: number[];
127
131
  }
@@ -0,0 +1,16 @@
1
+ declare namespace VideoPublishStatisticPublish {
2
+ interface List {
3
+ finishAmount: number;
4
+ progressAmount: number;
5
+ failAmount: number;
6
+ accountInfo: VideoPublishVideoAccount.BaseInfo;
7
+ }
8
+ interface ListResult {
9
+ list: List[];
10
+ pagination: Global.Pagination;
11
+ }
12
+ interface ListQuery {
13
+ startTime: number;
14
+ endTime: number;
15
+ }
16
+ }
File without changes
@@ -20,5 +20,7 @@ declare namespace VideoPublishTaskPlan {
20
20
  accountInfo: VideoPublishVideoAccount.BaseInfo;
21
21
  }
22
22
  interface ListQuery {
23
+ startTime: number;
24
+ endTime: number;
23
25
  }
24
26
  }
@@ -12,6 +12,7 @@ declare namespace VideoPublishVideoAccount {
12
12
  nicknameRemark: string;
13
13
  }
14
14
  interface BaseInfo {
15
+ id: number;
15
16
  "platform": Global.VideoPlatformKind;
16
17
  isLoginValid: boolean;
17
18
  "groupId": number;
@@ -4,5 +4,6 @@ declare namespace VideoPublishAccountManageSetting {
4
4
  disabledApplyTask: boolean;
5
5
  chromePath: string;
6
6
  chromeUserDataDir: string;
7
+ sendMessageToPort: number;
7
8
  }
8
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "1.3.2",
3
+ "version": "1.3.6",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -40,7 +40,7 @@
40
40
  "access": "public"
41
41
  },
42
42
  "peerDependencies": {
43
- "antd": "^5.20",
43
+ "antd": "^5.21",
44
44
  "react": ">=18.x",
45
45
  "react-dom": ">=18.x"
46
46
  },