component-shipinlv 1.1.18 → 1.1.20
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/VideoPublish/account-manage/home.js +24 -17
- package/dist/VideoPublish/proxy/create.js +8 -1
- package/dist/VideoPublish/proxy/list.js +11 -0
- package/dist/VideoPublish/proxy/select.d.ts +10 -0
- package/dist/VideoPublish/proxy/select.js +101 -0
- package/dist/VideoPublish/proxy/select.less +17 -0
- package/dist/VideoPublish/video-account/index.js +36 -3
- package/dist/VideoPublish/video-topic/index.less +1 -0
- package/dist/VideoPublish/video-topic/select.js +4 -0
- package/dist/component/video-platform/logo.js +14 -11
- package/dist/component/video-platform/logo.less +3 -0
- package/dist/service/api/VideoPublishVideoAccountController.d.ts +1 -0
- package/dist/service/api/VideoPublishVideoAccountController.js +23 -0
- package/dist/types/VideoPublish.d.ts +1 -0
- package/dist/types/VideoPublishVideoAccountProxy.d.ts +4 -0
- package/package.json +1 -1
@@ -83,24 +83,30 @@ var VideoPublishAccountManageHomePage = function VideoPublishAccountManageHomePa
|
|
83
83
|
label: '个性签名',
|
84
84
|
children: accountDetail.signature
|
85
85
|
}];
|
86
|
-
var _useState3 = useState([
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
openMenuItems = _useState4[0];
|
92
|
-
var onOpen = function onOpen(key) {
|
86
|
+
var _useState3 = useState([]),
|
87
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
88
|
+
openMenuItems = _useState4[0],
|
89
|
+
setOpenMenuItems = _useState4[1];
|
90
|
+
var onOpen = function onOpen(url) {
|
93
91
|
var _window$getBridge;
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
(
|
92
|
+
(_window$getBridge = window.getBridge()) === null || _window$getBridge === void 0 || _window$getBridge.openVideoAccountBrowser(accountDetail.platform, '', accountDetail.accountId, url);
|
93
|
+
Tool.toast('正在打开浏览器, 请稍等...', 8);
|
94
|
+
};
|
95
|
+
var onOpenMenuItems = function onOpenMenuItems(platform) {
|
96
|
+
switch (platform) {
|
97
|
+
case 'douyin':
|
98
|
+
setOpenMenuItems([{
|
99
|
+
label: '创作者中心(发视频)',
|
100
|
+
key: 'https://creator.douyin.com/creator-micro/home'
|
101
|
+
}]);
|
102
|
+
break;
|
103
|
+
case 'tiktok':
|
104
|
+
setOpenMenuItems([{
|
105
|
+
label: 'Tiktok',
|
106
|
+
key: 'https://www.tiktok.com/'
|
107
|
+
}]);
|
101
108
|
break;
|
102
109
|
}
|
103
|
-
Tool.toast('正在打开浏览器, 请稍等...', 8);
|
104
110
|
};
|
105
111
|
return /*#__PURE__*/_jsxs("div", {
|
106
112
|
className: "videoPublishAccountManageHome",
|
@@ -112,8 +118,9 @@ var VideoPublishAccountManageHomePage = function VideoPublishAccountManageHomePa
|
|
112
118
|
// setAccountListData( list )
|
113
119
|
},
|
114
120
|
onMenu: onMenu,
|
115
|
-
onCurrent: function onCurrent(
|
116
|
-
|
121
|
+
onCurrent: function onCurrent(detail) {
|
122
|
+
setAccountDetail(detail);
|
123
|
+
onOpenMenuItems(detail.platform);
|
117
124
|
}
|
118
125
|
}), /*#__PURE__*/_jsx("div", {
|
119
126
|
className: "contents",
|
@@ -1,7 +1,7 @@
|
|
1
1
|
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
|
-
import { Button, Form, Input, InputNumber } from 'antd';
|
4
|
+
import { Button, Form, Input, InputNumber, Switch } from 'antd';
|
5
5
|
import { useRequest } from "@umijs/hooks";
|
6
6
|
import PageContentWarp from "../../UI/PageContentWarp";
|
7
7
|
import DialogDrawerFooter from "../../UI/DialogDrawerFooter";
|
@@ -140,6 +140,13 @@ var VideoPublishVideoAccountProxyCreate = function VideoPublishVideoAccountProxy
|
|
140
140
|
children: /*#__PURE__*/_jsx(Input, {
|
141
141
|
placeholder: "\u8F93\u5165IP\u5730\u5740 \u5F52\u5C5E\u5730\uFF0C\u53EA\u662F\u65B9\u4FBF\u7BA1\u7406"
|
142
142
|
})
|
143
|
+
}), /*#__PURE__*/_jsx(Form.Item, {
|
144
|
+
name: "enabled",
|
145
|
+
label: "\u662F\u5426\u542F\u7528",
|
146
|
+
children: /*#__PURE__*/_jsx(Switch, {
|
147
|
+
unCheckedChildren: "\u5DF2\u7981\u7528",
|
148
|
+
checkedChildren: "\u5DF2\u542F\u7528"
|
149
|
+
})
|
143
150
|
}), /*#__PURE__*/_jsx(DialogDrawerFooter, {
|
144
151
|
children: /*#__PURE__*/_jsx(Button, {
|
145
152
|
type: "primary",
|
@@ -11,6 +11,7 @@ import { Button, Popconfirm, Popover, Space, Table, Tag } from "antd";
|
|
11
11
|
import LayoutContent from "../../UI/LayoutContent";
|
12
12
|
import VideoPublishVideoAccountProxyQuery from "./query";
|
13
13
|
import VideoPublishVideoAccountProxyCreate from "./create";
|
14
|
+
import { PlusCircleOutlined } from "@ant-design/icons";
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
15
16
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
16
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
@@ -215,6 +216,16 @@ var VideoPublishVideoAccountProxy = function VideoPublishVideoAccountProxy(_ref)
|
|
215
216
|
};
|
216
217
|
return /*#__PURE__*/_jsx(LayoutContent, {
|
217
218
|
title: "\u7F51\u7EDC\u4EE3\u7406",
|
219
|
+
subtitle: /*#__PURE__*/_jsx(Button, {
|
220
|
+
size: "small",
|
221
|
+
type: "link",
|
222
|
+
ghost: true,
|
223
|
+
icon: /*#__PURE__*/_jsx(PlusCircleOutlined, {}),
|
224
|
+
onClick: function onClick() {
|
225
|
+
return onCreate(0);
|
226
|
+
},
|
227
|
+
children: "\u6DFB\u52A0\u4EE3\u7406"
|
228
|
+
}),
|
218
229
|
extInfo: /*#__PURE__*/_jsx(VideoPublishVideoAccountProxyQuery, {
|
219
230
|
loading: loading,
|
220
231
|
defaultQuery: query,
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import './select.less';
|
3
|
+
interface Props {
|
4
|
+
env?: Global.Env;
|
5
|
+
nickname: string;
|
6
|
+
videoAccountProxyId: number;
|
7
|
+
onSuccess: (id: number) => void;
|
8
|
+
}
|
9
|
+
declare const VideoPublishVideoAccountProxySelect: React.FC<Props>;
|
10
|
+
export default VideoPublishVideoAccountProxySelect;
|
@@ -0,0 +1,101 @@
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
2
|
+
import React, { useState } from 'react';
|
3
|
+
import { Button, Form, Select, Tag } from 'antd';
|
4
|
+
import { useRequest } from "@umijs/hooks";
|
5
|
+
import PageContentWarp from "../../UI/PageContentWarp";
|
6
|
+
import { AlignLeftOutlined } from "@ant-design/icons";
|
7
|
+
import DialogDrawerFooter from "../../UI/DialogDrawerFooter";
|
8
|
+
import "./select.less";
|
9
|
+
import * as VideoPublishVideoAccountProxyController from "../../service/api/VideoPublishVideoAccountProxyController";
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
11
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
12
|
+
var VideoPublishVideoAccountProxySelect = function VideoPublishVideoAccountProxySelect(_ref) {
|
13
|
+
var env = _ref.env,
|
14
|
+
nickname = _ref.nickname,
|
15
|
+
videoAccountProxyId = _ref.videoAccountProxyId,
|
16
|
+
onSuccess = _ref.onSuccess;
|
17
|
+
var _Form$useForm = Form.useForm(),
|
18
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
19
|
+
form = _Form$useForm2[0];
|
20
|
+
var _useState = useState([]),
|
21
|
+
_useState2 = _slicedToArray(_useState, 2),
|
22
|
+
listData = _useState2[0],
|
23
|
+
setListData = _useState2[1];
|
24
|
+
var _useRequest = useRequest(function () {
|
25
|
+
return VideoPublishVideoAccountProxyController.list({
|
26
|
+
current: 1,
|
27
|
+
pageSize: 100
|
28
|
+
}, {
|
29
|
+
env: env
|
30
|
+
});
|
31
|
+
}, {
|
32
|
+
onSuccess: function onSuccess(result) {
|
33
|
+
setListData(result.list);
|
34
|
+
form.setFieldsValue({
|
35
|
+
id: videoAccountProxyId
|
36
|
+
});
|
37
|
+
}
|
38
|
+
}),
|
39
|
+
loading = _useRequest.loading,
|
40
|
+
run = _useRequest.run;
|
41
|
+
var onFinish = function onFinish(values) {
|
42
|
+
onSuccess(values.id);
|
43
|
+
};
|
44
|
+
return /*#__PURE__*/_jsx(PageContentWarp, {
|
45
|
+
loading: loading,
|
46
|
+
className: "videoAccountGroupSelect",
|
47
|
+
children: /*#__PURE__*/_jsxs(Form, {
|
48
|
+
labelCol: {
|
49
|
+
span: 4
|
50
|
+
},
|
51
|
+
form: form,
|
52
|
+
disabled: loading,
|
53
|
+
onFinish: onFinish,
|
54
|
+
children: [/*#__PURE__*/_jsx(Form.Item, {
|
55
|
+
label: "\u8D26\u6237\u540D\u79F0",
|
56
|
+
children: /*#__PURE__*/_jsx("strong", {
|
57
|
+
children: nickname
|
58
|
+
})
|
59
|
+
}), /*#__PURE__*/_jsx(Form.Item, {
|
60
|
+
name: "id",
|
61
|
+
label: "\u4EE3\u7406\u5217\u8868",
|
62
|
+
children: /*#__PURE__*/_jsxs(Select, {
|
63
|
+
className: "videoAccountGroupSelectIp",
|
64
|
+
popupClassName: "videoAccountGroupSelectIp",
|
65
|
+
children: [/*#__PURE__*/_jsxs(Select.Option, {
|
66
|
+
value: 0,
|
67
|
+
children: [/*#__PURE__*/_jsx(AlignLeftOutlined, {}), " \u8BF7\u9009\u62E9\u7F51\u7EDC\u4EE3\u7406"]
|
68
|
+
}), listData.map(function (items) {
|
69
|
+
return /*#__PURE__*/_jsx(Select.Option, {
|
70
|
+
value: items.id,
|
71
|
+
disabled: !items.enabled,
|
72
|
+
children: /*#__PURE__*/_jsxs("div", {
|
73
|
+
className: "selectOption",
|
74
|
+
children: [/*#__PURE__*/_jsx("div", {
|
75
|
+
className: "ip",
|
76
|
+
children: items.ip
|
77
|
+
}), /*#__PURE__*/_jsx("div", {
|
78
|
+
className: "title",
|
79
|
+
children: items.title
|
80
|
+
}), /*#__PURE__*/_jsx("div", {
|
81
|
+
className: "area",
|
82
|
+
children: /*#__PURE__*/_jsx(Tag, {
|
83
|
+
children: items.area
|
84
|
+
})
|
85
|
+
})]
|
86
|
+
})
|
87
|
+
}, items.id);
|
88
|
+
})]
|
89
|
+
})
|
90
|
+
}), /*#__PURE__*/_jsx(DialogDrawerFooter, {
|
91
|
+
children: /*#__PURE__*/_jsx(Button, {
|
92
|
+
type: "primary",
|
93
|
+
htmlType: "submit",
|
94
|
+
loading: loading,
|
95
|
+
children: "\u4FDD\u5B58"
|
96
|
+
})
|
97
|
+
})]
|
98
|
+
})
|
99
|
+
});
|
100
|
+
};
|
101
|
+
export default VideoPublishVideoAccountProxySelect;
|
@@ -5,6 +5,7 @@ import "./index.less";
|
|
5
5
|
import PageContentWarp from "../../UI/PageContentWarp";
|
6
6
|
import { useRequest } from "@umijs/hooks";
|
7
7
|
import * as VideoPublishController from "../../service/api/VideoPublishController";
|
8
|
+
import * as VideoPublishVideoAccountController from "../../service/api/VideoPublishVideoAccountController";
|
8
9
|
import { Avatar, Button, Divider, Space, Table, Tag } from "antd";
|
9
10
|
import VideoPublishVideoAccountListQuery from "./query";
|
10
11
|
import VideoPlatform from "../../component/video-platform/logo";
|
@@ -13,6 +14,7 @@ import { PlusCircleOutlined } from "@ant-design/icons";
|
|
13
14
|
import Tool from "../../lib/Tool";
|
14
15
|
import VideoAccountGroup from "./group";
|
15
16
|
import VideoAccountCreate from "./create";
|
17
|
+
import VideoPublishVideoAccountProxySelect from "../proxy/select";
|
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";
|
@@ -176,9 +178,8 @@ var VideoPublishVideoAccount = function VideoPublishVideoAccount(_ref) {
|
|
176
178
|
}), /*#__PURE__*/_jsx(Button, {
|
177
179
|
type: "link",
|
178
180
|
size: "small",
|
179
|
-
disabled: true,
|
180
181
|
onClick: function onClick() {
|
181
|
-
return onProxyEdit(id);
|
182
|
+
return onProxyEdit((record === null || record === void 0 ? void 0 : record.nickname) || '', id, record === null || record === void 0 ? void 0 : record.videoAccountProxyId);
|
182
183
|
},
|
183
184
|
children: "\u4EE3\u7406"
|
184
185
|
})]
|
@@ -203,11 +204,42 @@ var VideoPublishVideoAccount = function VideoPublishVideoAccount(_ref) {
|
|
203
204
|
runVideoAccount = _useRequest.run,
|
204
205
|
loadingVideoAccount = _useRequest.loading,
|
205
206
|
errorVideoAccount = _useRequest.error;
|
207
|
+
var _useRequest2 = useRequest(function (data) {
|
208
|
+
return VideoPublishVideoAccountController.createProxy(data, {
|
209
|
+
env: env
|
210
|
+
});
|
211
|
+
}, {
|
212
|
+
manual: true,
|
213
|
+
onSuccess: function onSuccess(result) {
|
214
|
+
Tool.toast('代理保存成功');
|
215
|
+
runVideoAccount();
|
216
|
+
}
|
217
|
+
}),
|
218
|
+
loadingProxyCreate = _useRequest2.loading,
|
219
|
+
runProxyCreate = _useRequest2.run;
|
206
220
|
var _onQuery = function onQuery(query) {
|
207
221
|
setQuery(_objectSpread({}, query));
|
208
222
|
runVideoAccount(query);
|
209
223
|
};
|
210
|
-
var onProxyEdit = function onProxyEdit(
|
224
|
+
var onProxyEdit = function onProxyEdit(nickname, videoAccountId) {
|
225
|
+
var videoAccountProxyId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
226
|
+
var dialog = Tool.drawer({
|
227
|
+
title: '编辑代理',
|
228
|
+
content: /*#__PURE__*/_jsx(VideoPublishVideoAccountProxySelect, {
|
229
|
+
env: env,
|
230
|
+
nickname: nickname,
|
231
|
+
videoAccountProxyId: videoAccountProxyId,
|
232
|
+
onSuccess: function onSuccess(newVideoAccountProxyId) {
|
233
|
+
runProxyCreate({
|
234
|
+
videoAccountId: videoAccountId,
|
235
|
+
videoAccountProxyId: newVideoAccountProxyId
|
236
|
+
});
|
237
|
+
dialog.destroy();
|
238
|
+
}
|
239
|
+
}),
|
240
|
+
width: 680
|
241
|
+
});
|
242
|
+
};
|
211
243
|
var onCreateGroup = function onCreateGroup() {
|
212
244
|
var groupId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
213
245
|
var dialog = Tool.drawer({
|
@@ -249,6 +281,7 @@ var VideoPublishVideoAccount = function VideoPublishVideoAccount(_ref) {
|
|
249
281
|
size: "small",
|
250
282
|
type: "primary",
|
251
283
|
ghost: true,
|
284
|
+
loading: loadingProxyCreate,
|
252
285
|
onClick: function onClick() {
|
253
286
|
return onCreateGroup(0);
|
254
287
|
},
|
@@ -44,6 +44,9 @@ var VideoPublishTaskVideoTopicSelect = function VideoPublishTaskVideoTopicSelect
|
|
44
44
|
onSelect(values.topicGroupId, values.topicCount);
|
45
45
|
};
|
46
46
|
var onCreateTopic = function onCreateTopic() {
|
47
|
+
if (disabled) {
|
48
|
+
return;
|
49
|
+
}
|
47
50
|
var dialog = Tool.drawer({
|
48
51
|
title: '',
|
49
52
|
content: /*#__PURE__*/_jsx(VideoPublishTaskVideoTopic, {
|
@@ -65,6 +68,7 @@ var VideoPublishTaskVideoTopicSelect = function VideoPublishTaskVideoTopicSelect
|
|
65
68
|
onClick: function onClick() {
|
66
69
|
return onCreateTopic();
|
67
70
|
},
|
71
|
+
className: disabled ? 'disabled' : '',
|
68
72
|
children: "\u7F16\u8F91\u8BDD\u9898"
|
69
73
|
}),
|
70
74
|
className: "videoPublishTaskVideoTopicSelect",
|
@@ -11,22 +11,25 @@ export var VideoPlatformList = [{
|
|
11
11
|
// auth login
|
12
12
|
allowMainDomainList: ['douyin.com', 'iesdouyin.com']
|
13
13
|
}, {
|
14
|
-
platform: '
|
15
|
-
name: '
|
16
|
-
videoWebSiteUrl: 'https://
|
14
|
+
platform: 'tiktok',
|
15
|
+
name: 'Tiktok',
|
16
|
+
videoWebSiteUrl: 'https://www.tiktok.com/',
|
17
17
|
// auth login
|
18
|
-
allowMainDomainList: ['
|
19
|
-
},
|
18
|
+
allowMainDomainList: ['tiktok.com']
|
19
|
+
},
|
20
|
+
// {
|
21
|
+
// platform: 'buyin',
|
22
|
+
// name: '巨量百应',
|
23
|
+
// videoWebSiteUrl: 'https://buyin.jinritemai.com/dashboard/merch-picking-library', // auth login
|
24
|
+
// allowMainDomainList: [
|
25
|
+
// 'buyin.jinritemai.com',
|
26
|
+
// ],
|
27
|
+
// },
|
28
|
+
{
|
20
29
|
platform: 'kuaishou',
|
21
30
|
name: '快手',
|
22
31
|
videoWebSiteUrl: 'https://www.kuaishou.com/',
|
23
32
|
allowMainDomainList: ['kuaishou.com']
|
24
|
-
}, {
|
25
|
-
platform: 'tiktok',
|
26
|
-
name: 'Tiktok',
|
27
|
-
disabled: true,
|
28
|
-
videoWebSiteUrl: 'https://www.tiktok.com/',
|
29
|
-
allowMainDomainList: ['tiktok.com']
|
30
33
|
}
|
31
34
|
// {
|
32
35
|
// platform: 'bilibili',
|
@@ -13,3 +13,4 @@ export declare function del(body: {
|
|
13
13
|
}>;
|
14
14
|
export declare function detail(body: VideoPublishVideoAccount.DetailQuery, options?: Global.RequestOptions): Promise<VideoPublishVideoAccount.Detail>;
|
15
15
|
export declare function saveLoginStatus(body: VideoPublishVideoAccount.SaveLoginStatus, options?: Global.RequestOptions): Promise<boolean>;
|
16
|
+
export declare function createProxy(body: VideoPublishVideoAccountProxy.CreateProxyQuery, options?: Global.RequestOptions): Promise<boolean>;
|
@@ -188,4 +188,27 @@ function _saveLoginStatus() {
|
|
188
188
|
}, _callee8);
|
189
189
|
}));
|
190
190
|
return _saveLoginStatus.apply(this, arguments);
|
191
|
+
}
|
192
|
+
export function createProxy(_x17, _x18) {
|
193
|
+
return _createProxy.apply(this, arguments);
|
194
|
+
}
|
195
|
+
function _createProxy() {
|
196
|
+
_createProxy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(body, options) {
|
197
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
198
|
+
while (1) switch (_context9.prev = _context9.next) {
|
199
|
+
case 0:
|
200
|
+
return _context9.abrupt("return", request(PublishDomainApi("user/videoAccount/createProxy", options === null || options === void 0 ? void 0 : options.env), _objectSpread({
|
201
|
+
method: 'POST',
|
202
|
+
headers: {
|
203
|
+
'Content-Type': 'application/json'
|
204
|
+
},
|
205
|
+
data: _objectSpread({}, body)
|
206
|
+
}, options || {})));
|
207
|
+
case 1:
|
208
|
+
case "end":
|
209
|
+
return _context9.stop();
|
210
|
+
}
|
211
|
+
}, _callee9);
|
212
|
+
}));
|
213
|
+
return _createProxy.apply(this, arguments);
|
191
214
|
}
|