component-shipinlv 1.0.27 → 1.0.28

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
2
  interface Props {
3
+ productType: string;
4
+ clientUniqueKey: string;
3
5
  loginTypeList: Global.AuthClientLoginType[];
4
6
  domain?: string;
5
7
  onLoginSuccess: () => void;
@@ -25,7 +25,9 @@ var FromWhere = 'web';
25
25
 
26
26
  // 逐渐弃用 AuthClient ,使用 本函数
27
27
  var Auth = function Auth(_ref) {
28
- var loginTypeList = _ref.loginTypeList,
28
+ var productType = _ref.productType,
29
+ clientUniqueKey = _ref.clientUniqueKey,
30
+ loginTypeList = _ref.loginTypeList,
29
31
  _ref$domain = _ref.domain,
30
32
  domain = _ref$domain === void 0 ? document.location.hostname : _ref$domain,
31
33
  _ref$onLoginSuccess = _ref.onLoginSuccess,
@@ -313,6 +315,8 @@ var Auth = function Auth(_ref) {
313
315
  }),
314
316
  disabled: !loginTypeList.includes('account-login'),
315
317
  children: /*#__PURE__*/_jsx(AuthLoginReg, {
318
+ productType: productType,
319
+ clientUniqueKey: clientUniqueKey,
316
320
  accountRegDisabled: !loginTypeList.includes('account-reg'),
317
321
  onSuccess: function onSuccess() {
318
322
  return onLoginSuccess();
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
2
  interface Props {
3
+ productType: string;
4
+ clientUniqueKey: string;
3
5
  defaultLoginType: Global.AuthClientLoginType;
4
6
  wechatDisabled?: boolean;
5
7
  accountDisabled?: boolean;
@@ -3,7 +3,9 @@ import LoginQr from "./qr";
3
3
  import Tool from "../lib/Tool";
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
5
  var Auth = function Auth(_ref) {
6
- var defaultLoginType = _ref.defaultLoginType,
6
+ var productType = _ref.productType,
7
+ clientUniqueKey = _ref.clientUniqueKey,
8
+ defaultLoginType = _ref.defaultLoginType,
7
9
  wechatDisabled = _ref.wechatDisabled,
8
10
  accountDisabled = _ref.accountDisabled,
9
11
  accountHidden = _ref.accountHidden,
@@ -15,6 +17,8 @@ var Auth = function Auth(_ref) {
15
17
  Tool.pageDialogCloseAll();
16
18
  };
17
19
  return /*#__PURE__*/_jsx(LoginQr, {
20
+ productType: productType,
21
+ clientUniqueKey: clientUniqueKey,
18
22
  defaultLoginType: defaultLoginType,
19
23
  wechatDisabled: wechatDisabled,
20
24
  accountDisabled: accountDisabled,
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
2
  interface Props {
3
+ productType: string;
4
+ clientUniqueKey: string;
3
5
  activeKeyDefault?: 'login' | 'reg' | string;
4
6
  accountRegDisabled?: boolean;
5
7
  onSuccess: () => void;
@@ -8,7 +8,9 @@ import AuthLogin from "./login";
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
10
  var AuthLoginReg = function AuthLoginReg(_ref) {
11
- var _ref$activeKeyDefault = _ref.activeKeyDefault,
11
+ var productType = _ref.productType,
12
+ clientUniqueKey = _ref.clientUniqueKey,
13
+ _ref$activeKeyDefault = _ref.activeKeyDefault,
12
14
  activeKeyDefault = _ref$activeKeyDefault === void 0 ? 'reg' : _ref$activeKeyDefault,
13
15
  accountRegDisabled = _ref.accountRegDisabled,
14
16
  _ref$onSuccess = _ref.onSuccess,
@@ -43,6 +45,8 @@ var AuthLoginReg = function AuthLoginReg(_ref) {
43
45
  children: [/*#__PURE__*/_jsx(Tabs.TabPane, {
44
46
  tab: "\u767B\u5F55",
45
47
  children: /*#__PURE__*/_jsx(AuthLogin, {
48
+ productType: productType,
49
+ clientUniqueKey: clientUniqueKey,
46
50
  onSuccess: function onSuccess() {
47
51
  return _onSuccess();
48
52
  }
@@ -50,6 +54,8 @@ var AuthLoginReg = function AuthLoginReg(_ref) {
50
54
  }, "login"), /*#__PURE__*/_jsx(Tabs.TabPane, {
51
55
  tab: "\u6CE8\u518C",
52
56
  children: /*#__PURE__*/_jsx(Reg, {
57
+ productType: productType,
58
+ clientUniqueKey: clientUniqueKey,
53
59
  onSuccess: function onSuccess() {
54
60
  return _onSuccess();
55
61
  }
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
2
  interface Props {
3
+ productType: string;
4
+ clientUniqueKey: string;
3
5
  onSuccess: () => void;
4
6
  }
5
7
  declare const AuthReg: React.FC<Props>;
@@ -43,7 +43,9 @@ var tailFormItemLayout = {
43
43
  }
44
44
  };
45
45
  var AuthReg = function AuthReg(_ref) {
46
- var _ref$onSuccess = _ref.onSuccess,
46
+ var productType = _ref.productType,
47
+ clientUniqueKey = _ref.clientUniqueKey,
48
+ _ref$onSuccess = _ref.onSuccess,
47
49
  onSuccess = _ref$onSuccess === void 0 ? function () {} : _ref$onSuccess;
48
50
  var _useState = useState(false),
49
51
  _useState2 = _slicedToArray(_useState, 2),
@@ -54,6 +56,8 @@ var AuthReg = function AuthReg(_ref) {
54
56
  form = _Form$useForm2[0];
55
57
  var _useRequest = useRequest(function (data) {
56
58
  return AuthController.login(_objectSpread(_objectSpread({
59
+ productType: productType,
60
+ clientUniqueKey: clientUniqueKey,
57
61
  from: "web"
58
62
  }, data), {}, {
59
63
  inviteUserId: Tool.getInviteUserId()
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
2
  interface Props {
3
+ productType: string;
4
+ clientUniqueKey: string;
3
5
  defaultLoginType: Global.AuthClientLoginType;
4
6
  wechatDisabled?: boolean;
5
7
  accountDisabled?: boolean;
@@ -23,7 +23,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
23
23
  import { Fragment as _Fragment } from "react/jsx-runtime";
24
24
  import { jsxs as _jsxs } from "react/jsx-runtime";
25
25
  var LoginQr = function LoginQr(_ref) {
26
- var defaultLoginType = _ref.defaultLoginType,
26
+ var productType = _ref.productType,
27
+ clientUniqueKey = _ref.clientUniqueKey,
28
+ defaultLoginType = _ref.defaultLoginType,
27
29
  wechatDisabled = _ref.wechatDisabled,
28
30
  accountDisabled = _ref.accountDisabled,
29
31
  accountRegDisabled = _ref.accountRegDisabled,
@@ -317,6 +319,8 @@ var LoginQr = function LoginQr(_ref) {
317
319
  }),
318
320
  disabled: accountDisabled,
319
321
  children: /*#__PURE__*/_jsx(AuthLoginReg, {
322
+ productType: productType,
323
+ clientUniqueKey: clientUniqueKey,
320
324
  accountRegDisabled: accountRegDisabled,
321
325
  onSuccess: function onSuccess() {
322
326
  return onLoginSuccess();
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
2
  interface Props {
3
+ productType: string;
4
+ clientUniqueKey: string;
3
5
  onSuccess: () => void;
4
6
  }
5
7
  declare const Reg: React.FC<Props>;
@@ -41,13 +41,18 @@ var tailFormItemLayout = {
41
41
  }
42
42
  };
43
43
  var Reg = function Reg(_ref) {
44
- var _ref$onSuccess = _ref.onSuccess,
44
+ var productType = _ref.productType,
45
+ clientUniqueKey = _ref.clientUniqueKey,
46
+ _ref$onSuccess = _ref.onSuccess,
45
47
  onSuccess = _ref$onSuccess === void 0 ? function () {} : _ref$onSuccess;
46
48
  var _Form$useForm = Form.useForm(),
47
49
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
48
50
  form = _Form$useForm2[0];
49
51
  var _useRequest = useRequest(function (data) {
50
- return AuthController.reg(_objectSpread(_objectSpread({}, data), {}, {
52
+ return AuthController.reg(_objectSpread(_objectSpread({
53
+ productType: productType,
54
+ clientUniqueKey: clientUniqueKey
55
+ }, data), {}, {
51
56
  inviteUserId: Tool.getInviteUserId()
52
57
  }));
53
58
  }, {
@@ -189,7 +189,8 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
189
189
  introduction: '',
190
190
  videoKindTag: '',
191
191
  // shopping | location | minapp
192
- kindTagValue: ''
192
+ kindTagValue: '',
193
+ goodsTitle: ''
193
194
  });
194
195
  });
195
196
  setLocalSelectList(localSelectList);
@@ -41,13 +41,13 @@ var VideoPublishSelectList = function VideoPublishSelectList(_ref) {
41
41
  dataIndex: 'id',
42
42
  key: 'id'
43
43
  }, {
44
- title: '标题',
44
+ title: '视频标题',
45
45
  dataIndex: 'title',
46
46
  key: 'title',
47
47
  render: function render(title, record) {
48
48
  var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
49
49
  return /*#__PURE__*/_jsx(Popover, {
50
- title: "\u6807\u9898",
50
+ title: "\u89C6\u9891\u6807\u9898",
51
51
  content: title,
52
52
  children: /*#__PURE__*/_jsx("div", {
53
53
  className: "title",
@@ -64,13 +64,13 @@ var VideoPublishSelectList = function VideoPublishSelectList(_ref) {
64
64
  });
65
65
  }
66
66
  }, {
67
- title: '简介',
67
+ title: '视频简介',
68
68
  dataIndex: 'introduction',
69
69
  key: 'introduction',
70
70
  render: function render(introduction, record) {
71
71
  var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
72
72
  return /*#__PURE__*/_jsx(Popover, {
73
- title: "\u7B80\u4ECB",
73
+ title: "\u89C6\u9891\u7B80\u4ECB",
74
74
  content: introduction,
75
75
  children: /*#__PURE__*/_jsx("div", {
76
76
  className: "remark",
@@ -135,6 +135,33 @@ var VideoPublishSelectList = function VideoPublishSelectList(_ref) {
135
135
  })
136
136
  });
137
137
  }
138
+ }, {
139
+ title: '商品标题',
140
+ dataIndex: 'goodsTitle',
141
+ key: 'goodsTitle',
142
+ render: function render(goodsTitle, record) {
143
+ var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;
144
+ return /*#__PURE__*/_jsx(Popover, {
145
+ title: /*#__PURE__*/_jsxs(_Fragment, {
146
+ children: ["\u5546\u54C1\u6807\u9898 ", /*#__PURE__*/_jsx("small", {
147
+ children: "\u6700\u591A\u8F93\u516510\u4E2A\u6C49\u5B57"
148
+ })]
149
+ }),
150
+ content: goodsTitle,
151
+ children: /*#__PURE__*/_jsx("div", {
152
+ className: "remark",
153
+ children: /*#__PURE__*/_jsx(TextInput, {
154
+ className: "remarkInput",
155
+ maxLength: 10,
156
+ label: goodsTitle || '',
157
+ value: goodsTitle || '',
158
+ onFinish: function onFinish(goodsTitle) {
159
+ onItem(index, 'goodsTitle', goodsTitle);
160
+ }
161
+ })
162
+ })
163
+ });
164
+ }
138
165
  }, {
139
166
  title: /*#__PURE__*/_jsx(_Fragment, {
140
167
  children: "\u65F6\u957F"
@@ -164,9 +191,10 @@ var VideoPublishSelectList = function VideoPublishSelectList(_ref) {
164
191
  dataIndex: 'videoFinishUrl',
165
192
  key: 'videoFinishUrl',
166
193
  render: function render(videoFinishUrl, record) {
194
+ var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
167
195
  var isLocalUrl = !/^https?:/i.test(videoFinishUrl);
168
- return /*#__PURE__*/_jsx(Space, {
169
- children: isLocalUrl ? /*#__PURE__*/_jsx(_Fragment, {
196
+ return /*#__PURE__*/_jsxs(Space, {
197
+ children: [isLocalUrl ? /*#__PURE__*/_jsx(_Fragment, {
170
198
  children: /*#__PURE__*/_jsx(Button, {
171
199
  onClick: function onClick() {
172
200
  return onOpenDir((record === null || record === void 0 ? void 0 : record.id) || 0, (record === null || record === void 0 ? void 0 : record.videoFinishUrl) || '');
@@ -189,7 +217,16 @@ var VideoPublishSelectList = function VideoPublishSelectList(_ref) {
189
217
  type: "link",
190
218
  children: "\u9884\u89C8"
191
219
  })
192
- })
220
+ }), /*#__PURE__*/_jsx(Button, {
221
+ type: "link",
222
+ ghost: true,
223
+ danger: true,
224
+ size: "small",
225
+ onClick: function onClick() {
226
+ return onDel(index || 0);
227
+ },
228
+ children: "\u5220\u9664"
229
+ })]
193
230
  });
194
231
  }
195
232
  }];
@@ -240,12 +277,20 @@ var VideoPublishSelectList = function VideoPublishSelectList(_ref) {
240
277
  return _ref2.apply(this, arguments);
241
278
  };
242
279
  }();
280
+ var onDel = function onDel(index) {
281
+ list.splice(index, 1);
282
+ onList(_toConsumableArray(list));
283
+ Tool.toast('已删除');
284
+ };
243
285
  return /*#__PURE__*/_jsx(styles.videoPublishTaskSelectList, {
244
286
  children: /*#__PURE__*/_jsx(Table, {
245
287
  size: "small",
246
288
  bordered: true,
247
289
  rowKey: function rowKey(record, index) {
248
- return "".concat(index, "-").concat(record.id, "-").concat(record === null || record === void 0 ? void 0 : record.videoFinishUrl);
290
+ var encoder = new TextEncoder(); // 创建一个TextEncoder实例
291
+ var encoded = encoder.encode(JSON.stringify(record)); // 编码为UTF-8
292
+ console.log(encoded); // 输出UTF-8编码的Uint8Array
293
+ return "".concat(index, "-").concat(encoded.join('-'));
249
294
  },
250
295
  loading: false,
251
296
  columns: columns,
@@ -181,7 +181,8 @@ var VideoPublishTaskList = function VideoPublishTaskList(_ref) {
181
181
  videoFinishUrl: items.videoFinishUrl || items.finishUrl || '',
182
182
  videoKindTag: items.videoKindTag || '',
183
183
  kindTagValue: items.kindTagValue || '',
184
- introduction: items.introduction || ''
184
+ introduction: items.introduction || '',
185
+ goodsTitle: items.goodsTitle || ''
185
186
  };
186
187
  } else {
187
188
  delete selectDict[items.id];
@@ -202,7 +203,8 @@ var VideoPublishTaskList = function VideoPublishTaskList(_ref) {
202
203
  videoFinishUrl: items.videoFinishUrl || items.finishUrl || '',
203
204
  videoKindTag: items.videoKindTag || '',
204
205
  kindTagValue: items.kindTagValue || '',
205
- introduction: items.introduction || ''
206
+ introduction: items.introduction || '',
207
+ goodsTitle: items.goodsTitle || ''
206
208
  };
207
209
  });
208
210
  setSelectDict(_objectSpread({}, selectDict));
@@ -1,4 +1,5 @@
1
1
  export declare function login(body: {
2
+ productType: string;
2
3
  accountName: string;
3
4
  password: string;
4
5
  from: "web";
@@ -13,6 +14,7 @@ export declare function weMiniLoginQr(body: {
13
14
  env: Global.Env;
14
15
  }): Promise<UserAuth.WeQrResult>;
15
16
  export declare function reg(body: {
17
+ productType: string;
16
18
  accountName: string;
17
19
  password: string;
18
20
  inviteUserId: number;
@@ -16,6 +16,7 @@ declare namespace VideoPublish {
16
16
  introduction: string;
17
17
  videoKindTag: '' | VideoKindTag;
18
18
  kindTagValue: string;
19
+ goodsTitle: string;
19
20
  finishUrl?: string;
20
21
  videoFinishUrl?: string;
21
22
  }
@@ -50,6 +51,7 @@ declare namespace VideoPublish {
50
51
  introduction: string;
51
52
  videoKindTag: '' | VideoKindTag;
52
53
  kindTagValue: string;
54
+ goodsTitle: string;
53
55
  }
54
56
  interface VideoAccountResult {
55
57
  list: VideoAccountList[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "1.0.27",
3
+ "version": "1.0.28",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",