component-shipinlv 2.2.18 → 2.2.20

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.
@@ -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 = 75;
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", 72);
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 = 64;
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", 62);
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", 62);
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 = 53;
201
+ _context2.next = 56;
195
202
  break;
196
203
  }
197
204
  console.log('no videoFromFolder :', accountItem.id, accountItem.nickname);
198
- return _context2.abrupt("continue", 62);
199
- case 53:
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 = 57;
210
+ _context2.next = 60;
204
211
  break;
205
212
  }
206
213
  console.log('count 2:', count, setting.dayPublishMaxAmount);
207
- return _context2.abrupt("continue", 62);
208
- case 57:
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 = 60;
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 60:
217
- _context2.next = 62;
223
+ case 63:
224
+ _context2.next = 65;
218
225
  return sleep(3e3);
219
- case 62:
226
+ case 65:
220
227
  _context2.next = 41;
221
228
  break;
222
- case 64:
223
- _context2.next = 69;
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
- _iterator2.f();
232
- return _context2.finish(69);
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 75:
244
+ case 78:
238
245
  this.onLoop();
239
- case 76:
246
+ case 79:
240
247
  case "end":
241
248
  return _context2.stop();
242
249
  }
243
- }, _callee2, this, [[39, 66, 69, 72]]);
250
+ }, _callee2, this, [[39, 69, 72, 75]]);
244
251
  }));
245
252
  function loop() {
246
253
  return _loop.apply(this, arguments);
@@ -40,6 +40,7 @@ var VideoPublishAccountManageHomePage = function VideoPublishAccountManageHomePa
40
40
  created: 0,
41
41
  updated: 0,
42
42
  chromeProfileName: '',
43
+ enabledActiveAccountMode: true,
43
44
  proxyInfo: {}
44
45
  }),
45
46
  _useState2 = _slicedToArray(_useState, 2),
@@ -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
- onCurrent({
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) {
@@ -162,7 +162,7 @@ declare const Tool: {
162
162
  getTitleByPath(path: string): string;
163
163
  getDirByPath(path: string): string;
164
164
  h5Pay(query: Pay.H5PayQuery): void;
165
- notification(type: "success" | "info" | "warning" | "error", message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
165
+ notification(type: "info" | "error" | "success" | "warning", message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
166
166
  notificationSuccess(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
167
167
  notificationError(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
168
168
  notificationWarning(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
@@ -1,2 +1,2 @@
1
- declare const getImageUrl: (url: string) => string;
1
+ declare const getImageUrl: (url: string, disabledCache?: boolean) => string;
2
2
  export default getImageUrl;
@@ -1,8 +1,9 @@
1
1
  import { getMainPort } from "../getApiUrl";
2
2
  var getImageUrl = function getImageUrl(url) {
3
+ var disabledCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
3
4
  // windows
4
5
  // let url = urlQuery.replace(/\\/g, '\\\\');
5
6
 
6
- return /^(\/)|^([a-z]:)/i.test(url) ? "http://127.0.0.1:".concat(getMainPort(), "/image/preview?filePath=").concat(encodeURIComponent(url)) : url;
7
+ return /^(\/)|^([a-z]:)/i.test(url) ? "http://127.0.0.1:".concat(getMainPort(), "/image/preview?filePath=").concat(encodeURIComponent(url), "&disabledCache=").concat(disabledCache ? 0 : Date.now()) : url;
7
8
  };
8
9
  export default getImageUrl;
@@ -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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "2.2.18",
3
+ "version": "2.2.20",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",