component-shipinlv 2.2.17 → 2.2.19
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/ActiveAccountMode/task/index.js +33 -26
- package/dist/VideoPublish/account-manage/home.js +1 -0
- package/dist/VideoPublish/account-manage/list.js +4 -2
- package/dist/VideoPublish/video-account/create.js +10 -2
- package/dist/VideoPublish/video-account/index.js +18 -10
- package/dist/VideoPublish/video-account/index.less +19 -5
- package/dist/lib/openChrome.js +6 -5
- package/dist/types/VideoPublish.d.ts +1 -0
- package/dist/types/VideoPublishVideoAccount.d.ts +2 -0
- package/package.json +1 -1
@@ -123,7 +123,7 @@ var ActiveAccountModeTask = /*#__PURE__*/function () {
|
|
123
123
|
dayIndex = 0;
|
124
124
|
case 22:
|
125
125
|
if (!(dayIndex < setting.publishMaxDay)) {
|
126
|
-
_context2.next =
|
126
|
+
_context2.next = 78;
|
127
127
|
break;
|
128
128
|
}
|
129
129
|
console.log('publishMaxDay:', dayIndex);
|
@@ -146,7 +146,7 @@ var ActiveAccountModeTask = /*#__PURE__*/function () {
|
|
146
146
|
_context2.next = 34;
|
147
147
|
return sleep(20e3);
|
148
148
|
case 34:
|
149
|
-
return _context2.abrupt("continue",
|
149
|
+
return _context2.abrupt("continue", 75);
|
150
150
|
case 35:
|
151
151
|
// 把发布过的,做一个字段
|
152
152
|
this.planDict = {};
|
@@ -171,7 +171,7 @@ var ActiveAccountModeTask = /*#__PURE__*/function () {
|
|
171
171
|
_iterator2.s();
|
172
172
|
case 41:
|
173
173
|
if ((_step2 = _iterator2.n()).done) {
|
174
|
-
_context2.next =
|
174
|
+
_context2.next = 67;
|
175
175
|
break;
|
176
176
|
}
|
177
177
|
accountItem = _step2.value;
|
@@ -180,67 +180,74 @@ var ActiveAccountModeTask = /*#__PURE__*/function () {
|
|
180
180
|
break;
|
181
181
|
}
|
182
182
|
console.log('账号已掉线:', accountItem);
|
183
|
-
return _context2.abrupt("continue",
|
183
|
+
return _context2.abrupt("continue", 65);
|
184
184
|
case 46:
|
185
185
|
if (!accountItem.isBan) {
|
186
186
|
_context2.next = 49;
|
187
187
|
break;
|
188
188
|
}
|
189
189
|
console.log('账号已封:', accountItem);
|
190
|
-
return _context2.abrupt("continue",
|
190
|
+
return _context2.abrupt("continue", 65);
|
191
191
|
case 49:
|
192
|
+
if (accountItem.enabledActiveAccountMode) {
|
193
|
+
_context2.next = 52;
|
194
|
+
break;
|
195
|
+
}
|
196
|
+
console.log('账号禁止养号模式:', accountItem);
|
197
|
+
return _context2.abrupt("continue", 65);
|
198
|
+
case 52:
|
192
199
|
count = ((_this$planDict$accoun = this.planDict[accountItem.id]) === null || _this$planDict$accoun === void 0 ? void 0 : _this$planDict$accoun.length) || 0; // 需要指定路径
|
193
200
|
if (accountItem.videoFromFolder) {
|
194
|
-
_context2.next =
|
201
|
+
_context2.next = 56;
|
195
202
|
break;
|
196
203
|
}
|
197
204
|
console.log('no videoFromFolder :', accountItem.id, accountItem.nickname);
|
198
|
-
return _context2.abrupt("continue",
|
199
|
-
case
|
205
|
+
return _context2.abrupt("continue", 65);
|
206
|
+
case 56:
|
200
207
|
// 删除 此账户下面,所有已经发布的视频
|
201
208
|
this.checkDelFile(accountItem.id, accountItem.videoFromFolder);
|
202
209
|
if (!(count >= setting.dayPublishMaxAmount)) {
|
203
|
-
_context2.next =
|
210
|
+
_context2.next = 60;
|
204
211
|
break;
|
205
212
|
}
|
206
213
|
console.log('count 2:', count, setting.dayPublishMaxAmount);
|
207
|
-
return _context2.abrupt("continue",
|
208
|
-
case
|
214
|
+
return _context2.abrupt("continue", 65);
|
215
|
+
case 60:
|
209
216
|
console.log('makePublishTask in:', accountItem.id, setting.dayPublishMaxAmount - count, dayIndex);
|
210
217
|
|
211
218
|
// 生成任务
|
212
|
-
_context2.next =
|
219
|
+
_context2.next = 63;
|
213
220
|
return this.makePublishTask(accountItem.id, setting.dayPublishMaxAmount - count, dayIndex).catch(function (err) {
|
214
221
|
console.log('makePublishTask err:', err);
|
215
222
|
});
|
216
|
-
case
|
217
|
-
_context2.next =
|
223
|
+
case 63:
|
224
|
+
_context2.next = 65;
|
218
225
|
return sleep(3e3);
|
219
|
-
case
|
226
|
+
case 65:
|
220
227
|
_context2.next = 41;
|
221
228
|
break;
|
222
|
-
case
|
223
|
-
_context2.next =
|
229
|
+
case 67:
|
230
|
+
_context2.next = 72;
|
224
231
|
break;
|
225
|
-
case 66:
|
226
|
-
_context2.prev = 66;
|
227
|
-
_context2.t0 = _context2["catch"](39);
|
228
|
-
_iterator2.e(_context2.t0);
|
229
232
|
case 69:
|
230
233
|
_context2.prev = 69;
|
231
|
-
|
232
|
-
|
234
|
+
_context2.t0 = _context2["catch"](39);
|
235
|
+
_iterator2.e(_context2.t0);
|
233
236
|
case 72:
|
237
|
+
_context2.prev = 72;
|
238
|
+
_iterator2.f();
|
239
|
+
return _context2.finish(72);
|
240
|
+
case 75:
|
234
241
|
dayIndex++;
|
235
242
|
_context2.next = 22;
|
236
243
|
break;
|
237
|
-
case
|
244
|
+
case 78:
|
238
245
|
this.onLoop();
|
239
|
-
case
|
246
|
+
case 79:
|
240
247
|
case "end":
|
241
248
|
return _context2.stop();
|
242
249
|
}
|
243
|
-
}, _callee2, this, [[39,
|
250
|
+
}, _callee2, this, [[39, 69, 72, 75]]);
|
244
251
|
}));
|
245
252
|
function loop() {
|
246
253
|
return _loop.apply(this, arguments);
|
@@ -122,7 +122,7 @@ var HomePageAccountList = function HomePageAccountList(_ref) {
|
|
122
122
|
var onCurrentId = function onCurrentId(id) {
|
123
123
|
if (id === currentId) {
|
124
124
|
setCurrentId(0);
|
125
|
-
|
125
|
+
var _detail = {
|
126
126
|
id: 0,
|
127
127
|
userId: 0,
|
128
128
|
platform: 'd',
|
@@ -145,8 +145,10 @@ var HomePageAccountList = function HomePageAccountList(_ref) {
|
|
145
145
|
updated: 0,
|
146
146
|
chromeProfileName: '',
|
147
147
|
videoFromFolder: '',
|
148
|
+
enabledActiveAccountMode: true,
|
148
149
|
proxyInfo: {}
|
149
|
-
}
|
150
|
+
};
|
151
|
+
onCurrent(_detail);
|
150
152
|
return;
|
151
153
|
}
|
152
154
|
var index = listDataRef.current.findIndex(function (item) {
|
@@ -3,7 +3,7 @@ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
3
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
5
5
|
import React, { useState } from 'react';
|
6
|
-
import { Button, Form, Input, Select, Tag } from 'antd';
|
6
|
+
import { Button, Form, Input, Select, Switch, Tag } from 'antd';
|
7
7
|
import { useRequest } from "@umijs/hooks";
|
8
8
|
import * as VideoAccountController from "../../service/api/VideoPublishVideoAccountController";
|
9
9
|
import PageContentWarp from "../../UI/PageContentWarp";
|
@@ -63,7 +63,8 @@ var VideoAccountCreate = function VideoAccountCreate(_ref) {
|
|
63
63
|
case 0:
|
64
64
|
form.setFieldsValue({
|
65
65
|
nicknameRemark: result.nicknameRemark,
|
66
|
-
groupId: result.groupId || 0
|
66
|
+
groupId: result.groupId || 0,
|
67
|
+
enabledActiveAccountMode: typeof result.enabledActiveAccountMode === 'boolean' ? result.enabledActiveAccountMode : true
|
67
68
|
});
|
68
69
|
case 1:
|
69
70
|
case "end":
|
@@ -152,6 +153,13 @@ var VideoAccountCreate = function VideoAccountCreate(_ref) {
|
|
152
153
|
children: /*#__PURE__*/_jsx(Input, {
|
153
154
|
placeholder: "\u8F93\u5165\u8D26\u53F7\u5907\u6CE8"
|
154
155
|
})
|
156
|
+
}), /*#__PURE__*/_jsx(Form.Item, {
|
157
|
+
name: "enabledActiveAccountMode",
|
158
|
+
label: "\u662F\u5426\u542F\u7528\u517B\u53F7",
|
159
|
+
children: /*#__PURE__*/_jsx(Switch, {
|
160
|
+
checkedChildren: "\u542F\u7528\u517B\u53F7\u53D1\u5E03",
|
161
|
+
unCheckedChildren: "\u7981\u7528\u517B\u53F7\u53D1\u5E03"
|
162
|
+
})
|
155
163
|
}), /*#__PURE__*/_jsx(DialogDrawerFooter, {
|
156
164
|
children: /*#__PURE__*/_jsx(Button, {
|
157
165
|
type: "primary",
|
@@ -11,7 +11,7 @@ import { Avatar, Button, Divider, Space, Table, Tag, Tooltip } from "antd";
|
|
11
11
|
import VideoPublishVideoAccountListQuery from "./query";
|
12
12
|
import VideoPlatform from "../../component/video-platform/logo";
|
13
13
|
import Money from "../../UI/Money";
|
14
|
-
import { PlusCircleOutlined } from "@ant-design/icons";
|
14
|
+
import { PlusCircleOutlined, StopOutlined } from "@ant-design/icons";
|
15
15
|
import Tool from "../../lib/Tool";
|
16
16
|
import VideoAccountGroup from "./group";
|
17
17
|
import VideoAccountCreate from "./create";
|
@@ -112,13 +112,19 @@ var VideoPublishVideoAccount = function VideoPublishVideoAccount(_ref) {
|
|
112
112
|
className: "userId",
|
113
113
|
children: record === null || record === void 0 ? void 0 : record.accountId
|
114
114
|
})]
|
115
|
-
}),
|
115
|
+
}), /*#__PURE__*/_jsx("div", {
|
116
116
|
className: "isBan",
|
117
117
|
children: /*#__PURE__*/_jsx("a", {
|
118
118
|
onClick: function onClick() {
|
119
119
|
return onBanEdit(record);
|
120
120
|
},
|
121
|
-
children: record !== null && record !== void 0 && record.notBanTime && record.notBanTime > Date.now() * 0.001 ? dayjs(record.notBanTime * 1e3).format('MM-DD') + ' 解封' :
|
121
|
+
children: record && record !== null && record !== void 0 && record.isBan ? record !== null && record !== void 0 && record.notBanTime && record.notBanTime > Date.now() * 0.001 ? dayjs(record.notBanTime * 1e3).format('MM-DD') + ' 解封' : /*#__PURE__*/_jsx("span", {
|
122
|
+
className: "ban",
|
123
|
+
children: "\u5DF2\u5C01"
|
124
|
+
}) : /*#__PURE__*/_jsx("span", {
|
125
|
+
className: "normal",
|
126
|
+
children: "-"
|
127
|
+
})
|
122
128
|
})
|
123
129
|
})]
|
124
130
|
});
|
@@ -185,18 +191,20 @@ var VideoPublishVideoAccount = function VideoPublishVideoAccount(_ref) {
|
|
185
191
|
var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;
|
186
192
|
return /*#__PURE__*/_jsx("div", {
|
187
193
|
className: "videoFromFolder",
|
188
|
-
children: /*#__PURE__*/_jsx(SavePath, {
|
194
|
+
children: record !== null && record !== void 0 && record.enabledActiveAccountMode ? /*#__PURE__*/_jsx(SavePath, {
|
189
195
|
size: "small",
|
190
196
|
path: videoFromFolder,
|
191
197
|
placeholder: "\u8BF7\u9009\u62E9\u672C\u5730\u89C6\u9891\u6587\u4EF6\u5939",
|
192
|
-
hiddenOpenDir: false
|
193
|
-
|
194
|
-
,
|
198
|
+
hiddenOpenDir: false,
|
199
|
+
disabled: !(record !== null && record !== void 0 && record.enabledActiveAccountMode),
|
195
200
|
onChange: function onChange(videoFromFolder) {
|
196
201
|
console.log('formData:', videoFromFolder);
|
197
202
|
// onVideoFromFolderCreate( id, e );
|
198
203
|
onVideoFromFolder(i, videoFromFolder);
|
199
204
|
}
|
205
|
+
}) : /*#__PURE__*/_jsxs("div", {
|
206
|
+
className: "disabledActiveAccountMode",
|
207
|
+
children: [/*#__PURE__*/_jsx(StopOutlined, {}), " \u5DF2\u7981\u7528\u517B\u53F7\u53D1\u5E03"]
|
200
208
|
})
|
201
209
|
});
|
202
210
|
}
|
@@ -283,9 +291,9 @@ var VideoPublishVideoAccount = function VideoPublishVideoAccount(_ref) {
|
|
283
291
|
title: '编辑账号被封',
|
284
292
|
content: /*#__PURE__*/_jsx(VideoAccountBan, {
|
285
293
|
env: env,
|
286
|
-
videoAccountId: record.id,
|
287
|
-
isBan: record.isBan,
|
288
|
-
notBanTime: record.notBanTime,
|
294
|
+
videoAccountId: (record === null || record === void 0 ? void 0 : record.id) || 0,
|
295
|
+
isBan: (record === null || record === void 0 ? void 0 : record.isBan) || false,
|
296
|
+
notBanTime: (record === null || record === void 0 ? void 0 : record.notBanTime) || 0,
|
289
297
|
onSuccess: function onSuccess() {
|
290
298
|
runVideoAccount();
|
291
299
|
dialog.destroy();
|
@@ -39,12 +39,23 @@
|
|
39
39
|
top: -13px;
|
40
40
|
right: -8px;
|
41
41
|
a{
|
42
|
-
display: inline-block;
|
43
|
-
font-size: 12px;
|
44
|
-
background-color: #C00;
|
45
|
-
color: #FFF;
|
46
|
-
padding: 2px 3px;
|
47
42
|
line-height: 1em;
|
43
|
+
font-size: 12px;
|
44
|
+
.ban{
|
45
|
+
display: inline-block;
|
46
|
+
background-color: #C00;
|
47
|
+
color: #FFF;
|
48
|
+
padding: 2px 3px;
|
49
|
+
line-height: 1em;
|
50
|
+
}
|
51
|
+
.normal{
|
52
|
+
display: inline-block;
|
53
|
+
min-width: 12px;
|
54
|
+
padding: 2px 3px;
|
55
|
+
line-height: 1em;
|
56
|
+
background-color: #F6F6F6;
|
57
|
+
color: #F6F6F6;
|
58
|
+
}
|
48
59
|
}
|
49
60
|
}
|
50
61
|
}
|
@@ -75,4 +86,7 @@
|
|
75
86
|
}
|
76
87
|
}
|
77
88
|
|
89
|
+
.disabledActiveAccountMode{
|
90
|
+
color: #AAA;
|
91
|
+
}
|
78
92
|
}
|
package/dist/lib/openChrome.js
CHANGED
@@ -219,22 +219,23 @@ var getOpenQuery = /*#__PURE__*/function () {
|
|
219
219
|
cmdList.push("--window-position=".concat(position.x, ",").concat(position.y));
|
220
220
|
cmdList.push("--window-size=".concat(window.screen.width, ",").concat(window.screen.height - 100));
|
221
221
|
cmdList.push("--user-data-dir=".concat(chromeProfileDir));
|
222
|
+
cmdList.push("--disable-session-crashed-bubble");
|
222
223
|
cmdList.push("--user-agent=".concat(userAgent()));
|
223
224
|
|
224
225
|
// 不要检查
|
225
226
|
cmdList.push('--no-first-run', '--no-default-browser-check', '--disable-default-apps');
|
226
|
-
_context4.next =
|
227
|
+
_context4.next = 26;
|
227
228
|
return getPublishExtensionDir(env).catch(function (err) {
|
228
229
|
notification.notificationError('获取插件地址失败', err.message);
|
229
230
|
});
|
230
|
-
case
|
231
|
+
case 26:
|
231
232
|
publishExtensionDir = _context4.sent;
|
232
233
|
if (publishExtensionDir) {
|
233
|
-
_context4.next =
|
234
|
+
_context4.next = 29;
|
234
235
|
break;
|
235
236
|
}
|
236
237
|
return _context4.abrupt("return", Promise.reject(new Error('获取插件地址失败')));
|
237
|
-
case
|
238
|
+
case 29:
|
238
239
|
cmdList.push("--load-extension=".concat(publishExtensionDir));
|
239
240
|
cmdList.push("".concat(openUrl));
|
240
241
|
console.log('profileName:', cmdList, chromeProfileDir);
|
@@ -242,7 +243,7 @@ var getOpenQuery = /*#__PURE__*/function () {
|
|
242
243
|
commandList: cmdList,
|
243
244
|
chromeProfileDir: chromeProfileDir
|
244
245
|
});
|
245
|
-
case
|
246
|
+
case 33:
|
246
247
|
case "end":
|
247
248
|
return _context4.stop();
|
248
249
|
}
|
@@ -80,6 +80,7 @@ declare namespace VideoPublishVideoAccount {
|
|
80
80
|
updated: number;
|
81
81
|
chromeProfileName: string;
|
82
82
|
videoFromFolder: string;
|
83
|
+
enabledActiveAccountMode: boolean;
|
83
84
|
proxyInfo: Global.ProxyInfo;
|
84
85
|
}
|
85
86
|
interface Detail {
|
@@ -101,6 +102,7 @@ declare namespace VideoPublishVideoAccount {
|
|
101
102
|
staffId: number;
|
102
103
|
created: number;
|
103
104
|
updated: number;
|
105
|
+
enabledActiveAccountMode: boolean;
|
104
106
|
}
|
105
107
|
interface ExpireQuery {
|
106
108
|
promoterId: number;
|