component-shipinlv 1.1.16 → 1.1.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. package/README.md +3 -0
  2. package/dist/UI/text-input.d.ts +2 -0
  3. package/dist/UI/text-input.js +4 -2
  4. package/dist/UI/text-input.less +4 -1
  5. package/dist/VideoPublish/account-manage/home.js +6 -2
  6. package/dist/VideoPublish/account-manage/list.less +2 -2
  7. package/dist/VideoPublish/create-task/index.js +6 -1
  8. package/dist/VideoPublish/index.css.d.ts +1 -4
  9. package/dist/VideoPublish/index.css.js +33 -4
  10. package/dist/VideoPublish/index.js +10 -1
  11. package/dist/VideoPublish/index.less +1 -1
  12. package/dist/VideoPublish/video-topic/add.d.ts +9 -0
  13. package/dist/VideoPublish/video-topic/add.js +89 -0
  14. package/dist/VideoPublish/video-topic/add.less +3 -0
  15. package/dist/VideoPublish/video-topic/index.d.ts +8 -0
  16. package/dist/VideoPublish/video-topic/index.js +301 -0
  17. package/dist/VideoPublish/video-topic/index.less +36 -0
  18. package/dist/VideoPublish/video-topic/select.d.ts +11 -0
  19. package/dist/VideoPublish/video-topic/select.js +168 -0
  20. package/dist/VideoPublish/video-topic/select.less +3 -0
  21. package/dist/asset/image/platform/buyin.png +0 -0
  22. package/dist/asset/image/platform/tiktok.png +0 -0
  23. package/dist/component/video-platform/logo.js +6 -0
  24. package/dist/component/video-platform/logo.less +3 -0
  25. package/dist/global.less +4 -0
  26. package/dist/index.d.ts +1 -0
  27. package/dist/index.js +1 -0
  28. package/dist/lib/Tool.d.ts +1 -1
  29. package/dist/service/api/VideoPublishVideoTopicController.d.ts +5 -0
  30. package/dist/service/api/VideoPublishVideoTopicController.js +80 -0
  31. package/dist/service/api/VideoPublishVideoTopicGroupController.d.ts +5 -0
  32. package/dist/service/api/VideoPublishVideoTopicGroupController.js +80 -0
  33. package/dist/types/VideoPublishVideoTopic.d.ts +23 -0
  34. package/dist/types/VideoPublishVideoTopic.js +0 -0
  35. package/dist/types/VideoPublishVideoTopicGroup.d.ts +13 -0
  36. package/dist/types/VideoPublishVideoTopicGroup.js +0 -0
  37. package/dist/window.d.ts +1 -1
  38. package/package.json +1 -1
package/README.md CHANGED
@@ -2,3 +2,6 @@
2
2
 
3
3
  😒 无语!
4
4
  这是私有库,你们用不了, 别下载了!
