component-shipinlv 2.2.16 → 2.2.18

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.
@@ -4,6 +4,7 @@ interface Props {
4
4
  productType: string;
5
5
  from: Ad.From;
6
6
  dealerId: number;
7
+ position: string;
7
8
  env?: Global.Env;
8
9
  }
9
10
  declare const Ad: React.FC<Props>;
package/dist/Ad/index.js CHANGED
@@ -13,6 +13,7 @@ var Ad = function Ad(_ref) {
13
13
  var productType = _ref.productType,
14
14
  from = _ref.from,
15
15
  dealerId = _ref.dealerId,
16
+ position = _ref.position,
16
17
  env = _ref.env;
17
18
  var listDataRef = useRef([]);
18
19
  var currentIndexRef = useRef(0);
@@ -43,7 +44,8 @@ var Ad = function Ad(_ref) {
43
44
  return AdController.list({
44
45
  productType: productType,
45
46
  from: from,
46
- dealerId: dealerId
47
+ dealerId: dealerId,
48
+ position: position
47
49
  }, {
48
50
  env: env
49
51
  });
@@ -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
- }), record && (record === null || record === void 0 ? void 0 : record.isBan) && /*#__PURE__*/_jsx("div", {
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
- // disabled={ ! enabled }
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
  }
@@ -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 = 25;
227
+ _context4.next = 26;
227
228
  return getPublishExtensionDir(env).catch(function (err) {
228
229
  notification.notificationError('获取插件地址失败', err.message);
229
230
  });
230
- case 25:
231
+ case 26:
231
232
  publishExtensionDir = _context4.sent;
232
233
  if (publishExtensionDir) {
233
- _context4.next = 28;
234
+ _context4.next = 29;
234
235
  break;
235
236
  }
236
237
  return _context4.abrupt("return", Promise.reject(new Error('获取插件地址失败')));
237
- case 28:
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 32:
246
+ case 33:
246
247
  case "end":
247
248
  return _context4.stop();
248
249
  }
@@ -2,4 +2,5 @@ export declare function list(body: {
2
2
  productType: string;
3
3
  from: 'web' | 'client';
4
4
  dealerId: number;
5
+ position: string;
5
6
  }, options?: Global.RequestOptions): Promise<Ad.List[]>;
@@ -87,6 +87,7 @@ declare namespace VideoPublish {
87
87
  videoFromFolder: string;
88
88
  notBanTime: number;
89
89
  isBan: boolean;
90
+ enabledActiveAccountMode: boolean;
90
91
  created: number;
91
92
  updated: number;
92
93
  }
@@ -101,6 +101,7 @@ declare namespace VideoPublishVideoAccount {
101
101
  staffId: number;
102
102
  created: number;
103
103
  updated: number;
104
+ enabledActiveAccountMode: boolean;
104
105
  }
105
106
  interface ExpireQuery {
106
107
  promoterId: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "2.2.16",
3
+ "version": "2.2.18",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",