component-shipinlv 1.0.51 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/VideoPublish/account-manage/list.js +3 -3
- package/dist/VideoPublish/create-task/index.js +8 -4
- package/dist/VideoPublish/index.d.ts +1 -1
- package/dist/VideoPublish/index.js +3 -3
- package/dist/VideoPublish/log/index.d.ts +1 -1
- package/dist/VideoPublish/log/index.js +2 -2
- package/dist/VideoPublish/publish-task-plan/index.d.ts +1 -1
- package/dist/VideoPublish/publish-task-plan/index.js +2 -2
- package/dist/VideoPublish/publish-task-plan/tool.d.ts +2 -2
- package/dist/VideoPublish/publish-task-plan/tool.js +7 -7
- package/dist/component/is-installed-chrome.js +2 -2
- package/dist/lib/accountManageSettingConfig.js +2 -2
- package/dist/lib/request.js +6 -2
- package/dist/types/PublishTaskPlan.d.ts +1 -0
- package/dist/typings/VideoPublishVideoAccount.d.ts +1 -1
- package/dist/window.d.ts +2 -1
- package/package.json +1 -1
@@ -151,7 +151,7 @@ var HomePageAccountList = function HomePageAccountList(_ref) {
|
|
151
151
|
};
|
152
152
|
var onAdd = /*#__PURE__*/function () {
|
153
153
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(platform) {
|
154
|
-
var _window$
|
154
|
+
var _window$getBridge, _window;
|
155
155
|
var settingConfig, addAccountResult, postData;
|
156
156
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
157
157
|
while (1) switch (_context.prev = _context.next) {
|
@@ -173,7 +173,7 @@ var HomePageAccountList = function HomePageAccountList(_ref) {
|
|
173
173
|
// window.bridge.ipcRenderer.sendMessage( eventName ); // 添加抖音账号
|
174
174
|
settingConfig = AccountManageSettingConfig();
|
175
175
|
_context.next = 9;
|
176
|
-
return (_window$
|
176
|
+
return (_window$getBridge = (_window = window).getBridge) === null || _window$getBridge === void 0 || (_window$getBridge = _window$getBridge.call(_window)) === null || _window$getBridge === void 0 ? void 0 : _window$getBridge.ipcRenderer.invoke('shipinlv-video-account-add', platform, settingConfig.isChromeOpen).catch(function (err) {
|
177
177
|
Notification.notificationError('获取账号信息错误' + ((err === null || err === void 0 ? void 0 : err.message) || JSON.stringify(err)));
|
178
178
|
});
|
179
179
|
case 9:
|
@@ -392,7 +392,7 @@ var HomePageAccountList = function HomePageAccountList(_ref) {
|
|
392
392
|
}), listData.length == 0 && /*#__PURE__*/_jsxs("div", {
|
393
393
|
className: "empty",
|
394
394
|
children: [/*#__PURE__*/_jsx(Empty, {
|
395
|
-
description: "\u6682\u65E0\u7ED1\u5B9A\u8D26\u53F7",
|
395
|
+
description: "\u672C\u673A\u6682\u65E0\u7ED1\u5B9A\u8D26\u53F7",
|
396
396
|
image: Empty.PRESENTED_IMAGE_SIMPLE
|
397
397
|
}), addButton()]
|
398
398
|
})]
|
@@ -133,7 +133,6 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
|
|
133
133
|
};
|
134
134
|
}();
|
135
135
|
var onFinish = function onFinish(values) {
|
136
|
-
var _values$startTime;
|
137
136
|
var videoList = [];
|
138
137
|
if (formData.videoFrom === 'local') {
|
139
138
|
localSelectList.forEach(function (item) {
|
@@ -167,14 +166,17 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
|
|
167
166
|
});
|
168
167
|
}
|
169
168
|
var data = _objectSpread(_objectSpread(_objectSpread({}, formData), values), {}, {
|
170
|
-
startTime: values.startTime ? parseInt((((_values$startTime = values.startTime) === null || _values$startTime === void 0 ? void 0 : _values$startTime.valueOf()) * 0.001).toFixed(0)) : 0,
|
171
169
|
videoList: videoList
|
172
170
|
});
|
171
|
+
if (data.startTime) {
|
172
|
+
var _values$startTime;
|
173
|
+
data.startTime = values.startTime ? parseInt((((_values$startTime = values.startTime) === null || _values$startTime === void 0 ? void 0 : _values$startTime.valueOf()) * 0.001).toFixed(0)) : 0;
|
174
|
+
}
|
173
175
|
if (videoList.length === 0) {
|
174
176
|
Tool.toastError('视频为空,请选择视频');
|
175
177
|
return;
|
176
178
|
}
|
177
|
-
console.log('values:', data);
|
179
|
+
console.log('create task onFinish values:', data);
|
178
180
|
runTask(data);
|
179
181
|
};
|
180
182
|
var formLabelSpan = 2;
|
@@ -226,7 +228,9 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
|
|
226
228
|
children: [/*#__PURE__*/_jsx(VideoPublishSelectList, {
|
227
229
|
from: "local",
|
228
230
|
list: localSelectList,
|
229
|
-
onList: function onList() {
|
231
|
+
onList: function onList(list) {
|
232
|
+
return setTaskSelectList(list);
|
233
|
+
}
|
230
234
|
}), /*#__PURE__*/_jsx("div", {
|
231
235
|
className: "selectFile",
|
232
236
|
children: /*#__PURE__*/_jsx(ConfigProvider, {
|
@@ -21,7 +21,7 @@ var VideoPublish = function VideoPublish(_ref) {
|
|
21
21
|
productType = _ref.productType,
|
22
22
|
apiUrl = _ref.apiUrl,
|
23
23
|
env = _ref.env,
|
24
|
-
|
24
|
+
clientUniqueKey = _ref.clientUniqueKey;
|
25
25
|
var _useState = useState([]),
|
26
26
|
_useState2 = _slicedToArray(_useState, 2),
|
27
27
|
menuList = _useState2[0],
|
@@ -88,7 +88,7 @@ var VideoPublish = function VideoPublish(_ref) {
|
|
88
88
|
forceRender: canPublish,
|
89
89
|
children: /*#__PURE__*/_jsx(VideoPublishLog, {
|
90
90
|
env: env,
|
91
|
-
|
91
|
+
clientUniqueKey: clientUniqueKey
|
92
92
|
})
|
93
93
|
}];
|
94
94
|
var _onMenu = function _onMenu(key) {
|
@@ -157,7 +157,7 @@ var VideoPublish = function VideoPublish(_ref) {
|
|
157
157
|
})]
|
158
158
|
}), /*#__PURE__*/_jsx(VideoPublishPublishVideoPlan, {
|
159
159
|
env: env,
|
160
|
-
|
160
|
+
clientUniqueKey: clientUniqueKey
|
161
161
|
})]
|
162
162
|
});
|
163
163
|
};
|
@@ -14,7 +14,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
15
15
|
var MaxLine = 10000;
|
16
16
|
var VideoPublishLog = function VideoPublishLog(_ref) {
|
17
|
-
var
|
17
|
+
var clientUniqueKey = _ref.clientUniqueKey,
|
18
18
|
env = _ref.env;
|
19
19
|
var _useState = useState(0),
|
20
20
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -52,7 +52,7 @@ var VideoPublishLog = function VideoPublishLog(_ref) {
|
|
52
52
|
case 'not-login':
|
53
53
|
// 上报
|
54
54
|
VideoPublishVideoAccountController.saveLoginStatus({
|
55
|
-
|
55
|
+
clientUniqueKey: clientUniqueKey,
|
56
56
|
platformVideoAccountId: data.platformAccountId,
|
57
57
|
platform: data.platform,
|
58
58
|
isLogin: false,
|
@@ -4,9 +4,9 @@ import PublishTaskPlanClass from "./tool";
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
5
5
|
var VideoPublishPublishVideoPlan = function VideoPublishPublishVideoPlan(_ref) {
|
6
6
|
var env = _ref.env,
|
7
|
-
|
7
|
+
clientUniqueKey = _ref.clientUniqueKey;
|
8
8
|
useEffect(function () {
|
9
|
-
var publishTaskPlan = new PublishTaskPlanClass(env,
|
9
|
+
var publishTaskPlan = new PublishTaskPlanClass(env, clientUniqueKey);
|
10
10
|
publishTaskPlan.onInit();
|
11
11
|
}, []);
|
12
12
|
return /*#__PURE__*/_jsx("div", {
|
@@ -2,8 +2,8 @@ declare class PublishTaskPlanClass {
|
|
2
2
|
timeLoopMillisecond: number;
|
3
3
|
isPublishing: boolean;
|
4
4
|
env: Global.Env | undefined;
|
5
|
-
|
6
|
-
constructor(env?: Global.Env,
|
5
|
+
clientUniqueKey: string;
|
6
|
+
constructor(env?: Global.Env, clientUniqueKey?: string);
|
7
7
|
onInit(): void;
|
8
8
|
getWork(): Promise<void>;
|
9
9
|
doWork(taskDetail: PublishTaskPlan.TaskDetail): Promise<void>;
|
@@ -10,20 +10,20 @@ import event from "../../lib/event";
|
|
10
10
|
import AccountManageSettingConfig from "../../lib/accountManageSettingConfig";
|
11
11
|
var PublishTaskPlanClass = /*#__PURE__*/function () {
|
12
12
|
function PublishTaskPlanClass(env) {
|
13
|
-
var
|
13
|
+
var clientUniqueKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
14
14
|
_classCallCheck(this, PublishTaskPlanClass);
|
15
15
|
_defineProperty(this, "timeLoopMillisecond", 15 * 1e3);
|
16
16
|
_defineProperty(this, "isPublishing", false);
|
17
17
|
_defineProperty(this, "env", '');
|
18
|
-
_defineProperty(this, "
|
18
|
+
_defineProperty(this, "clientUniqueKey", '');
|
19
19
|
this.env = env;
|
20
|
-
this.
|
20
|
+
this.clientUniqueKey = clientUniqueKey;
|
21
21
|
}
|
22
22
|
_createClass(PublishTaskPlanClass, [{
|
23
23
|
key: "onInit",
|
24
24
|
value: function onInit() {
|
25
25
|
var _this = this,
|
26
|
-
_window$
|
26
|
+
_window$getBridge,
|
27
27
|
_window;
|
28
28
|
setInterval(function () {
|
29
29
|
if (_this.isPublishing) {
|
@@ -33,7 +33,7 @@ var PublishTaskPlanClass = /*#__PURE__*/function () {
|
|
33
33
|
}, 2e3);
|
34
34
|
|
35
35
|
// 桥
|
36
|
-
(_window$
|
36
|
+
(_window$getBridge = (_window = window).getBridge) === null || _window$getBridge === void 0 || (_window$getBridge = _window$getBridge.call(_window)) === null || _window$getBridge === void 0 || _window$getBridge.onLog(function (query) {
|
37
37
|
event.run('shipinlv-video-publish-log', query);
|
38
38
|
});
|
39
39
|
}
|
@@ -251,7 +251,7 @@ var PublishTaskPlanClass = /*#__PURE__*/function () {
|
|
251
251
|
case 2:
|
252
252
|
return _context7.abrupt("return", new Promise( /*#__PURE__*/function () {
|
253
253
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(resolve, reject) {
|
254
|
-
var _window$
|
254
|
+
var _window$getBridge2, _window2;
|
255
255
|
var settingConfig, publishResult, errLog, err;
|
256
256
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
257
257
|
while (1) switch (_context6.prev = _context6.next) {
|
@@ -259,7 +259,7 @@ var PublishTaskPlanClass = /*#__PURE__*/function () {
|
|
259
259
|
settingConfig = AccountManageSettingConfig();
|
260
260
|
console.log('settingConfig 1:', settingConfig);
|
261
261
|
_context6.next = 4;
|
262
|
-
return (_window$
|
262
|
+
return (_window$getBridge2 = (_window2 = window).getBridge) === null || _window$getBridge2 === void 0 ? void 0 : _window$getBridge2.call(_window2).videoPublish({
|
263
263
|
platformVideoAccountId: platformVideoAccountId,
|
264
264
|
platform: platform,
|
265
265
|
open: settingConfig.isChromeOpen,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
var isInstalledChrome = function isInstalledChrome() {
|
2
|
-
var _window$
|
3
|
-
return !!((_window$
|
2
|
+
var _window$getBridge, _window;
|
3
|
+
return !!((_window$getBridge = (_window = window).getBridge) !== null && _window$getBridge !== void 0 && _window$getBridge.call(_window).getChromiumPath());
|
4
4
|
};
|
5
5
|
export default isInstalledChrome;
|
@@ -2,13 +2,13 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import store from "./store";
|
3
3
|
var AccountManageSettingConfigKey = 'account-manage-setting';
|
4
4
|
var AccountManageSettingConfig = function AccountManageSettingConfig(data) {
|
5
|
-
var _window$
|
5
|
+
var _window$getBridge, _window;
|
6
6
|
if (data) {
|
7
7
|
store.set(AccountManageSettingConfigKey, _objectSpread({}, data));
|
8
8
|
return data;
|
9
9
|
}
|
10
10
|
console.log('AccountManageSettingConfig get');
|
11
|
-
var chromePath = (_window$
|
11
|
+
var chromePath = (_window$getBridge = (_window = window).getBridge) === null || _window$getBridge === void 0 ? void 0 : _window$getBridge.call(_window).getChromiumPath();
|
12
12
|
var outData = _objectSpread({
|
13
13
|
isChromeOpen: false,
|
14
14
|
disabledApplyTask: false,
|
package/dist/lib/request.js
CHANGED
@@ -6,6 +6,7 @@ import getApiUrl, { getApiEnv, getMainPort } from "./getApiUrl";
|
|
6
6
|
import goAuth from "./goAuth";
|
7
7
|
import Tool from "./Tool";
|
8
8
|
var requestApi = function requestApi() {
|
9
|
+
var _window$getBridge, _window, _window$getBridge$cal, _window$getBridge$cal2;
|
9
10
|
var api = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
10
11
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
11
12
|
// 要请求的 url
|
@@ -18,6 +19,9 @@ var requestApi = function requestApi() {
|
|
18
19
|
var token = userInfo.sid;
|
19
20
|
var postUrl = url + (url.indexOf('?') === -1 ? '?' : '&') + '_token_=' + token;
|
20
21
|
|
22
|
+
// clientId
|
23
|
+
postUrl += "&clientUniqueKey=".concat(((_window$getBridge = (_window = window).getBridge) === null || _window$getBridge === void 0 || (_window$getBridge$cal = (_window$getBridge$cal2 = _window$getBridge.call(_window)).getClientUniqueKey) === null || _window$getBridge$cal === void 0 ? void 0 : _window$getBridge$cal.call(_window$getBridge$cal2)) || '');
|
24
|
+
|
21
25
|
// 追加环境参数
|
22
26
|
var env = getApiEnv(options === null || options === void 0 ? void 0 : options.env);
|
23
27
|
if (env !== 'prod') {
|
@@ -83,7 +87,7 @@ var requestApi = function requestApi() {
|
|
83
87
|
});
|
84
88
|
};
|
85
89
|
var onError = function onError(pageUrl) {
|
86
|
-
var
|
90
|
+
var _window2;
|
87
91
|
var apiUrl = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
88
92
|
var title = arguments.length > 2 ? arguments[2] : undefined;
|
89
93
|
var content = arguments.length > 3 ? arguments[3] : undefined;
|
@@ -91,7 +95,7 @@ var onError = function onError(pageUrl) {
|
|
91
95
|
if (silent) {
|
92
96
|
return;
|
93
97
|
}
|
94
|
-
(
|
98
|
+
(_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.__recordError) === null || _window2 === void 0 || _window2.create([{
|
95
99
|
title: title,
|
96
100
|
siteUserId: Tool.getLocalUserInfo().id,
|
97
101
|
errorLevel: 1,
|
package/dist/window.d.ts
CHANGED
@@ -10,13 +10,14 @@ declare interface Window{
|
|
10
10
|
name: string;
|
11
11
|
fn: ( data?: any ) => void
|
12
12
|
}[];
|
13
|
-
|
13
|
+
getBridge: () => {
|
14
14
|
ipcRenderer: {
|
15
15
|
invoke: ( name: string, ...arg) => Promise<any>;
|
16
16
|
},
|
17
17
|
videoPublish: ( query: any ) => Promise<any>;
|
18
18
|
onLog: ( log: ( query: any ) => void ) => void;
|
19
19
|
getChromiumPath: () => string;
|
20
|
+
getClientUniqueKey: () => string;
|
20
21
|
};
|
21
22
|
}
|
22
23
|
|