component-shipinlv 1.1.0 → 1.1.1

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.
@@ -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$bridge, _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$bridge = (_window = window).bridge) === null || _window$bridge === void 0 || (_window$bridge = _window$bridge.call(_window)) === null || _window$bridge === void 0 ? void 0 : _window$bridge.ipcRenderer.invoke('shipinlv-video-account-add', platform, settingConfig.isChromeOpen).catch(function (err) {
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:
@@ -23,7 +23,7 @@ var PublishTaskPlanClass = /*#__PURE__*/function () {
23
23
  key: "onInit",
24
24
  value: function onInit() {
25
25
  var _this = this,
26
- _window$bridge,
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$bridge = (_window = window).bridge) === null || _window$bridge === void 0 || (_window$bridge = _window$bridge.call(_window)) === null || _window$bridge === void 0 || _window$bridge.onLog(function (query) {
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$bridge2, _window2;
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$bridge2 = (_window2 = window).bridge) === null || _window$bridge2 === void 0 ? void 0 : _window$bridge2.call(_window2).videoPublish({
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$bridge, _window;
3
- return !!((_window$bridge = (_window = window).bridge) !== null && _window$bridge !== void 0 && _window$bridge.call(_window).getChromiumPath());
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;
@@ -161,7 +161,7 @@ declare const Tool: {
161
161
  OsPathSeparator(): string;
162
162
  getTitleByPath(path: string): string;
163
163
  h5Pay(query: Pay.H5PayQuery): void;
164
- notification(type: "error" | "success" | "info" | "warning", message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
164
+ notification(type: "success" | "info" | "warning" | "error", message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
165
165
  notificationSuccess(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
166
166
  notificationError(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
167
167
  notificationWarning(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
@@ -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$bridge, _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$bridge = (_window = window).bridge) === null || _window$bridge === void 0 ? void 0 : _window$bridge.call(_window).getChromiumPath();
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,
@@ -6,7 +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$bridge, _window, _window$bridge$call$g, _window$bridge$call;
9
+ var _window$getBridge, _window, _window$getBridge$cal, _window$getBridge$cal2;
10
10
  var api = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
11
11
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12
12
  // 要请求的 url
@@ -20,7 +20,7 @@ var requestApi = function requestApi() {
20
20
  var postUrl = url + (url.indexOf('?') === -1 ? '?' : '&') + '_token_=' + token;
21
21
 
22
22
  // clientId
23
- postUrl += "&clientUniqueKey=".concat(((_window$bridge = (_window = window).bridge) === null || _window$bridge === void 0 || (_window$bridge$call$g = (_window$bridge$call = _window$bridge.call(_window)).getClientUniqueKey) === null || _window$bridge$call$g === void 0 ? void 0 : _window$bridge$call$g.call(_window$bridge$call)) || '');
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
24
 
25
25
  // 追加环境参数
26
26
  var env = getApiEnv(options === null || options === void 0 ? void 0 : options.env);
package/dist/window.d.ts CHANGED
@@ -10,7 +10,7 @@ declare interface Window{
10
10
  name: string;
11
11
  fn: ( data?: any ) => void
12
12
  }[];
13
- bridge: () => {
13
+ getBridge: () => {
14
14
  ipcRenderer: {
15
15
  invoke: ( name: string, ...arg) => Promise<any>;
16
16
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",