component-shipinlv 1.0.28 → 1.0.29

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,6 +4,7 @@ interface Props {
4
4
  clientUniqueKey: string;
5
5
  loginTypeList: Global.AuthClientLoginType[];
6
6
  domain?: string;
7
+ env?: Global.Env;
7
8
  onLoginSuccess: () => void;
8
9
  }
9
10
  declare const Auth: React.FC<Props>;
@@ -28,6 +28,7 @@ var Auth = function Auth(_ref) {
28
28
  var productType = _ref.productType,
29
29
  clientUniqueKey = _ref.clientUniqueKey,
30
30
  loginTypeList = _ref.loginTypeList,
31
+ env = _ref.env,
31
32
  _ref$domain = _ref.domain,
32
33
  domain = _ref$domain === void 0 ? document.location.hostname : _ref$domain,
33
34
  _ref$onLoginSuccess = _ref.onLoginSuccess,
@@ -315,6 +316,7 @@ var Auth = function Auth(_ref) {
315
316
  }),
316
317
  disabled: !loginTypeList.includes('account-login'),
317
318
  children: /*#__PURE__*/_jsx(AuthLoginReg, {
319
+ env: env,
318
320
  productType: productType,
319
321
  clientUniqueKey: clientUniqueKey,
320
322
  accountRegDisabled: !loginTypeList.includes('account-reg'),
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  interface Props {
3
+ env?: Global.Env;
3
4
  productType: string;
4
5
  clientUniqueKey: string;
5
6
  activeKeyDefault?: 'login' | 'reg' | string;
@@ -8,7 +8,8 @@ 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 productType = _ref.productType,
11
+ var env = _ref.env,
12
+ productType = _ref.productType,
12
13
  clientUniqueKey = _ref.clientUniqueKey,
13
14
  _ref$activeKeyDefault = _ref.activeKeyDefault,
14
15
  activeKeyDefault = _ref$activeKeyDefault === void 0 ? 'reg' : _ref$activeKeyDefault,
@@ -45,6 +46,7 @@ var AuthLoginReg = function AuthLoginReg(_ref) {
45
46
  children: [/*#__PURE__*/_jsx(Tabs.TabPane, {
46
47
  tab: "\u767B\u5F55",
47
48
  children: /*#__PURE__*/_jsx(AuthLogin, {
49
+ env: env,
48
50
  productType: productType,
49
51
  clientUniqueKey: clientUniqueKey,
50
52
  onSuccess: function onSuccess() {
@@ -54,6 +56,7 @@ var AuthLoginReg = function AuthLoginReg(_ref) {
54
56
  }, "login"), /*#__PURE__*/_jsx(Tabs.TabPane, {
55
57
  tab: "\u6CE8\u518C",
56
58
  children: /*#__PURE__*/_jsx(Reg, {
59
+ env: env,
57
60
  productType: productType,
58
61
  clientUniqueKey: clientUniqueKey,
59
62
  onSuccess: function onSuccess() {
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  interface Props {
3
+ env?: Global.Env;
3
4
  productType: string;
4
5
  clientUniqueKey: string;
5
6
  onSuccess: () => void;
@@ -43,7 +43,8 @@ var tailFormItemLayout = {
43
43
  }
44
44
  };
45
45
  var AuthReg = function AuthReg(_ref) {
46
- var productType = _ref.productType,
46
+ var env = _ref.env,
47
+ productType = _ref.productType,
47
48
  clientUniqueKey = _ref.clientUniqueKey,
48
49
  _ref$onSuccess = _ref.onSuccess,
49
50
  onSuccess = _ref$onSuccess === void 0 ? function () {} : _ref$onSuccess;
@@ -61,7 +62,9 @@ var AuthReg = function AuthReg(_ref) {
61
62
  from: "web"
62
63
  }, data), {}, {
63
64
  inviteUserId: Tool.getInviteUserId()
64
- }));
65
+ }), {
66
+ env: env
67
+ });
65
68
  }, {
66
69
  manual: true,
67
70
  onSuccess: function onSuccess(result) {
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  interface Props {
3
+ env?: Global.Env;
3
4
  productType: string;
4
5
  clientUniqueKey: string;
5
6
  onSuccess: () => void;
@@ -41,7 +41,8 @@ var tailFormItemLayout = {
41
41
  }
42
42
  };
43
43
  var Reg = function Reg(_ref) {
44
- var productType = _ref.productType,
44
+ var env = _ref.env,
45
+ productType = _ref.productType,
45
46
  clientUniqueKey = _ref.clientUniqueKey,
46
47
  _ref$onSuccess = _ref.onSuccess,
47
48
  onSuccess = _ref$onSuccess === void 0 ? function () {} : _ref$onSuccess;
@@ -54,7 +55,9 @@ var Reg = function Reg(_ref) {
54
55
  clientUniqueKey: clientUniqueKey
55
56
  }, data), {}, {
56
57
  inviteUserId: Tool.getInviteUserId()
57
- }));
58
+ }), {
59
+ env: env
60
+ });
58
61
  }, {
59
62
  manual: true,
60
63
  onSuccess: function onSuccess(result) {
@@ -4,7 +4,7 @@ export declare function login(body: {
4
4
  password: string;
5
5
  from: "web";
6
6
  inviteUserId: number;
7
- }): Promise<UserAuth.LoginSuccessData>;
7
+ }, options?: ServicesApi.RequestOptions): Promise<UserAuth.LoginSuccessData>;
8
8
  export declare function weMiniLoginQr(body: {
9
9
  loginId: string;
10
10
  loginType: 'client';
@@ -12,10 +12,10 @@ export declare function weMiniLoginQr(body: {
12
12
  inviteUserId: number;
13
13
  domain: string;
14
14
  env: Global.Env;
15
- }): Promise<UserAuth.WeQrResult>;
15
+ }, options?: ServicesApi.RequestOptions): Promise<UserAuth.WeQrResult>;
16
16
  export declare function reg(body: {
17
17
  productType: string;
18
18
  accountName: string;
19
19
  password: string;
20
20
  inviteUserId: number;
21
- }): 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();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",