5
+
6
+
7
+
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import './text-input.less';
3
+ import { SizeType } from "antd/es/config-provider/SizeContext";
3
4
  interface Props {
4
5
  disabled?: boolean;
5
6
  type?: 'text' | 'textarea';
@@ -7,6 +8,7 @@ interface Props {
7
8
  label: React.ReactNode;
8
9
  value: string;
9
10
  maxLength?: number;
11
+ size?: SizeType;
10
12
  onFinish: (text: string) => void;
11
13
  }
12
14
  declare const TextInput: React.FC<Props>;
@@ -18,6 +18,7 @@ var TextInput = function TextInput(_ref) {
18
18
  value = _ref$value === void 0 ? '' : _ref$value,
19
19
  _ref$maxLength = _ref.maxLength,
20
20
  maxLength = _ref$maxLength === void 0 ? 1000 : _ref$maxLength,
21
+ size = _ref.size,
21
22
  _ref$onFinish = _ref.onFinish,
22
23
  onFinish = _ref$onFinish === void 0 ? function () {} : _ref$onFinish;
23
24
  var _useState = useState(false),
@@ -77,6 +78,7 @@ var TextInput = function TextInput(_ref) {
77
78
  onPressEnter: function onPressEnter(e) {
78
79
  onPost();
79
80
  },
81
+ size: size,
80
82
  className: "input",
81
83
  disabled: disabled,
82
84
  maxLength: maxLength,
@@ -95,8 +97,8 @@ var TextInput = function TextInput(_ref) {
95
97
  children: [/*#__PURE__*/_jsx("label", {
96
98
  className: "content",
97
99
  children: label
98
- }), !disabled && /*#__PURE__*/_jsx("a", {
99
- className: "editIcon ".concat(label ? '' : "labelEmpty", " edit-icon"),
100
+ }), /*#__PURE__*/_jsx("a", {
101
+ className: "editIcon ".concat(disabled ? 'disabled' : '', " ").concat(label ? '' : "labelEmpty", " edit-icon"),
100
102
  onClick: function onClick() {
101
103
  return onEdit(true);
102
104
  },
@@ -6,6 +6,9 @@
6
6
  .editIcon{
7
7
  display: inline-block;
8
8
  padding: 0 0 0 5px;
9
+ &.disabled{
10
+ visibility: hidden;
11
+ }
9
12
  }
10
13
 
11
14
  .labelEmpty{
@@ -16,4 +19,4 @@
16
19
 
17
20
  .input{
18
21
  width: 96%;
19
- }
22
+ }
@@ -6,6 +6,7 @@ import { VideoPlatform } from "../..";
6
6
  import HomePageAccountList from "./list";
7
7
  import Time from "../../UI/Time";
8
8
  import { IeOutlined } from "@ant-design/icons";
9
+ import Tool from "../../lib/Tool";
9
10
  import { jsx as _jsx } from "react/jsx-runtime";
10
11
  import { Fragment as _Fragment } from "react/jsx-runtime";
11
12
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -89,14 +90,17 @@ var VideoPublishAccountManageHomePage = function VideoPublishAccountManageHomePa
89
90
  _useState4 = _slicedToArray(_useState3, 1),
90
91
  openMenuItems = _useState4[0];
91
92
  var onOpen = function onOpen(key) {
93
+ var _window$getBridge;
92
94
  switch (key) {
93
95
  case 'creator':
96
+ var url = '';
94
97
  if (accountDetail.platform === 'douyin') {
95
- var _window$getBridge;
96
- (_window$getBridge = window.getBridge()) === null || _window$getBridge === void 0 || _window$getBridge.openBrowser(accountDetail.platform, key, accountDetail.accountId);
98
+ url = 'https://creator.douyin.com/creator-micro/home';
97
99
  }
100
+ (_window$getBridge = window.getBridge()) === null || _window$getBridge === void 0 || _window$getBridge.openVideoAccountBrowser(accountDetail.platform, '', accountDetail.accountId, url);
98
101
  break;
99
102
  }
103
+ Tool.toast('正在打开浏览器, 请稍等...', 8);
100
104
  };
101
105
  return /*#__PURE__*/_jsxs("div", {
102
106
  className: "videoPublishAccountManageHome",
@@ -8,7 +8,7 @@
8
8
  transition: width 0.3s ease-in-out;
9
9
 
10
10
  .search{
11
- margin: 10px;
11
+ margin: 10px 0;
12
12
  .onList{
13
13
  color: #999;
14
14
  font-size: 15px;
@@ -25,7 +25,7 @@
25
25
  flex: 2;
26
26
  height: 100%; // calc(100vh - 10px);
27
27
  overflow-y: auto;
28
- padding: 10px;
28
+ padding: 10px 0;
29
29
  &::-webkit-scrollbar {
30
30
  width: 2px; /* 滚动条的宽度 */
31
31
  }
@@ -16,6 +16,7 @@ import { useRequest } from "@umijs/hooks";
16
16
  import * as VideoPublishController from "../../service/api/VideoPublishController";
17
17
  import fileSelect from "../../base/fileSelect";
18
18
  import VideoPublishCreateTaskBase from "./base";
19
+ import dayjs from "dayjs";
19
20
  import { jsx as _jsx } from "react/jsx-runtime";
20
21
  import { jsxs as _jsxs } from "react/jsx-runtime";
21
22
  var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
@@ -173,6 +174,8 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
173
174
  if (data.startTime) {
174
175
  var _values$startTime;
175
176
  data.startTime = values.startTime ? parseInt((((_values$startTime = values.startTime) === null || _values$startTime === void 0 ? void 0 : _values$startTime.valueOf()) * 0.001).toFixed(0)) : 0;
177
+ } else {
178
+ data.startTime = Math.floor(Date.now() * 0.001);
176
179
  }
177
180
  if (videoList.length === 0) {
178
181
  Tool.toastError('视频为空,请选择视频');
@@ -199,7 +202,9 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
199
202
  labelCol: {
200
203
  span: formLabelSpan
201
204
  },
202
- initialValues: _objectSpread({}, formData),
205
+ initialValues: _objectSpread(_objectSpread({}, formData), {}, {
206
+ startTime: typeof formData.startTime === 'number' ? dayjs(formData.startTime) : null
207
+ }),
203
208
  disabled: disabled || loadingTask,
204
209
  scrollToFirstError: true,
205
210
  onFinish: onFinish,
@@ -1,5 +1,2 @@
1
- /// <reference types="react" />
2
- declare const _default: {
3
- videoPublish: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
4
- };
1
+ declare const _default: {};
5
2
  export default _default;
@@ -1,6 +1,35 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
- var _templateObject;
3
- import styled from 'styled-components';
4
1
  export default {
5
- videoPublish: styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n height: 100%;\n .menu{\n display: flex;\n flex-direction: column;\n width: 180px;\n margin: 0 12px 0 0;\n padding: 0 10px 0 0;\n min-height: 100%;\n border-right: 1px solid #E8E8E8;\n .ant-menu{\n margin: 10px 0 0;\n }\n .ant-menu-light{\n background-color: transparent !important;\n border-right: none !important;\n }\n }\n .pageContents{\n flex: 1;\n padding: 10px 0 0 0;\n overflow-y: auto;\n .my-tabs{\n width: 100%;\n > .ant-tabs-nav{\n display: none;\n }\n }\n }\n\n "])))
2
+ // videoPublish: styled.div`
3
+ // display: flex;
4
+ // flex-direction: row;
5
+ // height: 100%;
6
+ // .menu{
7
+ // display: flex;
8
+ // flex-direction: column;
9
+ // width: 180px;
10
+ // margin: 0 12px 0 0;
11
+ // padding: 0 10px 0 0;
12
+ // min-height: 100%;
13
+ // border-right: 1px solid #E8E8E8;
14
+ // .ant-menu{
15
+ // margin: 10px 0 0;
16
+ // }
17
+ // .ant-menu-light{
18
+ // background-color: transparent !important;
19
+ // border-right: none !important;
20
+ // }
21
+ // }
22
+ // .pageContents{
23
+ // flex: 1;
24
+ // padding: 10px 0 0 0;
25
+ // overflow-y: auto;
26
+ // .my-tabs{
27
+ // width: 100%;
28
+ // > .ant-tabs-nav{
29
+ // display: none;
30
+ // }
31
+ // }
32
+ // }
33
+ //
34
+ // `,
6
35
  };
@@ -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 { ClockCircleOutlined, FileSearchOutlined, GlobalOutlined, SettingOutlined, UsergroupAddOutlined, VideoCameraAddOutlined } from "@ant-design/icons";
7
+ import { BorderlessTableOutlined, ClockCircleOutlined, FileSearchOutlined, GlobalOutlined, 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";
@@ -12,6 +12,7 @@ import VideoPublishAccountManageSettingPage from "./account-manage/setting";
12
12
  import VideoPublishAccountManageHomePage from "./account-manage/home";
13
13
  import VideoPublishPublishVideoPlan from "./publish-task-plan";
14
14
  import VideoPublishVideoAccountProxy from "./proxy/list";
15
+ import VideoPublishTaskVideoTopic from "./video-topic";
15
16
  import { jsx as _jsx } from "react/jsx-runtime";
16
17
  import { jsxs as _jsxs } from "react/jsx-runtime";
17
18
  var VideoPublish = function VideoPublish(_ref) {
@@ -55,6 +56,14 @@ var VideoPublish = function VideoPublish(_ref) {
55
56
  disabled: disabled,
56
57
  env: env
57
58
  })
59
+ }, {
60
+ key: 'topic',
61
+ icon: /*#__PURE__*/_jsx(BorderlessTableOutlined, {}),
62
+ label: '话题',
63
+ children: /*#__PURE__*/_jsx(VideoPublishTaskVideoTopic, {
64
+ disabled: disabled,
65
+ env: env
66
+ })
58
67
  }, {
59
68
  key: 'proxy',
60
69
  icon: /*#__PURE__*/_jsx(GlobalOutlined, {}),
@@ -33,7 +33,7 @@
33
33
 
34
34
  .pageContents {
35
35
  flex: 1;
36
- padding: 16px 16px 0 0 ;
36
+ padding: 16px 16px 0 16px ;
37
37
  overflow-y: auto;
38
38
 
39
39
  .my-tabs {
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import "./add.less";
3
+ interface Props {
4
+ env?: Global.Env;
5
+ groupId: number;
6
+ onAdd: () => void;
7
+ }
8
+ declare const VideoPublishTaskVideoTopicAdd: React.FC<Props>;
9
+ export default VideoPublishTaskVideoTopicAdd;
@@ -0,0 +1,89 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import React from "react";
3
+ import "./add.less";
4
+ import { useRequest } from "@umijs/hooks";
5
+ import * as VideoPublishVideoTopicController from "../../service/api/VideoPublishVideoTopicController";
6
+ import { Button, Form, Input } from "antd";
7
+ import { PlusCircleFilled } from "@ant-design/icons";
8
+ import Tool from "../../lib/Tool";
9
+ import DialogDrawerFooter from "../../UI/DialogDrawerFooter";
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ import { jsxs as _jsxs } from "react/jsx-runtime";
12
+ var VideoPublishTaskVideoTopicAdd = function VideoPublishTaskVideoTopicAdd(_ref) {
13
+ var _ref$groupId = _ref.groupId,
14
+ groupId = _ref$groupId === void 0 ? 0 : _ref$groupId,
15
+ env = _ref.env,
16
+ _ref$onAdd = _ref.onAdd,
17
+ onAdd = _ref$onAdd === void 0 ? function () {} : _ref$onAdd;
18
+ var _Form$useForm = Form.useForm(),
19
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
20
+ form = _Form$useForm2[0];
21
+ var _useRequest = useRequest(function (query) {
22
+ return VideoPublishVideoTopicController.create({
23
+ list: query
24
+ }, {
25
+ env: env
26
+ });
27
+ }, {
28
+ manual: true,
29
+ onSuccess: function onSuccess() {
30
+ Tool.toast('已经保存');
31
+ onAdd();
32
+ }
33
+ }),
34
+ runCreate = _useRequest.run,
35
+ loadingCreate = _useRequest.loading;
36
+ var onFinish = function onFinish(values) {
37
+ var _values$topic;
38
+ var topicList = ((_values$topic = values.topic) === null || _values$topic === void 0 ? void 0 : _values$topic.split(/[#\s\n]/)) || [];
39
+ var list = [];
40
+ topicList.forEach(function (title) {
41
+ if (!title) {
42
+ return;
43
+ }
44
+ list.push({
45
+ id: 0,
46
+ title: title,
47
+ groupId: groupId,
48
+ enabled: true
49
+ });
50
+ });
51
+ if (list.length === 0) {
52
+ Tool.toastError('没有找到有效的话题,请检查');
53
+ return;
54
+ }
55
+ runCreate(list);
56
+ };
57
+ return /*#__PURE__*/_jsx("div", {
58
+ className: "videoTopicAdd",
59
+ children: /*#__PURE__*/_jsxs(Form, {
60
+ disabled: loadingCreate,
61
+ form: form,
62
+ onFinish: onFinish,
63
+ children: [/*#__PURE__*/_jsx(Form.Item, {
64
+ name: "topic",
65
+ rules: [{
66
+ max: 2000,
67
+ message: '最大输入2000个字符'
68
+ }],
69
+ children: /*#__PURE__*/_jsx(Input.TextArea, {
70
+ autoFocus: true,
71
+ autoSize: {
72
+ minRows: 10,
73
+ maxRows: 20
74
+ },
75
+ placeholder: "\u6279\u91CF\u8F93\u5165\u8BDD\u9898\uFF08\u652F\u6301\u7A7A\u683C\u3001\u56DE\u8F66\u5206\u5272\uFF09\uFF0C\u6BD4\u5982\uFF1A\u597D\u7269 \u957F\u8896"
76
+ })
77
+ }), /*#__PURE__*/_jsx(DialogDrawerFooter, {
78
+ children: /*#__PURE__*/_jsx(Button, {
79
+ type: "primary",
80
+ icon: /*#__PURE__*/_jsx(PlusCircleFilled, {}),
81
+ htmlType: "submit",
82
+ loading: loadingCreate,
83
+ children: "\u4FDD\u5B58\u8BDD\u9898"
84
+ })
85
+ })]
86
+ })
87
+ });
88
+ };
89
+ export default VideoPublishTaskVideoTopicAdd;
@@ -0,0 +1,3 @@
1
+ .videoTopicAdd{
2
+
3
+ }
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import "./index.less";
3
+ interface Props {
4
+ disabled?: boolean;
5
+ env?: Global.Env;
6
+ }
7
+ declare const VideoPublishTaskVideoTopic: React.FC<Props>;
8
+ export default VideoPublishTaskVideoTopic;
@@ -0,0 +1,301 @@
1
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
+ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
3
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
4
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
5
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
6
+ import React, { useState } from "react";
7
+ import "./index.less";
8
+ import PageContentWarp from "../../UI/PageContentWarp";
9
+ import { useRequest } from "@umijs/hooks";
10
+ import * as VideoPublishVideoTopicController from "../../service/api/VideoPublishVideoTopicController";
11
+ import * as VideoPublishVideoTopicGroupController from "../../service/api/VideoPublishVideoTopicGroupController";
12
+ import { Button, Card, Popconfirm, Space, Switch, Tag } from "antd";
13
+ import { PlusCircleFilled, RedoOutlined } from "@ant-design/icons";
14
+ import TextInput from "../../UI/text-input";
15
+ import Tool from "../../lib/Tool";
16
+ import VideoPublishTaskVideoTopicAdd from "./add";
17
+ import { jsx as _jsx } from "react/jsx-runtime";
18
+ import { jsxs as _jsxs } from "react/jsx-runtime";
19
+ var VideoPublishTaskVideoTopic = function VideoPublishTaskVideoTopic(_ref) {
20
+ var disabled = _ref.disabled,
21
+ env = _ref.env;
22
+ var _useState = useState([]),
23
+ _useState2 = _slicedToArray(_useState, 2),
24
+ listData = _useState2[0],
25
+ setListData = _useState2[1];
26
+ var _useState3 = useState({}),
27
+ _useState4 = _slicedToArray(_useState3, 2),
28
+ loadingCreateDict = _useState4[0],
29
+ setLoadingCreateDict = _useState4[1];
30
+ var _useState5 = useState({}),
31
+ _useState6 = _slicedToArray(_useState5, 2),
32
+ loadingCreateGroupDict = _useState6[0],
33
+ setLoadingCreateGroupDict = _useState6[1];
34
+ var _useRequest = useRequest(function () {
35
+ return VideoPublishVideoTopicController.list({}, {
36
+ env: env
37
+ });
38
+ }, {
39
+ onSuccess: function onSuccess(result) {
40
+ setListData(result);
41
+ }
42
+ }),
43
+ run = _useRequest.run,
44
+ loading = _useRequest.loading,
45
+ error = _useRequest.error;
46
+ var _useRequest2 = useRequest(function (query) {
47
+ return VideoPublishVideoTopicController.create({
48
+ list: query
49
+ }, {
50
+ env: env
51
+ });
52
+ }, {
53
+ manual: true,
54
+ onSuccess: function onSuccess(result) {
55
+ Tool.toast('已经保存');
56
+ }
57
+ }),
58
+ runCreate = _useRequest2.run,
59
+ loadingCreate = _useRequest2.loading;
60
+ var _useRequest3 = useRequest(function (query) {
61
+ return VideoPublishVideoTopicGroupController.create(_objectSpread({}, query), {
62
+ env: env
63
+ });
64
+ }, {
65
+ manual: true,
66
+ onSuccess: function onSuccess(groupId) {
67
+ Tool.toast('已经保存');
68
+ }
69
+ }),
70
+ runGroupCreate = _useRequest3.run,
71
+ loadingGroupCreate = _useRequest3.loading;
72
+ var _useRequest4 = useRequest(function (id) {
73
+ return VideoPublishVideoTopicGroupController.del({
74
+ id: id
75
+ }, {
76
+ env: env
77
+ });
78
+ }, {
79
+ manual: true,
80
+ onSuccess: function onSuccess(groupId) {
81
+ Tool.toast('已经删除');
82
+ run();
83
+ }
84
+ }),
85
+ runGroupDel = _useRequest4.run,
86
+ loadingGroupDel = _useRequest4.loading;
87
+ var onDel = function onDel(id) {};
88
+ var onEdit = /*#__PURE__*/function () {
89
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(groupId, item) {
90
+ var query;
91
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
92
+ while (1) switch (_context.prev = _context.next) {
93
+ case 0:
94
+ query = [{
95
+ id: item.id,
96
+ title: item.title,
97
+ groupId: groupId,
98
+ enabled: item.enabled
99
+ }];
100
+ onLoadingCreate(item.id, true);
101
+ _context.next = 4;
102
+ return runCreate(query).catch(function (err) {});
103
+ case 4:
104
+ onLoadingCreate(item.id, false);
105
+ case 5:
106
+ case "end":
107
+ return _context.stop();
108
+ }
109
+ }, _callee);
110
+ }));
111
+ return function onEdit(_x, _x2) {
112
+ return _ref2.apply(this, arguments);
113
+ };
114
+ }();
115
+ var onGroupEdit = /*#__PURE__*/function () {
116
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(items) {
117
+ var query, createGroupId;
118
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
119
+ while (1) switch (_context2.prev = _context2.next) {
120
+ case 0:
121
+ query = {
122
+ id: items.groupId,
123
+ name: items.groupName,
124
+ enabled: items.enabled
125
+ };
126
+ onLoadingGroupCreate(items.groupId, true);
127
+ _context2.next = 4;
128
+ return runGroupCreate(query).catch(function (err) {});
129
+ case 4:
130
+ createGroupId = _context2.sent;
131
+ onLoadingGroupCreate(createGroupId || items.groupId, false);
132
+ if (items.groupId <= 0) {
133
+ run();
134
+ }
135
+ case 7:
136
+ case "end":
137
+ return _context2.stop();
138
+ }
139
+ }, _callee2);
140
+ }));
141
+ return function onGroupEdit(_x3) {
142
+ return _ref3.apply(this, arguments);
143
+ };
144
+ }();
145
+ var onLoadingCreate = function onLoadingCreate(id, loading) {
146
+ loadingCreateDict[id] = loading;
147
+ setLoadingCreateDict(_objectSpread({}, loadingCreateDict));
148
+ };
149
+ var onLoadingGroupCreate = function onLoadingGroupCreate(id, loading) {
150
+ loadingCreateGroupDict[id] = loading;
151
+ setLoadingCreateGroupDict(_objectSpread({}, loadingCreateGroupDict));
152
+ };
153
+ var onAddDialog = function onAddDialog(groupId) {
154
+ var dialog = Tool.drawer({
155
+ title: '添加话题',
156
+ content: /*#__PURE__*/_jsx(VideoPublishTaskVideoTopicAdd, {
157
+ groupId: groupId,
158
+ env: env,
159
+ onAdd: function onAdd() {
160
+ run();
161
+ dialog.destroy();
162
+ }
163
+ }),
164
+ width: 860
165
+ });
166
+ };
167
+ var onDelGroup = function onDelGroup(groupId) {
168
+ runGroupDel(groupId);
169
+ };
170
+ return /*#__PURE__*/_jsxs(PageContentWarp, {
171
+ loading: loading,
172
+ error: error,
173
+ onReload: run,
174
+ title: "\u8BDD\u9898\u5217\u8868",
175
+ extInfo: /*#__PURE__*/_jsxs("a", {
176
+ onClick: function onClick() {
177
+ return run();
178
+ },
179
+ children: [/*#__PURE__*/_jsx(RedoOutlined, {}), " \u5237\u65B0"]
180
+ }),
181
+ className: "videoPublishTaskVideoTopic",
182
+ children: [listData.map(function (items, index) {
183
+ return /*#__PURE__*/_jsx(Card, {
184
+ className: "groupCard",
185
+ title: /*#__PURE__*/_jsx("div", {
186
+ children: /*#__PURE__*/_jsxs(Space, {
187
+ size: 20,
188
+ children: [/*#__PURE__*/_jsx("div", {
189
+ className: "topicTitle",
190
+ children: /*#__PURE__*/_jsx(TextInput, {
191
+ className: "remarkInput",
192
+ maxLength: 3200,
193
+ size: "small",
194
+ disabled: loadingCreateGroupDict[items.groupId],
195
+ label: items.groupName || '',
196
+ value: items.groupName || '',
197
+ onFinish: function onFinish(title) {
198
+ items.groupName = title;
199
+ listData[index] = items;
200
+ setListData(_toConsumableArray(listData));
201
+ onGroupEdit(items);
202
+ }
203
+ })
204
+ }), /*#__PURE__*/_jsx(Switch, {
205
+ defaultChecked: items.enabled,
206
+ className: "switch",
207
+ loading: loadingCreateGroupDict[items.groupId],
208
+ checkedChildren: "\u542F\u7528\u5206\u7EC4",
209
+ unCheckedChildren: "\u7981\u7528\u5206\u7EC4",
210
+ onChange: function onChange(enabled) {
211
+ items.enabled = enabled;
212
+ listData[index] = items;
213
+ setListData(_toConsumableArray(listData));
214
+ onGroupEdit(items);
215
+ }
216
+ }), /*#__PURE__*/_jsx(Popconfirm, {
217
+ title: "\u786E\u5B9A\u5220\u9664\uFF1F",
218
+ description: "\u5220\u9664\u4E4B\u540E\uFF0C\u5206\u7EC4\u4E0B\u9762\u7684 \u8BDD\u9898\u4E5F\u4F1A\u88AB\u5220\u9664\uFF0C\u4E14\u65E0\u6CD5\u6062\u590D\uFF01",
219
+ onConfirm: function onConfirm() {
220
+ return onDelGroup(items.groupId);
221
+ },
222
+ children: /*#__PURE__*/_jsx(Button, {
223
+ type: "link",
224
+ danger: true,
225
+ loading: loadingGroupDel,
226
+ children: "\u5220\u9664\u5206\u7EC4"
227
+ })
228
+ })]
229
+ })
230
+ }),
231
+ extra: /*#__PURE__*/_jsx(Button, {
232
+ type: "primary",
233
+ size: "small",
234
+ ghost: true,
235
+ icon: /*#__PURE__*/_jsx(PlusCircleFilled, {}),
236
+ onClick: function onClick() {
237
+ return onAddDialog(items.groupId);
238
+ },
239
+ children: "\u8BDD\u9898"
240
+ }),
241
+ children: items.list.map(function (item, i) {
242
+ return /*#__PURE__*/_jsx(Tag, {
243
+ closeIcon: true,
244
+ onClose: function onClose() {
245
+ return onDel(item.id);
246
+ },
247
+ children: /*#__PURE__*/_jsxs(Space, {
248
+ children: [/*#__PURE__*/_jsx("div", {
249
+ className: "topicTitle",
250
+ children: /*#__PURE__*/_jsx(TextInput, {
251
+ className: "remarkInput",
252
+ maxLength: 20,
253
+ size: "small",
254
+ disabled: loadingCreateDict[item.id],
255
+ label: item.title || '',
256
+ value: item.title || '',
257
+ onFinish: function onFinish(title) {
258
+ item.title = title;
259
+ listData[index].list[i] = item;
260
+ setListData(_toConsumableArray(listData));
261
+ onEdit(items.groupId, item);
262
+ }
263
+ })
264
+ }), /*#__PURE__*/_jsx(Switch, {
265
+ defaultChecked: item.enabled,
266
+ className: "switch",
267
+ size: "small",
268
+ loading: loadingCreateDict[item.id],
269
+ checkedChildren: "\u542F\u7528",
270
+ unCheckedChildren: "\u7981\u7528",
271
+ onChange: function onChange(enabled) {
272
+ item.enabled = enabled;
273
+ listData[index].list[i] = item;
274
+ setListData(_toConsumableArray(listData));
275
+ onEdit(items.groupId, item);
276
+ }
277
+ })]
278
+ })
279
+ }, "".concat(item.id, "-").concat(i));
280
+ })
281
+ }, items.groupId);
282
+ }), /*#__PURE__*/_jsx("div", {
283
+ className: "addGroup",
284
+ children: /*#__PURE__*/_jsx(Button, {
285
+ type: "primary",
286
+ icon: /*#__PURE__*/_jsx(PlusCircleFilled, {}),
287
+ ghost: true,
288
+ onClick: function onClick() {
289
+ return onGroupEdit({
290
+ groupId: 0,
291
+ groupName: "\u7EC4 ".concat(listData.length + 1),
292
+ enabled: true,
293
+ list: []
294
+ });
295
+ },
296
+ children: "\u5206\u7EC4"
297
+ })
298
+ })]
299
+ });
300
+ };
301
+ export default VideoPublishTaskVideoTopic;
@@ -0,0 +1,36 @@
1
+ .videoPublishTaskVideoTopic{
2
+ display: flex;
3
+ flex-direction: column;
4
+ height: 100%;
5
+ .ant-tag{
6
+ font-size: 14px;
7
+ padding-top: 3px ;
8
+ padding-bottom: 3px ;
9
+ margin-bottom: 10px;
10
+ }
11
+ .topicTitle{
12
+ display: inline-block;
13
+ margin: 0 12px 0 0;
14
+ word-break: keep-all;
15
+ line-height: 26px;
16
+ white-space: nowrap;
17
+ }
18
+ .switch{
19
+ position: relative;
20
+ top: -1px;
21
+ margin: 0 12px 0 0;
22
+ }
23
+ .groupCard{
24
+ margin: 0 0 20px 0;
25
+ box-shadow: 0 0 5px #EEE;
26
+ }
27
+ .add{
28
+ padding: 12px 0 0;
29
+ .save{
30
+ padding: 12px 0 0 0;
31
+ }
32
+ }
33
+
34
+ .addGroup{
35
+ }
36
+ }
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import "./select.less";
3
+ interface Props {
4
+ disabled?: boolean;
5
+ topicGroupId: number;
6
+ topicCount: number[];
7
+ env?: Global.Env;
8
+ onSelect: (topicGroupId: number, topicCount: number[]) => void;
9
+ }
10
+ declare const VideoPublishTaskVideoTopicSelect: React.FC<Props>;
11
+ export default VideoPublishTaskVideoTopicSelect;
@@ -0,0 +1,168 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import React, { useState } from "react";
3
+ import "./select.less";
4
+ import PageContentWarp from "../../UI/PageContentWarp";
5
+ import { useRequest } from "@umijs/hooks";
6
+ import * as VideoPublishVideoTopicGroupController from "../../service/api/VideoPublishVideoTopicGroupController";
7
+ import { Button, Form, Result, Select, Slider } from "antd";
8
+ import { RedoOutlined, UnorderedListOutlined } from "@ant-design/icons";
9
+ import DialogDrawerFooter from "../../UI/DialogDrawerFooter";
10
+ import Tool from "../../lib/Tool";
11
+ import VideoPublishTaskVideoTopic from "./index";
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { jsxs as _jsxs } from "react/jsx-runtime";
14
+ import { Fragment as _Fragment } from "react/jsx-runtime";
15
+ var VideoPublishTaskVideoTopicSelect = function VideoPublishTaskVideoTopicSelect(_ref) {
16
+ var disabled = _ref.disabled,
17
+ _ref$topicGroupId = _ref.topicGroupId,
18
+ topicGroupId = _ref$topicGroupId === void 0 ? 0 : _ref$topicGroupId,
19
+ _ref$topicCount = _ref.topicCount,
20
+ topicCount = _ref$topicCount === void 0 ? [2, 3] : _ref$topicCount,
21
+ env = _ref.env,
22
+ _ref$onSelect = _ref.onSelect,
23
+ onSelect = _ref$onSelect === void 0 ? function () {} : _ref$onSelect;
24
+ var _Form$useForm = Form.useForm(),
25
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
26
+ form = _Form$useForm2[0];
27
+ var _useState = useState([]),
28
+ _useState2 = _slicedToArray(_useState, 2),
29
+ groupListData = _useState2[0],
30
+ setGroupListData = _useState2[1];
31
+ var _useRequest = useRequest(function () {
32
+ return VideoPublishVideoTopicGroupController.list({}, {
33
+ env: env
34
+ });
35
+ }, {
36
+ onSuccess: function onSuccess(result) {
37
+ setGroupListData(result);
38
+ }
39
+ }),
40
+ run = _useRequest.run,
41
+ loading = _useRequest.loading,
42
+ error = _useRequest.error;
43
+ var onFinish = function onFinish(values) {
44
+ onSelect(values.topicGroupId, values.topicCount);
45
+ };
46
+ var onCreateTopic = function onCreateTopic() {
47
+ var dialog = Tool.drawer({
48
+ title: '',
49
+ content: /*#__PURE__*/_jsx(VideoPublishTaskVideoTopic, {
50
+ env: env,
51
+ disabled: disabled
52
+ }),
53
+ width: 980,
54
+ onClose: function onClose() {
55
+ run();
56
+ }
57
+ });
58
+ };
59
+ return /*#__PURE__*/_jsx(PageContentWarp, {
60
+ loading: loading,
61
+ error: error,
62
+ onReload: run,
63
+ title: " ",
64
+ extInfo: /*#__PURE__*/_jsx("a", {
65
+ onClick: function onClick() {
66
+ return onCreateTopic();
67
+ },
68
+ children: "\u7F16\u8F91\u8BDD\u9898"
69
+ }),
70
+ className: "videoPublishTaskVideoTopicSelect",
71
+ children: groupListData.length === 0 ? /*#__PURE__*/_jsx("div", {
72
+ children: /*#__PURE__*/_jsx(Result, {
73
+ status: "403",
74
+ title: "\u4F60\u8FD8\u6CA1\u521B\u5EFA\u8BDD\u9898",
75
+ subTitle: "\u521B\u5EFA\u8BDD\u9898\u540E\uFF0C\u624D\u80FD\u9009\u62E9",
76
+ extra: /*#__PURE__*/_jsx(Button, {
77
+ type: "primary",
78
+ onClick: function onClick() {
79
+ return onCreateTopic();
80
+ },
81
+ children: "\u521B\u5EFA"
82
+ })
83
+ })
84
+ }) : /*#__PURE__*/_jsxs(Form, {
85
+ form: form,
86
+ onFinish: onFinish,
87
+ disabled: disabled,
88
+ initialValues: {
89
+ topicGroupId: topicGroupId,
90
+ topicCount: topicCount
91
+ },
92
+ labelCol: {
93
+ span: 6
94
+ },
95
+ children: [/*#__PURE__*/_jsx(Form.Item, {
96
+ label: "\u9009\u62E9\u5206\u7EC4",
97
+ name: "topicGroupId",
98
+ extra: /*#__PURE__*/_jsxs("a", {
99
+ onClick: function onClick() {
100
+ return run();
101
+ },
102
+ children: [/*#__PURE__*/_jsx(RedoOutlined, {}), " \u5237\u65B0"]
103
+ }),
104
+ children: /*#__PURE__*/_jsxs(Select, {
105
+ style: {
106
+ width: 300
107
+ },
108
+ children: [/*#__PURE__*/_jsxs(Select.Option, {
109
+ value: 0,
110
+ children: [/*#__PURE__*/_jsx(UnorderedListOutlined, {}), " \u8BF7\u9009\u62E9"]
111
+ }), groupListData.map(function (items, index) {
112
+ return /*#__PURE__*/_jsxs(Select.Option, {
113
+ value: items.id,
114
+ disabled: items.disabled || items.topicCount <= 0,
115
+ children: [items.name, " ", /*#__PURE__*/_jsxs("small", {
116
+ className: "gray",
117
+ children: ["/ # ", items.topicCount, "\u4E2A\u8BDD\u9898"]
118
+ })]
119
+ }, items.id);
120
+ })]
121
+ })
122
+ }), /*#__PURE__*/_jsx(Form.Item, {
123
+ label: "\u968F\u673A\u8BDD\u9898\u6570\u91CF",
124
+ name: "topicCount",
125
+ children: /*#__PURE__*/_jsx(Slider, {
126
+ max: 5,
127
+ min: 1,
128
+ step: 1,
129
+ range: true,
130
+ marks: {
131
+ 1: /*#__PURE__*/_jsxs(_Fragment, {
132
+ children: ["1", /*#__PURE__*/_jsx("small", {
133
+ children: "\u4E2A"
134
+ })]
135
+ }),
136
+ 2: /*#__PURE__*/_jsxs(_Fragment, {
137
+ children: ["2", /*#__PURE__*/_jsx("small", {
138
+ children: "\u4E2A"
139
+ })]
140
+ }),
141
+ 3: /*#__PURE__*/_jsxs(_Fragment, {
142
+ children: ["3", /*#__PURE__*/_jsx("small", {
143
+ children: "\u4E2A"
144
+ })]
145
+ }),
146
+ 4: /*#__PURE__*/_jsxs(_Fragment, {
147
+ children: ["4", /*#__PURE__*/_jsx("small", {
148
+ children: "\u4E2A"
149
+ })]
150
+ }),
151
+ 5: /*#__PURE__*/_jsxs(_Fragment, {
152
+ children: ["5", /*#__PURE__*/_jsx("small", {
153
+ children: "\u4E2A"
154
+ })]
155
+ })
156
+ }
157
+ })
158
+ }), /*#__PURE__*/_jsx(DialogDrawerFooter, {
159
+ children: /*#__PURE__*/_jsx(Button, {
160
+ htmlType: "submit",
161
+ type: "primary",
162
+ children: "\u786E\u5B9A"
163
+ })
164
+ })]
165
+ })
166
+ });
167
+ };
168
+ export default VideoPublishTaskVideoTopicSelect;
@@ -0,0 +1,3 @@
1
+ .videoPublishTaskVideoTopicSelect{
2
+ padding-right: 12px;
3
+ }
@@ -10,6 +10,12 @@ export var VideoPlatformList = [{
10
10
  videoWebSiteUrl: 'https://www.douyin.com/user/self?showTab=post',
11
11
  // auth login
12
12
  allowMainDomainList: ['douyin.com', 'iesdouyin.com']
13
+ }, {
14
+ platform: 'buyin',
15
+ name: '巨量百应',
16
+ videoWebSiteUrl: 'https://buyin.jinritemai.com/dashboard/merch-picking-library',
17
+ // auth login
18
+ allowMainDomainList: ['buyin.jinritemai.com']
13
19
  }, {
14
20
  platform: 'kuaishou',
15
21
  name: '快手',
@@ -18,6 +18,9 @@
18
18
  &.douyin{
19
19
  background-image: url("../../asset/image/platform/douyin.png");
20
20
  }
21
+ &.buyin{
22
+ background-image: url("../../asset/image/platform/buyin.png");
23
+ }
21
24
  &.kuaishou{
22
25
  background-image: url("../../asset/image/platform/kuaishou.png");
23
26
  }
package/dist/global.less CHANGED
@@ -15,3 +15,7 @@ a{
15
15
  cursor: not-allowed;
16
16
  }
17
17
  }
18
+
19
+ small.gray{
20
+ color: #777;
21
+ }
package/dist/index.d.ts CHANGED
@@ -16,6 +16,7 @@ export { default as VideoPublishCreateTask } from './VideoPublish/create-task';
16
16
  export { default as VideoPublishVideoAccount } from './VideoPublish/video-account';
17
17
  export { default as VideoKindTag } from './component/videoKindTag';
18
18
  export { VideoKindTagList } from './component/videoKindTag';
19
+ export { default as VideoPublishTaskVideoTopicSelect } from './VideoPublish/video-topic/select';
19
20
  export { default as fileSelect } from './base/fileSelect';
20
21
  export { default as folderOpen } from './base/folderOpen';
21
22
  export { default as folderSelect } from './base/folderSelect';
package/dist/index.js CHANGED
@@ -20,6 +20,7 @@ export { default as VideoPublishCreateTask } from "./VideoPublish/create-task";
20
20
  export { default as VideoPublishVideoAccount } from "./VideoPublish/video-account";
21
21
  export { default as VideoKindTag } from "./component/videoKindTag";
22
22
  export { VideoKindTagList } from "./component/videoKindTag";
23
+ export { default as VideoPublishTaskVideoTopicSelect } from "./VideoPublish/video-topic/select";
23
24
  export { default as fileSelect } from "./base/fileSelect";
24
25
  export { default as folderOpen } from "./base/folderOpen";
25
26
  export { default as folderSelect } from "./base/folderSelect";
@@ -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;
@@ -0,0 +1,5 @@
1
+ export declare function list(body?: {}, options?: ServicesApi.RequestOptions): Promise<VideoPublishVideoTopic.List[]>;
2
+ export declare function create(body: VideoPublishVideoTopic.CreateQuery, options?: ServicesApi.RequestOptions): Promise<VideoPublishVideoTopic.ListItem[]>;
3
+ export declare function del(body: {
4
+ id: number;
5
+ }, options?: ServicesApi.RequestOptions): Promise<boolean>;
@@ -0,0 +1,80 @@
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
+ var url;
12
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
13
+ while (1) switch (_context.prev = _context.next) {
14
+ case 0:
15
+ url = PublishDomainApi("user/videoTopic/list", options === null || options === void 0 ? void 0 : options.env);
16
+ return _context.abrupt("return", request(url, _objectSpread({
17
+ method: 'POST',
18
+ headers: {
19
+ 'Content-Type': 'application/json'
20
+ },
21
+ data: _objectSpread({}, body)
22
+ }, options || {})));
23
+ case 2:
24
+ case "end":
25
+ return _context.stop();
26
+ }
27
+ }, _callee);
28
+ }));
29
+ return _list.apply(this, arguments);
30
+ }
31
+ export function create(_x3, _x4) {
32
+ return _create.apply(this, arguments);
33
+ }
34
+ function _create() {
35
+ _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(body, options) {
36
+ var url;
37
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
38
+ while (1) switch (_context2.prev = _context2.next) {
39
+ case 0:
40
+ url = PublishDomainApi("user/videoTopic/create", options === null || options === void 0 ? void 0 : options.env);
41
+ return _context2.abrupt("return", request(url, _objectSpread({
42
+ method: 'POST',
43
+ headers: {
44
+ 'Content-Type': 'application/json'
45
+ },
46
+ data: _objectSpread({}, body)
47
+ }, options || {})));
48
+ case 2:
49
+ case "end":
50
+ return _context2.stop();
51
+ }
52
+ }, _callee2);
53
+ }));
54
+ return _create.apply(this, arguments);
55
+ }
56
+ export function del(_x5, _x6) {
57
+ return _del.apply(this, arguments);
58
+ }
59
+ function _del() {
60
+ _del = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(body, options) {
61
+ var url;
62
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
63
+ while (1) switch (_context3.prev = _context3.next) {
64
+ case 0:
65
+ url = PublishDomainApi("user/videoTopic/del", options === null || options === void 0 ? void 0 : options.env);
66
+ return _context3.abrupt("return", request(url, _objectSpread({
67
+ method: 'POST',
68
+ headers: {
69
+ 'Content-Type': 'application/json'
70
+ },
71
+ data: _objectSpread({}, body)
72
+ }, options || {})));
73
+ case 2:
74
+ case "end":
75
+ return _context3.stop();
76
+ }
77
+ }, _callee3);
78
+ }));
79
+ return _del.apply(this, arguments);
80
+ }
@@ -0,0 +1,5 @@
1
+ export declare function list(body?: {}, options?: ServicesApi.RequestOptions): Promise<VideoPublishVideoTopicGroup.List[]>;
2
+ export declare function create(body: VideoPublishVideoTopicGroup.CreateQuery, options?: ServicesApi.RequestOptions): Promise<number>;
3
+ export declare function del(body: {
4
+ id: number;
5
+ }, options?: ServicesApi.RequestOptions): Promise<boolean>;
@@ -0,0 +1,80 @@
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
+ var url;
12
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
13
+ while (1) switch (_context.prev = _context.next) {
14
+ case 0:
15
+ url = PublishDomainApi("user/videoTopicGroup/list", options === null || options === void 0 ? void 0 : options.env);
16
+ return _context.abrupt("return", request(url, _objectSpread({
17
+ method: 'POST',
18
+ headers: {
19
+ 'Content-Type': 'application/json'
20
+ },
21
+ data: _objectSpread({}, body)
22
+ }, options || {})));
23
+ case 2:
24
+ case "end":
25
+ return _context.stop();
26
+ }
27
+ }, _callee);
28
+ }));
29
+ return _list.apply(this, arguments);
30
+ }
31
+ export function create(_x3, _x4) {
32
+ return _create.apply(this, arguments);
33
+ }
34
+ function _create() {
35
+ _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(body, options) {
36
+ var url;
37
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
38
+ while (1) switch (_context2.prev = _context2.next) {
39
+ case 0:
40
+ url = PublishDomainApi("user/videoTopicGroup/create", options === null || options === void 0 ? void 0 : options.env);
41
+ return _context2.abrupt("return", request(url, _objectSpread({
42
+ method: 'POST',
43
+ headers: {
44
+ 'Content-Type': 'application/json'
45
+ },
46
+ data: _objectSpread({}, body)
47
+ }, options || {})));
48
+ case 2:
49
+ case "end":
50
+ return _context2.stop();
51
+ }
52
+ }, _callee2);
53
+ }));
54
+ return _create.apply(this, arguments);
55
+ }
56
+ export function del(_x5, _x6) {
57
+ return _del.apply(this, arguments);
58
+ }
59
+ function _del() {
60
+ _del = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(body, options) {
61
+ var url;
62
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
63
+ while (1) switch (_context3.prev = _context3.next) {
64
+ case 0:
65
+ url = PublishDomainApi("user/videoTopicGroup/del", options === null || options === void 0 ? void 0 : options.env);
66
+ return _context3.abrupt("return", request(url, _objectSpread({
67
+ method: 'POST',
68
+ headers: {
69
+ 'Content-Type': 'application/json'
70
+ },
71
+ data: _objectSpread({}, body)
72
+ }, options || {})));
73
+ case 2:
74
+ case "end":
75
+ return _context3.stop();
76
+ }
77
+ }, _callee3);
78
+ }));
79
+ return _del.apply(this, arguments);
80
+ }
@@ -0,0 +1,23 @@
1
+ declare namespace VideoPublishVideoTopic {
2
+ interface CreateQuery {
3
+ list: CreateQueryList[];
4
+ }
5
+ interface CreateQueryList {
6
+ id: number;
7
+ title: string;
8
+ groupId: number;
9
+ enabled: boolean;
10
+ }
11
+ interface List {
12
+ groupId: number;
13
+ groupName: string;
14
+ enabled: boolean;
15
+ list: ListItem[];
16
+ }
17
+ interface ListItem {
18
+ id: number;
19
+ title: string;
20
+ enabled: boolean;
21
+ created: number;
22
+ }
23
+ }
File without changes
@@ -0,0 +1,13 @@
1
+ declare namespace VideoPublishVideoTopicGroup {
2
+ interface CreateQuery {
3
+ id: number;
4
+ name: string;
5
+ enabled: boolean;
6
+ }
7
+ interface List {
8
+ id: number;
9
+ name: string;
10
+ disabled: boolean;
11
+ topicCount: number;
12
+ }
13
+ }
File without changes
package/dist/window.d.ts CHANGED
@@ -19,7 +19,7 @@ declare interface Window{
19
19
  getChromiumPath: () => string;
20
20
  getClientUniqueKey: () => string;
21
21
 
22
- openBrowser: ( platform: string, pageType: string, accountId: string ) => void;
22
+ openVideoAccountBrowser: ( platform: string, subPlatform: string, accountId: string, url: string ) => void;
23
23
  };
24
24
 
25
25
  getClientIdentity: () => Promise<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "1.1.16",
3
+ "version": "1.1.18",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",