component-shipinlv 0.1.9 → 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
  }
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ div: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
4
+ };
5
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
+ var _templateObject;
3
+ import styled from 'styled-components';
4
+ export default {
5
+ div: styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n :global{\n .clientStatus{\n .loading{\n opacity: 0.7;\n }\n\n .downloading{\n margin-left: 12px;\n }\n\n .working{\n color: green;\n }\n }\n "])))
6
+ };
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import './index.less';
3
2
  interface Props {
4
3
  productType: string;
5
4
  port?: number;
@@ -4,10 +4,10 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
4
  import React, { useEffect, useRef, useState } from 'react';
5
5
  import * as SubClientController from "../service/api/SubClientController";
6
6
  import { useRequest } from '@umijs/hooks';
7
- import "./index.less";
8
7
  import { CheckCircleFilled, ExclamationCircleFilled, LoadingOutlined, QuestionCircleOutlined, RedoOutlined } from "@ant-design/icons";
9
8
  import { Button, Divider, Tooltip } from "antd";
10
9
  import Tool from "../lib/Tool";
10
+ import styles from "./index.css";
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
12
  import { Fragment as _Fragment } from "react/jsx-runtime";
13
13
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -197,14 +197,16 @@ var JoinClient = function JoinClient(_ref) {
197
197
  useEffect(function () {
198
198
  onRunStatus(runStatus);
199
199
  }, [runStatus]);
200
- return /*#__PURE__*/_jsxs("div", {
201
- className: "clientStatus",
202
- children: [$status(), /*#__PURE__*/_jsx(Divider, {
203
- type: "vertical"
204
- }), /*#__PURE__*/_jsxs(Tooltip, {
205
- title: "\u672C\u9875\u9762\u529F\u80FD\u9700\u8981\u4F60\u7684\u7535\u8111\u4E0A\u5B89\u88C5\u4E13\u7528\u5BA2\u6237\u7AEF\u8F6F\u4EF6",
206
- children: [" ", /*#__PURE__*/_jsx(QuestionCircleOutlined, {})]
207
- })]
200
+ return /*#__PURE__*/_jsx(styles.div, {
201
+ children: /*#__PURE__*/_jsxs("div", {
202
+ className: "clientStatus",
203
+ children: [$status(), /*#__PURE__*/_jsx(Divider, {
204
+ type: "vertical"
205
+ }), /*#__PURE__*/_jsxs(Tooltip, {
206
+ title: "\u672C\u9875\u9762\u529F\u80FD\u9700\u8981\u4F60\u7684\u7535\u8111\u4E0A\u5B89\u88C5\u4E13\u7528\u5BA2\u6237\u7AEF\u8F6F\u4EF6",
207
+ children: [" ", /*#__PURE__*/_jsx(QuestionCircleOutlined, {})]
208
+ })]
209
+ })
208
210
  });
209
211
  };
210
212
  export default JoinClient;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/dist/global.less DELETED
File without changes
@@ -1,15 +0,0 @@
1
- .clientStatus{
2
-
3
- .loading{
4
- opacity: 0.7;
5
- }
6
-
7
- .downloading{
8
- margin-left: 12px;
9
- }
10
-
11
- .working{
12
- color: green;
13
- }
14
-
15
- }