component-shipinlv 2.3.6 → 2.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Auth/index.js +45 -26
- package/dist/AuthClient/qr/index.css.js +1 -1
- package/dist/PhonePublish/account-manage/home.d.ts +11 -0
- package/dist/PhonePublish/account-manage/home.js +243 -0
- package/dist/PhonePublish/account-manage/home.less +28 -0
- package/dist/PhonePublish/account-manage/index.d.ts +3 -0
- package/dist/PhonePublish/account-manage/index.js +56 -0
- package/dist/PhonePublish/account-manage/index.less +59 -0
- package/dist/PhonePublish/account-manage/list.d.ts +17 -0
- package/dist/PhonePublish/account-manage/list.js +443 -0
- package/dist/PhonePublish/account-manage/list.less +95 -0
- package/dist/PhonePublish/account-manage/setting/index.d.ts +6 -0
- package/dist/PhonePublish/account-manage/setting/index.js +199 -0
- package/dist/PhonePublish/account-manage/setting/index.less +11 -0
- package/dist/PhonePublish/create-task/base/index.d.ts +10 -0
- package/dist/PhonePublish/create-task/base/index.js +386 -0
- package/dist/PhonePublish/create-task/base/index.less +64 -0
- package/dist/PhonePublish/create-task/getVideoGoodsUrl.d.ts +2 -0
- package/dist/PhonePublish/create-task/getVideoGoodsUrl.js +136 -0
- package/dist/PhonePublish/create-task/hour-enabled.d.ts +9 -0
- package/dist/PhonePublish/create-task/hour-enabled.js +42 -0
- package/dist/PhonePublish/create-task/hour-enabled.less +24 -0
- package/dist/PhonePublish/create-task/index.d.ts +11 -0
- package/dist/PhonePublish/create-task/index.js +449 -0
- package/dist/PhonePublish/create-task/index.less +75 -0
- package/dist/PhonePublish/create-task/select-list.css.d.ts +5 -0
- package/dist/PhonePublish/create-task/select-list.css.js +6 -0
- package/dist/PhonePublish/create-task/select-list.d.ts +8 -0
- package/dist/PhonePublish/create-task/select-list.js +304 -0
- package/dist/PhonePublish/create-task/task-list.css.d.ts +5 -0
- package/dist/PhonePublish/create-task/task-list.css.js +6 -0
- package/dist/PhonePublish/create-task/task-list.d.ts +9 -0
- package/dist/PhonePublish/create-task/task-list.js +323 -0
- package/dist/PhonePublish/index.css.d.ts +2 -0
- package/dist/PhonePublish/index.css.js +35 -0
- package/dist/PhonePublish/index.d.ts +15 -0
- package/dist/PhonePublish/index.js +191 -0
- package/dist/PhonePublish/index.less +55 -0
- package/dist/PhonePublish/lib/chrome-quit.d.ts +2 -0
- package/dist/PhonePublish/lib/chrome-quit.js +20 -0
- package/dist/PhonePublish/log/index.d.ts +8 -0
- package/dist/PhonePublish/log/index.js +186 -0
- package/dist/PhonePublish/log/index.less +81 -0
- package/dist/PhonePublish/publish-task-plan/index.d.ts +9 -0
- package/dist/PhonePublish/publish-task-plan/index.js +32 -0
- package/dist/PhonePublish/publish-task-plan/index.less +4 -0
- package/dist/PhonePublish/publish-task-plan/tool-bak.txt +219 -0
- package/dist/PhonePublish/publish-task-plan/tool.d.ts +29 -0
- package/dist/PhonePublish/publish-task-plan/tool.js +720 -0
- package/dist/PhonePublish/task-list/index.d.ts +8 -0
- package/dist/PhonePublish/task-list/index.js +224 -0
- package/dist/PhonePublish/task-list/index.less +8 -0
- package/dist/PhonePublish/task-list/plan/list.d.ts +12 -0
- package/dist/PhonePublish/task-list/plan/list.js +290 -0
- package/dist/PhonePublish/task-list/plan/list.less +87 -0
- package/dist/PhonePublish/task-list/plan/operate.d.ts +8 -0
- package/dist/PhonePublish/task-list/plan/operate.js +145 -0
- package/dist/PhonePublish/task-list/plan/query.d.ts +8 -0
- package/dist/PhonePublish/task-list/plan/query.js +89 -0
- package/dist/PhonePublish/task-list/plan/query.less +9 -0
- package/dist/PhonePublish/task-list/plan/status.d.ts +13 -0
- package/dist/PhonePublish/task-list/plan/status.js +53 -0
- package/dist/PhonePublish/task-list/query.d.ts +8 -0
- package/dist/PhonePublish/task-list/query.js +76 -0
- package/dist/PhonePublish/task-list/query.less +19 -0
- package/dist/PhonePublish/task-list/who-can-view.d.ts +12 -0
- package/dist/PhonePublish/task-list/who-can-view.js +37 -0
- package/dist/PhonePublish/video-account/ban/index.d.ts +10 -0
- package/dist/PhonePublish/video-account/ban/index.js +94 -0
- package/dist/PhonePublish/video-account/ban/index.less +4 -0
- package/dist/PhonePublish/video-account/base-info.d.ts +13 -0
- package/dist/PhonePublish/video-account/base-info.js +75 -0
- package/dist/PhonePublish/video-account/base-info.less +92 -0
- package/dist/PhonePublish/video-account/create.d.ts +8 -0
- package/dist/PhonePublish/video-account/create.js +174 -0
- package/dist/PhonePublish/video-account/group.d.ts +9 -0
- package/dist/PhonePublish/video-account/group.js +255 -0
- package/dist/PhonePublish/video-account/group.less +10 -0
- package/dist/PhonePublish/video-account/index.d.ts +8 -0
- package/dist/PhonePublish/video-account/index.js +403 -0
- package/dist/PhonePublish/video-account/index.less +92 -0
- package/dist/PhonePublish/video-account/query.d.ts +8 -0
- package/dist/PhonePublish/video-account/query.js +115 -0
- package/dist/PhonePublish/video-account/query.less +18 -0
- package/dist/PhonePublish/video-publish-statistic/account-trend/index.d.ts +8 -0
- package/dist/PhonePublish/video-publish-statistic/account-trend/index.js +173 -0
- package/dist/PhonePublish/video-publish-statistic/account-trend/index.less +3 -0
- package/dist/PhonePublish/video-publish-statistic/account-trend/kind-list.d.ts +7 -0
- package/dist/PhonePublish/video-publish-statistic/account-trend/kind-list.js +22 -0
- package/dist/PhonePublish/video-publish-statistic/account-trend/query.d.ts +9 -0
- package/dist/PhonePublish/video-publish-statistic/account-trend/query.js +54 -0
- package/dist/PhonePublish/video-publish-statistic/account-trend/query.less +3 -0
- package/dist/PhonePublish/video-publish-statistic/index.d.ts +2 -0
- package/dist/PhonePublish/video-publish-statistic/index.js +37 -0
- package/dist/PhonePublish/video-publish-statistic/kind.d.ts +16 -0
- package/dist/PhonePublish/video-publish-statistic/kind.js +57 -0
- package/dist/PhonePublish/video-publish-statistic/operation/list.d.ts +7 -0
- package/dist/PhonePublish/video-publish-statistic/operation/list.js +242 -0
- package/dist/PhonePublish/video-publish-statistic/operation/list.less +10 -0
- package/dist/PhonePublish/video-publish-statistic/operation/query.d.ts +8 -0
- package/dist/PhonePublish/video-publish-statistic/operation/query.js +56 -0
- package/dist/PhonePublish/video-publish-statistic/operation/query.less +3 -0
- package/dist/PhonePublish/video-publish-statistic/publish-plan/list.d.ts +8 -0
- package/dist/PhonePublish/video-publish-statistic/publish-plan/list.js +257 -0
- package/dist/PhonePublish/video-publish-statistic/publish-plan/list.less +105 -0
- package/dist/PhonePublish/video-publish-statistic/publish-plan/query.d.ts +9 -0
- package/dist/PhonePublish/video-publish-statistic/publish-plan/query.js +79 -0
- package/dist/PhonePublish/video-publish-statistic/publish-plan/query.less +3 -0
- package/dist/VideoPublish/account-manage/list.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/lib/Tool.d.ts +1 -1
- package/dist/phone/index.d.ts +8 -0
- package/dist/phone/index.js +62 -0
- package/dist/phone/index.less +170 -0
- package/dist/typings.d.ts +1 -1
- package/package.json +1 -1
@@ -0,0 +1,443 @@
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
3
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
4
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
5
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
6
|
+
import React, { useEffect, useState, useRef } from 'react';
|
7
|
+
import { Divider, Empty, Input, Space, Tooltip } from 'antd';
|
8
|
+
import "./list.less";
|
9
|
+
import { SearchOutlined } from '@ant-design/icons';
|
10
|
+
import { useRequest } from "@umijs/hooks";
|
11
|
+
import * as VideoPublishVideoAccountController from "../../service/api/VideoPublishVideoAccountController";
|
12
|
+
import PageContentWarp from "../../UI/PageContentWarp";
|
13
|
+
// import goAuth from "../../lib/goAuth";
|
14
|
+
import getLocalUserInfo from "../../lib/getLocalUserInfo";
|
15
|
+
import event from "../../lib/event";
|
16
|
+
import { VideoPlatformDict, VideoPlatformList } from "../../component/video-platform/logo";
|
17
|
+
import toast from "../../lib/toast";
|
18
|
+
import Money from "../../UI/Money";
|
19
|
+
import AccountManageSettingConfig from "../../lib/accountManageSettingConfig";
|
20
|
+
import VideoPlatform from "../../component/video-platform/logo";
|
21
|
+
import Tool from "../../lib/Tool";
|
22
|
+
import VideoPublishVideoAccountBaseInfo from "../../VideoPublish/video-account/base-info";
|
23
|
+
import VideoPublishVideoAccountProxySelect from "../../VideoPublish/proxy/select";
|
24
|
+
import notification from "../../lib/notification";
|
25
|
+
import openChrome from "../../lib/openChrome";
|
26
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
27
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
28
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
29
|
+
var NotVipCanAddAccountCount = 10;
|
30
|
+
var HomePageAccountList = function HomePageAccountList(_ref) {
|
31
|
+
var apiUrl = _ref.apiUrl,
|
32
|
+
env = _ref.env,
|
33
|
+
notVip = _ref.notVip,
|
34
|
+
_ref$onMenu = _ref.onMenu,
|
35
|
+
onMenu = _ref$onMenu === void 0 ? function () {} : _ref$onMenu,
|
36
|
+
_ref$onListData = _ref.onListData,
|
37
|
+
onListData = _ref$onListData === void 0 ? function () {} : _ref$onListData,
|
38
|
+
currentAccountDetail = _ref.currentAccountDetail,
|
39
|
+
disabledDel = _ref.disabledDel,
|
40
|
+
disabledAddProxy = _ref.disabledAddProxy,
|
41
|
+
addonButton = _ref.addonButton,
|
42
|
+
disabledAdd = _ref.disabledAdd,
|
43
|
+
_ref$onCurrent = _ref.onCurrent,
|
44
|
+
onCurrent = _ref$onCurrent === void 0 ? function () {} : _ref$onCurrent;
|
45
|
+
var _useState = useState(getLocalUserInfo()),
|
46
|
+
_useState2 = _slicedToArray(_useState, 2),
|
47
|
+
userInfo = _useState2[0],
|
48
|
+
setUserInfo = _useState2[1];
|
49
|
+
var _useState3 = useState(0),
|
50
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
51
|
+
currentId = _useState4[0],
|
52
|
+
setCurrentId = _useState4[1];
|
53
|
+
var _useState5 = useState(true),
|
54
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
55
|
+
isOpen = _useState6[0],
|
56
|
+
setIsOpen = _useState6[1];
|
57
|
+
var _useState7 = useState([]),
|
58
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
59
|
+
keywordList = _useState8[0],
|
60
|
+
setKeywordList = _useState8[1];
|
61
|
+
var _useState9 = useState(240),
|
62
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
63
|
+
width = _useState10[0],
|
64
|
+
setWidth = _useState10[1];
|
65
|
+
var listDataRef = useRef([]);
|
66
|
+
var _useState11 = useState([]),
|
67
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
68
|
+
platformMenuItems = _useState12[0],
|
69
|
+
setPlatformMenuItems = _useState12[1];
|
70
|
+
var _useState13 = useState(listDataRef.current),
|
71
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
72
|
+
listData = _useState14[0],
|
73
|
+
setListData = _useState14[1];
|
74
|
+
var _useState15 = useState({
|
75
|
+
id: 0,
|
76
|
+
ip: '',
|
77
|
+
port: 0,
|
78
|
+
username: '',
|
79
|
+
password: ''
|
80
|
+
}),
|
81
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
82
|
+
proxyInfo = _useState16[0],
|
83
|
+
setProxyInfo = _useState16[1];
|
84
|
+
var _useRequest = useRequest(function () {
|
85
|
+
return VideoPublishVideoAccountController.list({
|
86
|
+
current: 1,
|
87
|
+
pageSize: 100
|
88
|
+
}, {
|
89
|
+
env: env
|
90
|
+
});
|
91
|
+
}, {
|
92
|
+
manual: !userInfo.isLogin,
|
93
|
+
onSuccess: function onSuccess(result) {
|
94
|
+
listDataRef.current = result.list;
|
95
|
+
setListData(_toConsumableArray(result.list));
|
96
|
+
onListData(_toConsumableArray(result.list));
|
97
|
+
}
|
98
|
+
}),
|
99
|
+
loading = _useRequest.loading,
|
100
|
+
error = _useRequest.error,
|
101
|
+
run = _useRequest.run;
|
102
|
+
var _useRequest2 = useRequest(function (id) {
|
103
|
+
return VideoPublishVideoAccountController.del({
|
104
|
+
id: id
|
105
|
+
}, {
|
106
|
+
env: env
|
107
|
+
});
|
108
|
+
}, {
|
109
|
+
manual: true,
|
110
|
+
onSuccess: function onSuccess(result) {
|
111
|
+
var index = listDataRef.current.findIndex(function (item) {
|
112
|
+
return item.id == result.id;
|
113
|
+
});
|
114
|
+
if (index > -1) {
|
115
|
+
listDataRef.current.splice(index, 1);
|
116
|
+
}
|
117
|
+
setListData(_toConsumableArray(listDataRef.current));
|
118
|
+
onListData(_toConsumableArray(listDataRef.current));
|
119
|
+
}
|
120
|
+
}),
|
121
|
+
loadingDel = _useRequest2.loading,
|
122
|
+
runDel = _useRequest2.run;
|
123
|
+
var onCurrentId = function onCurrentId(id) {
|
124
|
+
if (id === currentId) {
|
125
|
+
setCurrentId(0);
|
126
|
+
var _detail = {
|
127
|
+
id: 0,
|
128
|
+
userId: 0,
|
129
|
+
platform: 'd',
|
130
|
+
groupId: 0,
|
131
|
+
groupName: '',
|
132
|
+
isBan: false,
|
133
|
+
uniqueId: '',
|
134
|
+
accountId: '',
|
135
|
+
avatar: '',
|
136
|
+
bindPhone: '',
|
137
|
+
nickname: '',
|
138
|
+
nicknameRemark: '',
|
139
|
+
signature: '',
|
140
|
+
isLoginValid: false,
|
141
|
+
followerCount: 0,
|
142
|
+
followingCount: 0,
|
143
|
+
favoritedCount: 0,
|
144
|
+
videoCount: 0,
|
145
|
+
created: 0,
|
146
|
+
updated: 0,
|
147
|
+
chromeProfileName: '',
|
148
|
+
videoFromFolder: '',
|
149
|
+
enabledActiveAccountMode: true,
|
150
|
+
proxyInfo: {}
|
151
|
+
};
|
152
|
+
onCurrent(_detail);
|
153
|
+
return;
|
154
|
+
}
|
155
|
+
var index = listDataRef.current.findIndex(function (item) {
|
156
|
+
return item.id === id;
|
157
|
+
});
|
158
|
+
setCurrentId(id);
|
159
|
+
onCurrent(listDataRef.current[index]);
|
160
|
+
};
|
161
|
+
var _useRequest3 = useRequest(function (data) {
|
162
|
+
return VideoPublishVideoAccountController.create(data, {
|
163
|
+
env: env
|
164
|
+
});
|
165
|
+
}, {
|
166
|
+
manual: true,
|
167
|
+
onSuccess: function onSuccess(result) {
|
168
|
+
toast('已经添加账户');
|
169
|
+
onSearch();
|
170
|
+
}
|
171
|
+
}),
|
172
|
+
loadingCreate = _useRequest3.loading,
|
173
|
+
runCreate = _useRequest3.run;
|
174
|
+
var onSearch = function onSearch(keyword) {
|
175
|
+
var _keyword$replace;
|
176
|
+
var list = (keyword === null || keyword === void 0 || (_keyword$replace = keyword.replace(/\s+/g, '')) === null || _keyword$replace === void 0 ? void 0 : _keyword$replace.split('')) || [];
|
177
|
+
setKeywordList(list);
|
178
|
+
run();
|
179
|
+
};
|
180
|
+
var onAdd = /*#__PURE__*/function () {
|
181
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(platform) {
|
182
|
+
var settingConfig, chromeProfileName, videoPlatformInfo;
|
183
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
184
|
+
while (1) switch (_context.prev = _context.next) {
|
185
|
+
case 0:
|
186
|
+
if (!notVip) {
|
187
|
+
_context.next = 4;
|
188
|
+
break;
|
189
|
+
}
|
190
|
+
if (!(listData.length >= NotVipCanAddAccountCount)) {
|
191
|
+
_context.next = 4;
|
192
|
+
break;
|
193
|
+
}
|
194
|
+
Tool.toast("\u4E0D\u662F\u4F1A\u5458\uFF0C\u53EA\u80FD\u6DFB\u52A0 ".concat(NotVipCanAddAccountCount, "\u4E2A\u8D26\u6237"));
|
195
|
+
return _context.abrupt("return");
|
196
|
+
case 4:
|
197
|
+
// if( ! isInstalledChrome() ){
|
198
|
+
// Tool.toast('没有安装谷歌浏览器(Chrome),请安装');
|
199
|
+
// onMenu('setting');
|
200
|
+
// return;
|
201
|
+
// }
|
202
|
+
|
203
|
+
console.log('onAdd:', platform);
|
204
|
+
settingConfig = AccountManageSettingConfig();
|
205
|
+
if (settingConfig.chromeUserDataDir) {
|
206
|
+
_context.next = 10;
|
207
|
+
break;
|
208
|
+
}
|
209
|
+
notification.notificationError('请先设置:“谷歌浏览器 - 多开位置”', '选个稍微大点的盘存储,每个用户会有几百M的数据');
|
210
|
+
onMenu('setting');
|
211
|
+
return _context.abrupt("return");
|
212
|
+
case 10:
|
213
|
+
if (!(listData.length >= 200)) {
|
214
|
+
_context.next = 13;
|
215
|
+
break;
|
216
|
+
}
|
217
|
+
notification.notificationError('这电脑绑定到上限了', '每台电脑最多绑定 200 个账号');
|
218
|
+
return _context.abrupt("return");
|
219
|
+
case 13:
|
220
|
+
toast('正在启动浏览器,请扫码登录', 12);
|
221
|
+
|
222
|
+
// const platformName = platform ; // == 'kuaishou' ? 'kwai' : '';
|
223
|
+
// const eventName = `amz-${ platform }-publish--add-account`;
|
224
|
+
// console.log('eventName:', eventName );
|
225
|
+
// window.bridge.ipcRenderer.sendMessage( eventName ); // 添加抖音账号
|
226
|
+
|
227
|
+
// 固定长度,必须 16位数
|
228
|
+
chromeProfileName = Date.now() + '-' + Tool.math.randWord(16);
|
229
|
+
videoPlatformInfo = VideoPlatformDict[platform];
|
230
|
+
if (videoPlatformInfo) {
|
231
|
+
_context.next = 19;
|
232
|
+
break;
|
233
|
+
}
|
234
|
+
toast('请配置信息:' + platform);
|
235
|
+
return _context.abrupt("return");
|
236
|
+
case 19:
|
237
|
+
openChrome({
|
238
|
+
action: 'add-account',
|
239
|
+
platform: platform,
|
240
|
+
platformAccountId: '',
|
241
|
+
nickname: '',
|
242
|
+
taskId: 0,
|
243
|
+
chromePath: settingConfig.chromePath,
|
244
|
+
chromeProfileName: chromeProfileName,
|
245
|
+
url: videoPlatformInfo.loginWebSiteUrl,
|
246
|
+
// 'https://www.douyin.com/user/self?from_tab_name=main',
|
247
|
+
proxyInfo: proxyInfo,
|
248
|
+
isOpen: true // settingConfig.isChromeOpen,
|
249
|
+
}, true, env);
|
250
|
+
case 20:
|
251
|
+
case "end":
|
252
|
+
return _context.stop();
|
253
|
+
}
|
254
|
+
}, _callee);
|
255
|
+
}));
|
256
|
+
return function onAdd(_x) {
|
257
|
+
return _ref2.apply(this, arguments);
|
258
|
+
};
|
259
|
+
}();
|
260
|
+
var onProxy = function onProxy() {
|
261
|
+
var dialog = Tool.drawer({
|
262
|
+
title: '编辑代理',
|
263
|
+
content: /*#__PURE__*/_jsx(VideoPublishVideoAccountProxySelect, {
|
264
|
+
env: env,
|
265
|
+
nickname: "[\u5F85\u6DFB\u52A0]",
|
266
|
+
videoAccountProxyId: proxyInfo.id || 0,
|
267
|
+
onSuccess: function onSuccess(newVideoAccountProxyId, info) {
|
268
|
+
setProxyInfo(_objectSpread({}, info));
|
269
|
+
dialog.destroy();
|
270
|
+
}
|
271
|
+
}),
|
272
|
+
width: 680
|
273
|
+
});
|
274
|
+
};
|
275
|
+
useEffect(function () {
|
276
|
+
var platformMenuItems = [];
|
277
|
+
VideoPlatformList.forEach(function (item) {
|
278
|
+
platformMenuItems.push({
|
279
|
+
label: item.name,
|
280
|
+
key: item.platform,
|
281
|
+
disabled: item.disabled,
|
282
|
+
icon: /*#__PURE__*/_jsx(VideoPlatform, {
|
283
|
+
platform: item.platform,
|
284
|
+
showName: false
|
285
|
+
})
|
286
|
+
});
|
287
|
+
});
|
288
|
+
setPlatformMenuItems(platformMenuItems);
|
289
|
+
event.on('video-publish-auth-change', function () {
|
290
|
+
run();
|
291
|
+
});
|
292
|
+
}, []);
|
293
|
+
var _onDel = function onDel(id) {
|
294
|
+
runDel(id);
|
295
|
+
};
|
296
|
+
useEffect(function () {
|
297
|
+
// 更新列表
|
298
|
+
event.on('account-list-update', function () {
|
299
|
+
run();
|
300
|
+
});
|
301
|
+
setInterval(function () {
|
302
|
+
run();
|
303
|
+
}, 5 * 60 * 1e3);
|
304
|
+
}, []);
|
305
|
+
useEffect(function () {
|
306
|
+
event.on('login', function () {
|
307
|
+
setUserInfo(getLocalUserInfo());
|
308
|
+
run();
|
309
|
+
});
|
310
|
+
event.on('logout', function () {
|
311
|
+
setUserInfo(getLocalUserInfo());
|
312
|
+
});
|
313
|
+
}, []);
|
314
|
+
var loginValidAmount = listData.filter(function (item) {
|
315
|
+
return item.isLoginValid;
|
316
|
+
}).length;
|
317
|
+
var notLoginValidAmount = listData.filter(function (item) {
|
318
|
+
return !item.isLoginValid;
|
319
|
+
}).length;
|
320
|
+
return /*#__PURE__*/_jsx("div", {
|
321
|
+
className: "videoPublishAccountList",
|
322
|
+
style: {
|
323
|
+
width: width
|
324
|
+
},
|
325
|
+
children: userInfo.isLogin ? /*#__PURE__*/_jsxs(_Fragment, {
|
326
|
+
children: [/*#__PURE__*/_jsx("div", {
|
327
|
+
className: "search",
|
328
|
+
children: isOpen ? /*#__PURE__*/_jsxs(Space, {
|
329
|
+
size: 3,
|
330
|
+
children: [/*#__PURE__*/_jsx(Input, {
|
331
|
+
size: "small",
|
332
|
+
placeholder: "\u641C\u7D22\u8D26\u53F7\u540D\u79F0",
|
333
|
+
allowClear: true,
|
334
|
+
onChange: function onChange(e) {
|
335
|
+
onSearch(e.target.value);
|
336
|
+
}
|
337
|
+
}), /*#__PURE__*/_jsx(Divider, {
|
338
|
+
type: "vertical"
|
339
|
+
}), /*#__PURE__*/_jsx("a", {
|
340
|
+
className: "onList",
|
341
|
+
onClick: function onClick() {
|
342
|
+
return run();
|
343
|
+
},
|
344
|
+
children: /*#__PURE__*/_jsx(SearchOutlined, {})
|
345
|
+
})]
|
346
|
+
}) : /*#__PURE__*/_jsx("a", {
|
347
|
+
className: "onList",
|
348
|
+
onClick: function onClick() {
|
349
|
+
return run();
|
350
|
+
},
|
351
|
+
children: /*#__PURE__*/_jsx(SearchOutlined, {})
|
352
|
+
})
|
353
|
+
}), /*#__PURE__*/_jsxs(PageContentWarp, {
|
354
|
+
loading: loading,
|
355
|
+
error: error,
|
356
|
+
onReload: run,
|
357
|
+
className: "list ".concat(isOpen ? '' : "listMini"),
|
358
|
+
children: [listData.length > 0 && /*#__PURE__*/_jsx("section", {
|
359
|
+
children: listData.map(function (item, index) {
|
360
|
+
var shopName = [];
|
361
|
+
if (keywordList.length === 0) {
|
362
|
+
shopName.push(item.nickname);
|
363
|
+
} else {
|
364
|
+
var isSearchMatch = false;
|
365
|
+
item.nickname.split('').map(function (letter) {
|
366
|
+
if (keywordList.includes(letter)) {
|
367
|
+
isSearchMatch = true;
|
368
|
+
shopName.push( /*#__PURE__*/_jsx("span", {
|
369
|
+
className: "high",
|
370
|
+
children: letter
|
371
|
+
}, letter));
|
372
|
+
} else {
|
373
|
+
shopName.push( /*#__PURE__*/_jsx("span", {
|
374
|
+
children: letter
|
375
|
+
}, letter));
|
376
|
+
}
|
377
|
+
});
|
378
|
+
// 未搜索到
|
379
|
+
if (!isSearchMatch) {
|
380
|
+
return null;
|
381
|
+
}
|
382
|
+
}
|
383
|
+
return /*#__PURE__*/_jsxs("div", {
|
384
|
+
className: "accountManageListItems",
|
385
|
+
children: [/*#__PURE__*/_jsx(VideoPublishVideoAccountBaseInfo, {
|
386
|
+
id: item.id,
|
387
|
+
className: currentId == item.id ? "active" : '',
|
388
|
+
index: index,
|
389
|
+
accountInfo: _objectSpread({}, item),
|
390
|
+
disabledDel: disabledDel,
|
391
|
+
onDel: function onDel(id) {
|
392
|
+
return _onDel(id);
|
393
|
+
},
|
394
|
+
onClick: function onClick() {
|
395
|
+
return onCurrentId(item.id);
|
396
|
+
}
|
397
|
+
}, item.id), addonButton]
|
398
|
+
}, item.id);
|
399
|
+
})
|
400
|
+
}), listData.length == 0 && /*#__PURE__*/_jsx("div", {
|
401
|
+
className: "empty",
|
402
|
+
children: /*#__PURE__*/_jsx(Empty, {
|
403
|
+
description: "\u672C\u673A\u6682\u65E0\u94FE\u63A5\u624B\u673A",
|
404
|
+
image: Empty.PRESENTED_IMAGE_SIMPLE
|
405
|
+
})
|
406
|
+
})]
|
407
|
+
}), !disabledAdd && /*#__PURE__*/_jsx("div", {
|
408
|
+
className: "submits",
|
409
|
+
children: /*#__PURE__*/_jsx("div", {
|
410
|
+
className: "amount",
|
411
|
+
children: /*#__PURE__*/_jsx(Tooltip, {
|
412
|
+
title: /*#__PURE__*/_jsxs(_Fragment, {
|
413
|
+
children: ["\u672A\u767B\u5F55\uFF1A", notLoginValidAmount, " \u4E2A ", /*#__PURE__*/_jsx(Divider, {
|
414
|
+
type: "vertical"
|
415
|
+
}), " \u5DF2\u767B\u5F55 ", loginValidAmount, " \u4E2A"]
|
416
|
+
}),
|
417
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
418
|
+
children: [/*#__PURE__*/_jsx("strong", {
|
419
|
+
className: "notLoginValid",
|
420
|
+
children: notLoginValidAmount
|
421
|
+
}), "/", /*#__PURE__*/_jsx("span", {
|
422
|
+
className: "loginValid",
|
423
|
+
children: /*#__PURE__*/_jsx(Money, {
|
424
|
+
pre: "",
|
425
|
+
value: loginValidAmount,
|
426
|
+
precision: 0,
|
427
|
+
end: "\u4E2A"
|
428
|
+
})
|
429
|
+
})]
|
430
|
+
})
|
431
|
+
})
|
432
|
+
})
|
433
|
+
})]
|
434
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
435
|
+
children: [/*#__PURE__*/_jsx("div", {
|
436
|
+
className: "list"
|
437
|
+
}), /*#__PURE__*/_jsx("div", {
|
438
|
+
className: "submits"
|
439
|
+
})]
|
440
|
+
})
|
441
|
+
});
|
442
|
+
};
|
443
|
+
export default HomePageAccountList;
|
@@ -0,0 +1,95 @@
|
|
1
|
+
.videoPublishAccountList{
|
2
|
+
width: 200px;
|
3
|
+
display: flex;
|
4
|
+
flex-direction: column;
|
5
|
+
height: calc( 100vh - 56px - 28px );
|
6
|
+
border-right: 1px solid #E8E8E8;
|
7
|
+
position: relative;
|
8
|
+
transition: width 0.3s ease-in-out;
|
9
|
+
|
10
|
+
.search{
|
11
|
+
margin: 10px 0;
|
12
|
+
.onList{
|
13
|
+
color: #999;
|
14
|
+
font-size: 15px;
|
15
|
+
text-align: center;
|
16
|
+
display: block;
|
17
|
+
margin: 0 auto;
|
18
|
+
&:hover{
|
19
|
+
color: #722ed1;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
.list{
|
25
|
+
flex: 2;
|
26
|
+
height: 100%; // calc(100vh - 10px);
|
27
|
+
overflow-y: auto;
|
28
|
+
padding: 10px 0;
|
29
|
+
.accountManageListItems{
|
30
|
+
position: relative;
|
31
|
+
//padding: 0 0 6px 0;
|
32
|
+
border-bottom: 1px solid #F0F0F0;
|
33
|
+
}
|
34
|
+
&::-webkit-scrollbar {
|
35
|
+
width: 2px; /* 滚动条的宽度 */
|
36
|
+
}
|
37
|
+
&::-webkit-scrollbar-thumb {
|
38
|
+
background-color: #DDD; /* 滑块的颜色 */
|
39
|
+
border-radius: 4px; /* 滑块的圆角 */
|
40
|
+
}
|
41
|
+
.high{
|
42
|
+
color: #C00;
|
43
|
+
font-weight: bold;
|
44
|
+
}
|
45
|
+
.empty{
|
46
|
+
margin: 40% auto 0;
|
47
|
+
}
|
48
|
+
section{
|
49
|
+
padding: 5px;
|
50
|
+
article{
|
51
|
+
position: relative;
|
52
|
+
display: flex;
|
53
|
+
flex-direction: row;
|
54
|
+
cursor: pointer;
|
55
|
+
padding: 6px 10px;
|
56
|
+
margin: 3px 0;
|
57
|
+
border-radius: 5px;
|
58
|
+
&:hover{
|
59
|
+
background-color: #dcf0f6;
|
60
|
+
.del{
|
61
|
+
display: inline-block;
|
62
|
+
}
|
63
|
+
}
|
64
|
+
&.active{
|
65
|
+
background-color: #b6e5f6;
|
66
|
+
color: #0063ed;
|
67
|
+
font-weight: bold;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
72
|
+
.submits{
|
73
|
+
//box-shadow: 0 0 5px #EEE;
|
74
|
+
text-align: center;
|
75
|
+
padding: 12px 0 ;
|
76
|
+
display: flex;
|
77
|
+
margin: 0 12px 0 0;
|
78
|
+
flex-direction: row;
|
79
|
+
.amount{
|
80
|
+
flex: 2;
|
81
|
+
text-align: left;
|
82
|
+
font-size: 12px;
|
83
|
+
line-height: 32px;
|
84
|
+
.notLoginValid{
|
85
|
+
color: #C00;
|
86
|
+
}
|
87
|
+
.loginValid{
|
88
|
+
color: #00bc00;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
.addButton{
|
93
|
+
text-align: center;
|
94
|
+
}
|
95
|
+
}
|