component-shipinlv 0.1.20 → 0.1.22
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/AuthClient/qr/h5-we-public-login.js +2 -11
- package/dist/AuthClient/qr/index.d.ts +1 -0
- package/dist/AuthClient/qr/index.js +6 -7
- package/dist/Login/index.js +1 -1
- package/dist/lib/Tool.d.ts +1 -1
- package/dist/lib/Tool.js +1 -1
- package/dist/lib/goAuth.js +1 -1
- package/dist/lib/postMessage.d.ts +1 -1
- package/dist/service/api/AuthController.d.ts +1 -0
- package/package.json +1 -1
@@ -1,24 +1,15 @@
|
|
1
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
3
3
|
// h5 页面 登录公众号
|
4
|
-
|
5
|
-
import Tool from "../../lib/Tool";
|
4
|
+
|
6
5
|
var h5WePublicLogin = /*#__PURE__*/function () {
|
7
6
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
8
|
-
var domainUrl, redirectUrl, inviteUserId, loginResult;
|
9
7
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
10
8
|
while (1) switch (_context.prev = _context.next) {
|
11
9
|
case 0:
|
12
10
|
document.location.replace("https://auth.shanren.wang/auth/wechat/login?url=".concat(document.location.href));
|
13
11
|
return _context.abrupt("return");
|
14
|
-
case
|
15
|
-
loginResult = _context.sent;
|
16
|
-
if (loginResult) {
|
17
|
-
_context.next = 10;
|
18
|
-
break;
|
19
|
-
}
|
20
|
-
return _context.abrupt("return");
|
21
|
-
case 10:
|
12
|
+
case 2:
|
22
13
|
case "end":
|
23
14
|
return _context.stop();
|
24
15
|
}
|
@@ -18,7 +18,6 @@ var reTryMaxCount = 120;
|
|
18
18
|
var reTryTimeLoop = 1000; // ms
|
19
19
|
var FromWhere = 'web';
|
20
20
|
import QRCode from 'qrcode.react';
|
21
|
-
import isInClient from "../../lib/isInClient";
|
22
21
|
import h5WePublicLogin from "./h5-we-public-login";
|
23
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
24
23
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
@@ -30,6 +29,8 @@ var LoginQr = function LoginQr(_ref) {
|
|
30
29
|
accountRegDisabled = _ref.accountRegDisabled,
|
31
30
|
accountHidden = _ref.accountHidden,
|
32
31
|
alipayDisabled = _ref.alipayDisabled,
|
32
|
+
_ref$domain = _ref.domain,
|
33
|
+
domain = _ref$domain === void 0 ? document.location.hostname : _ref$domain,
|
33
34
|
_ref$onLoginSuccess = _ref.onLoginSuccess,
|
34
35
|
onLoginSuccess = _ref$onLoginSuccess === void 0 ? function () {} : _ref$onLoginSuccess;
|
35
36
|
var _useState = useState(false),
|
@@ -142,10 +143,12 @@ var LoginQr = function LoginQr(_ref) {
|
|
142
143
|
from: "web",
|
143
144
|
// 没有推荐者,会根据域名判断 经销商
|
144
145
|
inviteUserId: Tool.getInviteUserId(),
|
146
|
+
domain: domain || document.location.hostname,
|
145
147
|
env: getApiEnv()
|
146
148
|
});
|
147
149
|
}, {
|
148
|
-
manual:
|
150
|
+
manual: true,
|
151
|
+
//,
|
149
152
|
onSuccess: function onSuccess(result) {
|
150
153
|
setWeQrUrl(result.url);
|
151
154
|
onRunCheck();
|
@@ -233,9 +236,6 @@ var LoginQr = function LoginQr(_ref) {
|
|
233
236
|
_context3.next = 9;
|
234
237
|
return runWeLoginQr();
|
235
238
|
case 9:
|
236
|
-
_context3.next = 11;
|
237
|
-
return runWeLoginQr();
|
238
|
-
case 11:
|
239
239
|
case "end":
|
240
240
|
return _context3.stop();
|
241
241
|
}
|
@@ -306,8 +306,7 @@ var LoginQr = function LoginQr(_ref) {
|
|
306
306
|
})]
|
307
307
|
})]
|
308
308
|
}) : /*#__PURE__*/_jsx("div", {
|
309
|
-
className: "alt"
|
310
|
-
children: "\u8BF7\u7528\u5FAE\u4FE1\u626B\u7801\u767B\u5F55"
|
309
|
+
className: "alt"
|
311
310
|
})]
|
312
311
|
})
|
313
312
|
})
|
package/dist/Login/index.js
CHANGED
package/dist/lib/Tool.d.ts
CHANGED
@@ -163,7 +163,7 @@ declare const Tool: {
|
|
163
163
|
setTimeOffset(serverTime: number): void;
|
164
164
|
getTime(): number;
|
165
165
|
h5Pay(query: Pay.H5PayQuery): void;
|
166
|
-
notification(type: "
|
166
|
+
notification(type: "info" | "error" | "success" | "warning", message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
|
167
167
|
notificationSuccess(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
|
168
168
|
notificationError(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
|
169
169
|
notificationWarning(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
|
package/dist/lib/Tool.js
CHANGED
@@ -1053,7 +1053,7 @@ var Tool = _objectSpread(_objectSpread({
|
|
1053
1053
|
});
|
1054
1054
|
},
|
1055
1055
|
onLogin: function onLogin() {
|
1056
|
-
return PostMessage('login');
|
1056
|
+
return PostMessage('need-login');
|
1057
1057
|
},
|
1058
1058
|
getObjectURL: function getObjectURL(file) {
|
1059
1059
|
var _window5, _window6;
|
package/dist/lib/goAuth.js
CHANGED
@@ -2,7 +2,7 @@ import PostMessage from "./postMessage";
|
|
2
2
|
export default function goAuth() {
|
3
3
|
var authType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
4
4
|
// Tool.go(`${ authType }/auth`);
|
5
|
-
return PostMessage('login');
|
5
|
+
return PostMessage('need-login');
|
6
6
|
// return;
|
7
7
|
// if( window._openAuth_ ){
|
8
8
|
// return Promise.reject( false );
|