component-shipinlv 1.0.27 → 1.0.29

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.
@@ -1,7 +1,10 @@
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;
7
+ env?: Global.Env;
5
8
  onLoginSuccess: () => void;
6
9
  }
7
10
  declare const Auth: React.FC<Props>;
@@ -25,7 +25,10 @@ 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,
31
+ env = _ref.env,
29
32
  _ref$domain = _ref.domain,
30
33
  domain = _ref$domain === void 0 ? document.location.hostname : _ref$domain,
31
34
  _ref$onLoginSuccess = _ref.onLoginSuccess,
@@ -313,6 +316,9 @@ var Auth = function Auth(_ref) {
313
316
  }),
314
317
  disabled: !loginTypeList.includes('account-login'),
315
318
  children: /*#__PURE__*/_jsx(AuthLoginReg, {
319
+ env: env,
320
+ productType: productType,
321
+ clientUniqueKey: clientUniqueKey,
316
322
  accountRegDisabled: !loginTypeList.includes('account-reg'),
317
323
  onSuccess: function onSuccess() {
318
324
  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,8 @@
1
1
  import React from 'react';
2
2
  interface Props {
3
+ env?: Global.Env;
4
+ productType: string;
5
+ clientUniqueKey: string;
3
6
  activeKeyDefault?: 'login' | 'reg' | string;
4
7
  accountRegDisabled?: boolean;
5
8
  onSuccess: () => void;
@@ -8,7 +8,10 @@ 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 env = _ref.env,
12
+ productType = _ref.productType,
13
+ clientUniqueKey = _ref.clientUniqueKey,
14
+ _ref$activeKeyDefault = _ref.activeKeyDefault,
12
15
  activeKeyDefault = _ref$activeKeyDefault === void 0 ? 'reg' : _ref$activeKeyDefault,
13
16
  accountRegDisabled = _ref.accountRegDisabled,
14
17
  _ref$onSuccess = _ref.onSuccess,
@@ -43,6 +46,9 @@ var AuthLoginReg = function AuthLoginReg(_ref) {
43
46
  children: [/*#__PURE__*/_jsx(Tabs.TabPane, {
44
47
  tab: "\u767B\u5F55",
45
48
  children: /*#__PURE__*/_jsx(AuthLogin, {
49
+ env: env,
50
+ productType: productType,
51
+ clientUniqueKey: clientUniqueKey,
46
52
  onSuccess: function onSuccess() {
47
53
  return _onSuccess();
48
54
  }
@@ -50,6 +56,9 @@ var AuthLoginReg = function AuthLoginReg(_ref) {
50
56
  }, "login"), /*#__PURE__*/_jsx(Tabs.TabPane, {
51
57
  tab: "\u6CE8\u518C",
52
58
  children: /*#__PURE__*/_jsx(Reg, {
59
+ env: env,
60
+ productType: productType,
61
+ clientUniqueKey: clientUniqueKey,
53
62
  onSuccess: function onSuccess() {
54
63
  return _onSuccess();
55
64
  }
@@ -1,5 +1,8 @@
1
1
  import React from 'react';
2
2
  interface Props {
3
+ env?: Global.Env;
4
+ productType: string;
5
+ clientUniqueKey: string;
3
6
  onSuccess: () => void;
4
7
  }
5
8
  declare const AuthReg: React.FC<Props>;
@@ -43,7 +43,10 @@ var tailFormItemLayout = {
43
43
  }
44
44
  };
45
45
  var AuthReg = function AuthReg(_ref) {
46
- var _ref$onSuccess = _ref.onSuccess,
46
+ var env = _ref.env,
47
+ productType = _ref.productType,
48
+ clientUniqueKey = _ref.clientUniqueKey,
49
+ _ref$onSuccess = _ref.onSuccess,
47
50
  onSuccess = _ref$onSuccess === void 0 ? function () {} : _ref$onSuccess;
48
51
  var _useState = useState(false),
49
52
  _useState2 = _slicedToArray(_useState, 2),
@@ -54,10 +57,14 @@ var AuthReg = function AuthReg(_ref) {
54
57
  form = _Form$useForm2[0];
55
58
  var _useRequest = useRequest(function (data) {
56
59
  return AuthController.login(_objectSpread(_objectSpread({
60
+ productType: productType,
61
+ clientUniqueKey: clientUniqueKey,
57
62
  from: "web"
58
63
  }, data), {}, {
59
64
  inviteUserId: Tool.getInviteUserId()
60
- }));
65
+ }), {
66
+ env: env
67
+ });
61
68
  }, {
62
69
  manual: true,
63
70
  onSuccess: function onSuccess(result) {
@@ -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,8 @@
1
1
  import React from 'react';
2
2
  interface Props {
3
+ env?: Global.Env;
4
+ productType: string;
5
+ clientUniqueKey: string;
3
6
  onSuccess: () => void;
4
7
  }
5
8
  declare const Reg: React.FC<Props>;
@@ -41,15 +41,23 @@ var tailFormItemLayout = {
41
41
  }
42
42
  };
43
43
  var Reg = function Reg(_ref) {
44
- var _ref$onSuccess = _ref.onSuccess,
44
+ var env = _ref.env,
45
+ productType = _ref.productType,
46
+ clientUniqueKey = _ref.clientUniqueKey,
47
+ _ref$onSuccess = _ref.onSuccess,
45
48
  onSuccess = _ref$onSuccess === void 0 ? function () {} : _ref$onSuccess;
46
49
  var _Form$useForm = Form.useForm(),
47
50
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
48
51
  form = _Form$useForm2[0];
49
52
  var _useRequest = useRequest(function (data) {
50
- return AuthController.reg(_objectSpread(_objectSpread({}, data), {}, {
53
+ return AuthController.reg(_objectSpread(_objectSpread({
54
+ productType: productType,
55
+ clientUniqueKey: clientUniqueKey
56
+ }, data), {}, {
51
57
  inviteUserId: Tool.getInviteUserId()
52
- }));
58
+ }), {
59
+ env: env
60
+ });
53
61
  }, {
54
62
  manual: true,
55
63
  onSuccess: function onSuccess(result) {
@@ -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,9 +1,10 @@
1
1
  export declare function login(body: {
2
+ productType: string;
2
3
  accountName: string;
3
4
  password: string;
4
5
  from: "web";
5
6
  inviteUserId: number;
6
- }): Promise<UserAuth.LoginSuccessData>;
7
+ }, options?: ServicesApi.RequestOptions): Promise<UserAuth.LoginSuccessData>;
7
8
  export declare function weMiniLoginQr(body: {
8
9
  loginId: string;
9
10
  loginType: 'client';
@@ -11,9 +12,10 @@ export declare function weMiniLoginQr(body: {
11
12
  inviteUserId: number;
12
13
  domain: string;
13
14
  env: Global.Env;
14
- }): Promise<UserAuth.WeQrResult>;
15
+ }, options?: ServicesApi.RequestOptions): 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;
19
- }): Promise<UserAuth.LoginSuccessData>;
21
+ }, options?: ServicesApi.RequestOptions): Promise<UserAuth.LoginSuccessData>;
@@ -2,24 +2,24 @@ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
2
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
3
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
4
4
  import request from "../../lib/request";
5
- export function login(_x) {
5
+ export function login(_x, _x2) {
6
6
  return _login.apply(this, arguments);
7
7
  }
8
8
  function _login() {
9
- _login = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(body) {
9
+ _login = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(body, options) {
10
10
  return _regeneratorRuntime().wrap(function _callee$(_context) {
11
11
  while (1) switch (_context.prev = _context.next) {
12
12
  case 0:
13
13
  // 兼容
14
14
  // @ts-ignore
15
15
  body.account = body.accountName;
16
- return _context.abrupt("return", request("auth/loginAccount", {
16
+ return _context.abrupt("return", request("auth/loginAccount", _objectSpread({
17
17
  method: 'POST',
18
18
  headers: {
19
19
  'Content-Type': 'application/json'
20
20
  },
21
21
  data: _objectSpread({}, body)
22
- }));
22
+ }, options || {})));
23
23
  case 2:
24
24
  case "end":
25
25
  return _context.stop();
@@ -28,23 +28,22 @@ function _login() {
28
28
  }));
29
29
  return _login.apply(this, arguments);
30
30
  }
31
- export function weMiniLoginQr(_x2) {
31
+ export function weMiniLoginQr(_x3, _x4) {
32
32
  return _weMiniLoginQr.apply(this, arguments);
33
33
  }
34
34
  function _weMiniLoginQr() {
35
- _weMiniLoginQr = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(body) {
35
+ _weMiniLoginQr = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(body, options) {
36
36
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
37
37
  while (1) switch (_context2.prev = _context2.next) {
38
38
  case 0:
39
- return _context2.abrupt("return", request('auth/wechatLoginQr',
40
- //`client/auth/weMiniLoginQr`,
41
- {
39
+ return _context2.abrupt("return", request('auth/wechatLoginQr', //`client/auth/weMiniLoginQr`,
40
+ _objectSpread({
42
41
  method: 'POST',
43
42
  headers: {
44
43
  'Content-Type': 'application/json'
45
44
  },
46
45
  data: _objectSpread({}, body)
47
- }));
46
+ }, options || {})));
48
47
  case 1:
49
48
  case "end":
50
49
  return _context2.stop();
@@ -53,21 +52,21 @@ function _weMiniLoginQr() {
53
52
  }));
54
53
  return _weMiniLoginQr.apply(this, arguments);
55
54
  }
56
- export function reg(_x3) {
55
+ export function reg(_x5, _x6) {
57
56
  return _reg.apply(this, arguments);
58
57
  }
59
58
  function _reg() {
60
- _reg = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(body) {
59
+ _reg = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(body, options) {
61
60
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
62
61
  while (1) switch (_context3.prev = _context3.next) {
63
62
  case 0:
64
- return _context3.abrupt("return", request("auth/reg", {
63
+ return _context3.abrupt("return", request("auth/reg", _objectSpread({
65
64
  method: 'POST',
66
65
  headers: {
67
66
  'Content-Type': 'application/json'
68
67
  },
69
68
  data: _objectSpread({}, body)
70
- }));
69
+ }, options || {})));
71
70
  case 1:
72
71
  case "end":
73
72
  return _context3.stop();
@@ -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.29",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",