component-shipinlv 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,27 +9,16 @@ var h5WePublicLogin = /*#__PURE__*/function () {
9
9
  return _regeneratorRuntime().wrap(function _callee$(_context) {
10
10
  while (1) switch (_context.prev = _context.next) {
11
11
  case 0:
12
- // 首先获取 登录跳转地址;
13
- domainUrl = 'https://auth.shanren.wang';
14
- redirectUrl = "".concat(domainUrl, "/h5-wechat-login-callback?");
15
- inviteUserId = Tool.getInviteUserId();
16
- _context.next = 5;
17
- return WechatController.h5WePublicLogin({
18
- redirectUrl: redirectUrl,
19
- inviteUserId: inviteUserId
20
- }).catch(function () {});
21
- case 5:
12
+ document.location.replace("https://auth.shanren.wang/auth/wechat/login?url=".concat(document.location.href));
13
+ return _context.abrupt("return");
14
+ case 7:
22
15
  loginResult = _context.sent;
23
16
  if (loginResult) {
24
- _context.next = 8;
17
+ _context.next = 10;
25
18
  break;
26
19
  }
27
20
  return _context.abrupt("return");
28
- case 8:
29
- // 因为 微信 会校验跳转域名,所以 用制定 中转;
30
-
31
- document.location.href = loginResult.redirectUrl;
32
- case 9:
21
+ case 10:
33
22
  case "end":
34
23
  return _context.stop();
35
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",