component-shipinlv 0.0.11 → 0.0.13

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.
Files changed (64) hide show
  1. package/dist/AuthClient/login-reg.css.d.ts +5 -0
  2. package/dist/AuthClient/login-reg.css.js +6 -0
  3. package/dist/AuthClient/login-reg.d.ts +0 -1
  4. package/dist/AuthClient/login-reg.js +2 -3
  5. package/dist/AuthClient/login.css.d.ts +5 -0
  6. package/dist/AuthClient/login.css.js +6 -0
  7. package/dist/AuthClient/login.d.ts +0 -1
  8. package/dist/AuthClient/login.js +2 -1
  9. package/dist/AuthClient/qr/index.css.d.ts +8 -0
  10. package/dist/AuthClient/qr/index.css.js +9 -0
  11. package/dist/AuthClient/qr/index.js +49 -45
  12. package/dist/AuthClient/reg.d.ts +0 -1
  13. package/dist/AuthClient/reg.js +0 -1
  14. package/dist/Buy/index.css.d.ts +5 -0
  15. package/dist/Buy/index.css.js +6 -0
  16. package/dist/Buy/index.d.ts +0 -1
  17. package/dist/Buy/index.js +13 -10
  18. package/dist/Buy/qr.css.d.ts +5 -0
  19. package/dist/Buy/qr.css.js +6 -0
  20. package/dist/Buy/qr.d.ts +0 -1
  21. package/dist/Buy/qr.js +76 -72
  22. package/dist/UI/DialogDrawer.css.d.ts +5 -0
  23. package/dist/UI/DialogDrawer.css.js +6 -0
  24. package/dist/UI/DialogDrawer.d.ts +0 -1
  25. package/dist/UI/DialogDrawer.js +16 -13
  26. package/dist/UI/DialogDrawerFooter.css.d.ts +5 -0
  27. package/dist/UI/DialogDrawerFooter.css.js +6 -0
  28. package/dist/UI/DialogDrawerFooter.d.ts +0 -1
  29. package/dist/UI/DialogDrawerFooter.js +2 -3
  30. package/dist/UI/LoadError.css.d.ts +5 -0
  31. package/dist/UI/LoadError.css.js +6 -0
  32. package/dist/UI/LoadError.d.ts +0 -1
  33. package/dist/UI/LoadError.js +2 -3
  34. package/dist/UI/PageContentWarp.css.d.ts +5 -0
  35. package/dist/UI/PageContentWarp.css.js +6 -0
  36. package/dist/UI/PageContentWarp.d.ts +0 -1
  37. package/dist/UI/PageContentWarp.js +2 -2
  38. package/dist/VipCompare/commend.css.d.ts +5 -0
  39. package/dist/VipCompare/commend.css.js +6 -0
  40. package/dist/VipCompare/commend.d.ts +0 -1
  41. package/dist/VipCompare/commend.js +2 -3
  42. package/dist/VipCompare/index.css.d.ts +5 -0
  43. package/dist/VipCompare/index.css.js +6 -0
  44. package/dist/VipCompare/index.d.ts +0 -1
  45. package/dist/VipCompare/index.js +48 -47
  46. package/dist/lib/Tool.d.ts +1 -0
  47. package/dist/lib/Tool.js +29 -10
  48. package/dist/lib/getApiUrl.js +4 -4
  49. package/dist/lib/js-error.js +3 -0
  50. package/dist/lib/platform.js +4 -3
  51. package/dist/lib/request.js +2 -2
  52. package/package.json +3 -1
  53. package/dist/AuthClient/login-reg.scss +0 -13
  54. package/dist/AuthClient/login.scss +0 -52
  55. package/dist/AuthClient/qr/index.scss +0 -84
  56. package/dist/AuthClient/reg.scss +0 -3
  57. package/dist/Buy/index.scss +0 -26
  58. package/dist/Buy/qr.scss +0 -69
  59. package/dist/UI/DialogDrawer.scss +0 -10
  60. package/dist/UI/DialogDrawerFooter.scss +0 -19
  61. package/dist/UI/LoadError.scss +0 -18
  62. package/dist/UI/PageContentWarp.scss +0 -11
  63. package/dist/VipCompare/commend.scss +0 -7
  64. package/dist/VipCompare/index.scss +0 -26
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ LoginReg: 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
+ LoginReg: styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .radioSelectBox{\n text-align: right;\n }\n .selectTabs{\n .ant-tabs-nav-wrap{\n display: none !important;\n }\n .ant-tabs-nav{\n opacity: 0;\n }\n }\n "])))
6
+ };
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import "./login-reg.scss";
3
2
  interface Props {
4
3
  activeKeyDefault?: 'login' | 'reg' | string;
5
4
  accountRegDisabled?: boolean;
@@ -3,7 +3,7 @@ import React, { useState } from 'react';
3
3
  import { Tabs, Radio } from "antd";
4
4
  import { UserAddOutlined, UserOutlined } from "@ant-design/icons";
5
5
  import Reg from "./reg";
6
- import "./login-reg.scss";
6
+ import styles from "./login-reg.css";
7
7
  import AuthLogin from "./login";
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -17,8 +17,7 @@ var AuthLoginReg = function AuthLoginReg(_ref) {
17
17
  _useState2 = _slicedToArray(_useState, 2),
18
18
  activeKey = _useState2[0],
19
19
  setActiveKey = _useState2[1];
20
- return /*#__PURE__*/_jsxs("div", {
21
- className: "loginReg",
20
+ return /*#__PURE__*/_jsxs(styles.LoginReg, {
22
21
  children: [/*#__PURE__*/_jsx("div", {
23
22
  className: "radioSelectBox",
24
23
  children: /*#__PURE__*/_jsxs(Radio.Group, {
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ AuthClientLogin: 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
+ AuthClientLogin: styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: no-repeat left bottom #FFF;\n background-size: cover;\n .webTitle{\n font-weight: normal;\n font-size: 22px;\n text-align: right;\n margin: 0 0 -10px 0;\n line-height: 1em;\n span{\n display: inline-block;\n padding-left: 5px;\n font-weight: lighter;\n font-size: 16px;\n };\n }\n .loginMain{\n margin: 0 auto 20px;\n .loginForm{\n margin: 0 auto;\n padding:0 0 5px 0 ;\n background-color: rgba(255, 255, 255, 0.75 );\n border-radius: 6px;\n }\n }\n\n .storePass{\n cursor: pointer;\n }\n\n .login-success{\n position: relative;\n cursor: pointer;\n width: 220px;\n height: 220px;\n margin: 10px auto; background-color: #EEE; font-size: 40px; color: #999; text-align: center;\n .anticon{ line-height: 1em; color: #52c41a; }\n .icon-warp{\n position: relative; z-index: 10; opacity: 1; margin-top: 70px; width: 80px; height: 80px; padding: 10px; background-color: #FFF; display: inline-block; border-radius: 100px; }\n }\n\n .otherInfo{\n position: relative;\n .forgetPass{\n position: absolute;\n right: 0;\n top: 0;\n padding: 6px 0 0 0;\n font-size: 13px;\n }\n }\n "])))
6
+ };
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import "./reg.scss";
3
2
  interface Props {
4
3
  onSuccess: () => void;
5
4
  }
@@ -7,7 +7,8 @@ import { LockOutlined, UserOutlined, EyeTwoTone, EyeInvisibleOutlined } from '@a
7
7
  import { Input, Button, Form } from 'antd';
8
8
  import Tool from "../lib/Tool";
9
9
  import { useRequest } from '@umijs/hooks';
10
- import "./reg.scss";
10
+
11
+ // import styles from "./reg.scss" ;
11
12
  import * as AuthController from "../service/api/AuthController";
12
13
  import { jsx as _jsx } from "react/jsx-runtime";
13
14
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ AuthQrLogin: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
4
+ LoginForm: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
5
+ WebTitle: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
6
+ WeQrUrlBox: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
7
+ };
8
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
3
+ import styled from 'styled-components';
4
+ export default {
5
+ AuthQrLogin: styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .weQrUrl{\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n }\n .qr{\n display: block;\n margin: 12px auto 0;\n width: 230px;\n height: 230px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n &.qrAlipay{\n border: 3px solid #1677ff;\n }\n .reTry{\n font-size: 80px;\n background-color: rgba( 255, 255, 255, 0.95 );\n text-align: center;\n line-height: 210px;\n height: 100%;\n a{\n display: block;\n }\n }\n }\n .alt{\n padding: 10px 0 0;\n color: #999;\n text-align: center;\n }\n .altWeb{\n padding: 16px 0 0;\n max-width: 300px;\n margin: 0 auto;\n .titles{\n text-align: center;\n font-weight: bold;\n }\n ul{\n margin: 0 10px;\n }\n\n }\n .percent{\n width: 100%;\n position: absolute;\n overflow: hidden;\n left: 0;\n bottom: 0;\n .warp{\n height: 4px;\n background-color: #1677ff;\n transition: all 1.6s ease-in-out;\n -webkit-transition: all 1.6s ease-in-out;\n }\n }\n "]))),
6
+ LoginForm: styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin: 0 auto;\n padding: 0 0 5px 0 ;\n background-color: rgba(255, 255, 255, 0.75 );\n border-radius: 6px;\n "]))),
7
+ WebTitle: styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-weight: normal;\n font-size: 22px;\n text-align: center;\n padding: 0;\n margin: 6px 0 0 0;\n line-height: 1em;\n span{\n display: inline-block;\n padding-left: 5px;\n font-weight: lighter;\n font-size: 16px;\n }\n "]))),
8
+ WeQrUrlBox: styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n min-height: 240px !important;\n "])))
9
+ };
@@ -13,11 +13,14 @@ import AuthLoginReg from "../login-reg";
13
13
  import Platform from "../../lib/platform";
14
14
  import QrWs from "./ws";
15
15
  import { getApiEnv } from "../../lib/getApiUrl";
16
- import { jsx as _jsx } from "react/jsx-runtime";
17
- import { jsxs as _jsxs } from "react/jsx-runtime";
16
+ import styles from "./index.css";
18
17
  var reTryMaxCount = 120;
19
18
  var reTryTimeLoop = 1000; // ms
20
19
  var FromWhere = 'web';
20
+ import QRCode from 'qrcode.react';
21
+ import { jsx as _jsx } from "react/jsx-runtime";
22
+ import { Fragment as _Fragment } from "react/jsx-runtime";
23
+ import { jsxs as _jsxs } from "react/jsx-runtime";
21
24
  var LoginQr = function LoginQr(_ref) {
22
25
  var defaultLoginType = _ref.defaultLoginType,
23
26
  wechatDisabled = _ref.wechatDisabled,
@@ -142,7 +145,7 @@ var LoginQr = function LoginQr(_ref) {
142
145
  }, {
143
146
  manual: defaultLoginType !== 'wechat',
144
147
  onSuccess: function onSuccess(result) {
145
- setWeQrUrl(Tool.makeQrUrl(result.url, '#0bc160'));
148
+ setWeQrUrl(result.url);
146
149
  onRunCheck();
147
150
  }
148
151
  }),
@@ -227,17 +230,11 @@ var LoginQr = function LoginQr(_ref) {
227
230
  clearTimeout(timer.current);
228
231
  };
229
232
  }, []);
230
- return /*#__PURE__*/_jsx("section", {
231
- className: "authQrLogin",
232
- children: /*#__PURE__*/_jsxs("div", {
233
- className: "loginForm",
234
- children: [/*#__PURE__*/_jsx("div", {
235
- className: "form-group",
236
- children: /*#__PURE__*/_jsx("h1", {
237
- className: "webTitle",
238
- children: /*#__PURE__*/_jsx("span", {
239
- children: "\u767B\u5F55/\u6CE8\u518C"
240
- })
233
+ return /*#__PURE__*/_jsx(styles.AuthQrLogin, {
234
+ children: /*#__PURE__*/_jsxs(styles.LoginForm, {
235
+ children: [/*#__PURE__*/_jsx(styles.WebTitle, {
236
+ children: /*#__PURE__*/_jsx("span", {
237
+ children: "\u767B\u5F55/\u6CE8\u518C"
241
238
  })
242
239
  }), /*#__PURE__*/_jsxs(Tabs, {
243
240
  activeKey: activeKey,
@@ -245,46 +242,53 @@ var LoginQr = function LoginQr(_ref) {
245
242
  onTabChange(keyName);
246
243
  },
247
244
  children: [/*#__PURE__*/_jsx(Tabs.TabPane, {
248
- tab: /*#__PURE__*/_jsxs("span", {
249
- className: "tab-icon",
250
- children: [/*#__PURE__*/_jsx(WechatOutlined, {}), "\u5FAE\u4FE1"]
245
+ tab: /*#__PURE__*/_jsxs(_Fragment, {
246
+ children: [/*#__PURE__*/_jsx(WechatOutlined, {}), " \u5FAE\u4FE1"]
251
247
  }),
252
248
  disabled: wechatDisabled,
253
- children: /*#__PURE__*/_jsxs(PageContentWarp, {
249
+ children: /*#__PURE__*/_jsx(PageContentWarp, {
254
250
  loading: loadingWeLoginQr || loading,
255
251
  error: errorWeLoginQr,
256
252
  onReload: function onReload() {
257
253
  return onRetryWeQr();
258
254
  },
259
- className: "weQrUrlBox",
260
- children: [/*#__PURE__*/_jsx("div", {
261
- style: {
262
- backgroundImage: "url('".concat(weQrUrl, "')")
263
- },
264
- className: "qr wechat ".concat(isNextTry ? '' : 'noTry'),
265
- children: !isNextTry && /*#__PURE__*/_jsx("div", {
266
- className: "reTry",
267
- onClick: onRetryWeQr,
268
- children: /*#__PURE__*/_jsx("a", {
269
- children: /*#__PURE__*/_jsx(RedoOutlined, {})
270
- })
271
- })
272
- }), Platform.isH5 ? /*#__PURE__*/_jsxs("div", {
273
- className: "altWeb",
274
- children: [/*#__PURE__*/_jsx("div", {
275
- className: "titles",
276
- children: "\u4E0B\u9762\u4EFB\u9009\u4E00\u4E2A\u65B9\u6CD5\u90FD\u53EF\u4EE5\u767B\u5F55\uFF1A"
277
- }), /*#__PURE__*/_jsxs("ul", {
278
- children: [/*#__PURE__*/_jsx("li", {
279
- children: "1\u3001\u628A\u672C\u9875\u7F51\u5740\u590D\u5236\u5230\u5FAE\u4FE1\u91CC\u9762\u6253\u5F00"
280
- }), /*#__PURE__*/_jsx("li", {
281
- children: "2\u3001\u8BF7\u7528\u5FAE\u4FE1\u626B\u7801\u767B\u5F55"
255
+ children: /*#__PURE__*/_jsxs(styles.WeQrUrlBox, {
256
+ children: [/*#__PURE__*/_jsxs("div", {
257
+ style: {
258
+ // backgroundImage: `url('${ weQrUrl }')`,
259
+ },
260
+ className: "qr wechat ".concat(isNextTry ? '' : 'noTry'),
261
+ children: [!isNextTry && /*#__PURE__*/_jsx("div", {
262
+ className: "reTry",
263
+ onClick: onRetryWeQr,
264
+ children: /*#__PURE__*/_jsx("a", {
265
+ children: /*#__PURE__*/_jsx(RedoOutlined, {})
266
+ })
267
+ }), /*#__PURE__*/_jsx("div", {
268
+ className: "weQrUrl",
269
+ children: /*#__PURE__*/_jsx(QRCode, {
270
+ value: weQrUrl,
271
+ fgColor: "#0bc160",
272
+ size: 230
273
+ })
274
+ })]
275
+ }), Platform.isH5 ? /*#__PURE__*/_jsxs("div", {
276
+ className: "altWeb",
277
+ children: [/*#__PURE__*/_jsx("div", {
278
+ className: "titles",
279
+ children: "\u4E0B\u9762\u4EFB\u9009\u4E00\u4E2A\u65B9\u6CD5\u90FD\u53EF\u4EE5\u767B\u5F55\uFF1A"
280
+ }), /*#__PURE__*/_jsxs("ul", {
281
+ children: [/*#__PURE__*/_jsx("li", {
282
+ children: "1\u3001\u628A\u672C\u9875\u7F51\u5740\u590D\u5236\u5230\u5FAE\u4FE1\u91CC\u9762\u6253\u5F00"
283
+ }), /*#__PURE__*/_jsx("li", {
284
+ children: "2\u3001\u8BF7\u7528\u5FAE\u4FE1\u626B\u7801\u767B\u5F55"
285
+ })]
282
286
  })]
287
+ }) : /*#__PURE__*/_jsx("div", {
288
+ className: "alt",
289
+ children: "\u8BF7\u7528\u5FAE\u4FE1\u626B\u7801\u767B\u5F55"
283
290
  })]
284
- }) : /*#__PURE__*/_jsx("div", {
285
- className: "alt",
286
- children: "\u8BF7\u7528\u5FAE\u4FE1\u626B\u7801\u767B\u5F55"
287
- })]
291
+ })
288
292
  })
289
293
  }, "wechat"), !accountHidden && /*#__PURE__*/_jsx(Tabs.TabPane, {
290
294
  tab: /*#__PURE__*/_jsxs("span", {
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import "./reg.scss";
3
2
  interface Props {
4
3
  onSuccess: () => void;
5
4
  }
@@ -6,7 +6,6 @@ import React from 'react';
6
6
  import { LockOutlined, UserOutlined, EyeTwoTone, EyeInvisibleOutlined } from '@ant-design/icons';
7
7
  import { Input, Button, Form } from 'antd';
8
8
  import Tool from "../lib/Tool";
9
- import "./reg.scss";
10
9
  import { useRequest } from "@umijs/hooks";
11
10
  import * as AuthController from "../service/api/AuthController";
12
11
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ Buy: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, 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
+ Buy: styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n :global{\n .ktv-ai-vip-compare{\n .vip-compare-price{\n small{\n color: #888;\n vertical-align: middle;\n }\n }\n .listMore{\n position: absolute;\n right: 10px;\n top: 9px;\n }\n\n .vipCompareListMoreContent{\n width: 500px;\n .ratioAlt{\n padding: 6px 0;\n font-size: 13px;\n color: #777;\n .vip-compare-alt{\n\n }\n }\n }\n\n }\n }\n "])))
6
+ };
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import "./index.scss";
3
2
  import type { SizeType } from "antd/es/config-provider/SizeContext";
4
3
  interface Props {
5
4
  env?: Global.Env;
package/dist/Buy/index.js CHANGED
@@ -3,7 +3,7 @@ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
3
  import React from 'react';
4
4
  import { Button } from 'antd';
5
5
  import Tool from "../lib/Tool";
6
- import "./index.scss";
6
+ import styles from "./index.css";
7
7
  import VipQr from "./qr";
8
8
  import Platform from "../lib/platform";
9
9
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -49,6 +49,7 @@ var Buy = function Buy(_ref) {
49
49
  };
50
50
  }();
51
51
  var onOpenVipQr = function onOpenVipQr() {
52
+ var _ref3;
52
53
  var userId = Tool.getLocalUserInfo().id;
53
54
  if (Platform.isWechat || Platform.isH5) {
54
55
  Tool.h5Pay({
@@ -73,19 +74,21 @@ var Buy = function Buy(_ref) {
73
74
  Tool.toast('^_^,谢谢购买,祝您发财');
74
75
  }
75
76
  }),
76
- width: Math.min(520, window.innerWidth * 0.95)
77
+ width: Math.min(520, ((_ref3 = global || window) === null || _ref3 === void 0 ? void 0 : _ref3.innerWidth) * 0.95)
77
78
  });
78
79
  // 广播,点击了 购买;
79
80
  Tool.event.run('vip-buy-click');
80
81
  };
81
- return /*#__PURE__*/_jsx(Button, {
82
- type: "primary",
83
- size: buttonSmall,
84
- disabled: disabled,
85
- onClick: function onClick() {
86
- return onBuy();
87
- },
88
- children: title
82
+ return /*#__PURE__*/_jsx(styles.Buy, {
83
+ children: /*#__PURE__*/_jsx(Button, {
84
+ type: "primary",
85
+ size: buttonSmall,
86
+ disabled: disabled,
87
+ onClick: function onClick() {
88
+ return onBuy();
89
+ },
90
+ children: title
91
+ })
89
92
  });
90
93
  };
91
94
  export default Buy;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ BuyQr: 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
+ BuyQr: styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ktv-ai-vipQr{\n position: relative;\n text-align: center;\n display: flex;\n flex-direction: column;\n height: 100%;\n .qrImage{\n width: 200px;\n height: 200px;\n margin: 20px auto 10px;\n img{\n display: block;\n width: 100%;\n max-width: 100%;\n }\n }\n .price{\n font-size: 16px;\n strong{\n font-size: 20px;\n color: #F60;\n }\n .multiply{\n display: inline-block;\n margin: 0 10px;\n color: #AAA;\n }\n .productCount{\n font-size: 20px;\n }\n .equal{\n transform: rotate(90deg);\n display: inline-block;\n margin: 0 10px;\n color: #AAA;\n }\n .moneyAll{\n color: #F60;\n font-size: 32px;\n }\n }\n .alt{\n color: #999;\n font-size: 13px;\n .wechatIcon{\n color: #0bc160;\n }\n }\n .altInH5{\n padding: 8px 0 0;\n color: #C00;\n font-size: 15px;\n .toFriend{\n font-size: 13px;\n color: #888;\n padding: 0;\n margin: 0;\n }\n }\n\n .payResult{\n .ant-result{\n padding: 0 30px 30px;\n }\n .ant-result-icon{\n display: none;\n }\n }\n }\n\n "])))
6
+ };
package/dist/Buy/qr.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import './qr.scss';
3
2
  interface Props {
4
3
  env?: Global.Env;
5
4
  productKind: string;
package/dist/Buy/qr.js CHANGED
@@ -5,9 +5,10 @@ import { CloseOutlined, PauseOutlined, WechatOutlined } from '@ant-design/icons'
5
5
  import { useRequest } from '@umijs/hooks';
6
6
  import * as TradeController from "../service/api/TradeController";
7
7
  import * as VipController from "../service/api/VipController";
8
+ import QRCode from 'qrcode.react';
8
9
  import Tool from "../lib/Tool";
9
10
  import PageContentWarp from "../UI/PageContentWarp";
10
- import "./qr.scss";
11
+ import styles from "./qr.css";
11
12
  import Platform from "../lib/platform";
12
13
  import { jsxs as _jsxs } from "react/jsx-runtime";
13
14
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -79,7 +80,8 @@ var VipQr = function VipQr(_ref) {
79
80
  } else {}
80
81
  } else {}
81
82
  setOrderPayInfo(result);
82
- setPayQrImageUrl(Tool.makeQrUrl(result.codeUrl || result.mWebUrl, '#0bc160'));
83
+ // setPayQrImageUrl( Tool.makeQrUrl( result.codeUrl || result.mWebUrl, '#0bc160') );
84
+ setPayQrImageUrl(result.codeUrl || result.mWebUrl);
83
85
  // 五秒后自动弹出;
84
86
  setTimeout(function () {
85
87
  setPayResult(true);
@@ -105,81 +107,83 @@ var VipQr = function VipQr(_ref) {
105
107
  loading = _useRequest2.loading,
106
108
  run = _useRequest2.run,
107
109
  error = _useRequest2.error;
108
- return /*#__PURE__*/_jsxs(PageContentWarp, {
109
- loading: loading || loadingPay,
110
- error: error || errorPay
111
- // title="购买会员"
112
- ,
113
- onReload: function onReload() {
114
- return run();
115
- },
116
- className: "ktv-ai-vipQr",
117
- children: [/*#__PURE__*/_jsxs("h2", {
118
- children: ["\u8D2D\u4E70\u4F1A\u5458\uFF1A", detailData.productName || detailData.productType]
119
- }), /*#__PURE__*/_jsxs("div", {
120
- className: "price",
121
- children: [/*#__PURE__*/_jsx("small", {
122
- children: "\uFFE5"
123
- }), /*#__PURE__*/_jsx("strong", {
124
- children: detailData.price
125
- }), /*#__PURE__*/_jsx("small", {
126
- children: "\u5143"
127
- }), " / ", detailData.monthTitle, productCount > 1 && /*#__PURE__*/_jsxs(_Fragment, {
128
- children: [/*#__PURE__*/_jsx(CloseOutlined, {
129
- className: "multiply"
130
- }), /*#__PURE__*/_jsx("span", {
131
- className: "productCount",
132
- children: productCount
133
- }), /*#__PURE__*/_jsx(PauseOutlined, {
134
- className: "equal"
135
- }), /*#__PURE__*/_jsx("span", {
136
- className: "moneyAll",
137
- children: parseFloat(Tool.math.multiply(detailData.price, productCount).toFixed(0))
110
+ return /*#__PURE__*/_jsx(styles.BuyQr, {
111
+ children: /*#__PURE__*/_jsxs(PageContentWarp, {
112
+ loading: loading || loadingPay,
113
+ error: error || errorPay
114
+ // title="购买会员"
115
+ ,
116
+ onReload: function onReload() {
117
+ return run();
118
+ },
119
+ className: "ktv-ai-vipQr",
120
+ children: [/*#__PURE__*/_jsxs("h2", {
121
+ children: ["\u8D2D\u4E70\u4F1A\u5458\uFF1A", detailData.productName || detailData.productType]
122
+ }), /*#__PURE__*/_jsxs("div", {
123
+ className: "price",
124
+ children: [/*#__PURE__*/_jsx("small", {
125
+ children: "\uFFE5"
126
+ }), /*#__PURE__*/_jsx("strong", {
127
+ children: detailData.price
138
128
  }), /*#__PURE__*/_jsx("small", {
139
- className: "yen",
140
129
  children: "\u5143"
141
- })]
142
- })]
143
- }), /*#__PURE__*/_jsx("div", {
144
- className: "qrImage",
145
- children: payQrImageUrl && /*#__PURE__*/_jsx("img", {
146
- src: payQrImageUrl,
147
- alt: ""
148
- })
149
- }), Platform.isH5 ? /*#__PURE__*/_jsxs("div", {
150
- className: "altInH5",
151
- children: ["\u957F\u6309\u4E8C\u7EF4\u7801\uFF0C\u53EF\u8BC6\u522B\u4E8C\u7EF4\u7801\u652F\u4ED8", /*#__PURE__*/_jsx("p", {
152
- className: "toFriend",
153
- children: "\u6216\u8005\u4FDD\u5B58\u56FE\u7247\u8BA9\u670B\u53CB\u626B\u7801\u4EE3\u4ED8"
154
- })]
155
- }) : /*#__PURE__*/_jsxs("div", {
156
- className: "alt",
157
- children: ["\u8BF7\u7528 ", /*#__PURE__*/_jsx(WechatOutlined, {
158
- className: "wechatIcon"
159
- }), " \u5FAE\u4FE1 \u626B\u7801\u652F\u4ED8 ", /*#__PURE__*/_jsx(Divider, {
160
- type: "vertical"
161
- }), " \u4E5F\u53EF\u4EE5\u8BA9\u670B\u53CB\u626B\u7801\u4EE3\u4ED8"]
162
- }), payResult && /*#__PURE__*/_jsxs("div", {
163
- className: "payResult",
164
- children: [/*#__PURE__*/_jsx(Divider, {}), /*#__PURE__*/_jsx(Result, {
165
- title: "\u662F\u5426\u5DF2\u7ECF\u8D2D\u4E70\u6210\u529F\uFF1F",
166
- subTitle: "\u8D2D\u4E70\u6210\u529F\u540E\uFF0C\u53EF\u4EE5\u5728\u201C\u6211\u7684\u201D\u9875\u9762\u67E5\u770B",
167
- extra: /*#__PURE__*/_jsxs(Space, {
168
- children: [/*#__PURE__*/_jsx(Button, {
169
- type: "primary",
170
- onClick: function onClick() {
171
- return onHandlePaySuccess();
172
- },
173
- children: "\u5DF2\u7ECF\u4ED8\u6B3E\u6210\u529F"
174
- }), /*#__PURE__*/_jsx(Button, {
175
- onClick: function onClick() {
176
- return setPayResult(false);
177
- },
178
- children: "\u672A\u4ED8\u6B3E"
130
+ }), " / ", detailData.monthTitle, productCount > 1 && /*#__PURE__*/_jsxs(_Fragment, {
131
+ children: [/*#__PURE__*/_jsx(CloseOutlined, {
132
+ className: "multiply"
133
+ }), /*#__PURE__*/_jsx("span", {
134
+ className: "productCount",
135
+ children: productCount
136
+ }), /*#__PURE__*/_jsx(PauseOutlined, {
137
+ className: "equal"
138
+ }), /*#__PURE__*/_jsx("span", {
139
+ className: "moneyAll",
140
+ children: parseFloat(Tool.math.multiply(detailData.price, productCount).toFixed(0))
141
+ }), /*#__PURE__*/_jsx("small", {
142
+ className: "yen",
143
+ children: "\u5143"
179
144
  })]
145
+ })]
146
+ }), /*#__PURE__*/_jsx("div", {
147
+ className: "qrImage",
148
+ children: payQrImageUrl && /*#__PURE__*/_jsx(QRCode, {
149
+ value: payQrImageUrl,
150
+ fgColor: "#0bc160"
180
151
  })
152
+ }), Platform.isH5 ? /*#__PURE__*/_jsxs("div", {
153
+ className: "altInH5",
154
+ children: ["\u957F\u6309\u4E8C\u7EF4\u7801\uFF0C\u53EF\u8BC6\u522B\u4E8C\u7EF4\u7801\u652F\u4ED8", /*#__PURE__*/_jsx("p", {
155
+ className: "toFriend",
156
+ children: "\u6216\u8005\u4FDD\u5B58\u56FE\u7247\u8BA9\u670B\u53CB\u626B\u7801\u4EE3\u4ED8"
157
+ })]
158
+ }) : /*#__PURE__*/_jsxs("div", {
159
+ className: "alt",
160
+ children: ["\u8BF7\u7528 ", /*#__PURE__*/_jsx(WechatOutlined, {
161
+ className: "wechatIcon"
162
+ }), " \u5FAE\u4FE1 \u626B\u7801\u652F\u4ED8 ", /*#__PURE__*/_jsx(Divider, {
163
+ type: "vertical"
164
+ }), " \u4E5F\u53EF\u4EE5\u8BA9\u670B\u53CB\u626B\u7801\u4EE3\u4ED8"]
165
+ }), payResult && /*#__PURE__*/_jsxs("div", {
166
+ className: "payResult",
167
+ children: [/*#__PURE__*/_jsx(Divider, {}), /*#__PURE__*/_jsx(Result, {
168
+ title: "\u662F\u5426\u5DF2\u7ECF\u8D2D\u4E70\u6210\u529F\uFF1F",
169
+ subTitle: "\u8D2D\u4E70\u6210\u529F\u540E\uFF0C\u53EF\u4EE5\u5728\u201C\u6211\u7684\u201D\u9875\u9762\u67E5\u770B",
170
+ extra: /*#__PURE__*/_jsxs(Space, {
171
+ children: [/*#__PURE__*/_jsx(Button, {
172
+ type: "primary",
173
+ onClick: function onClick() {
174
+ return onHandlePaySuccess();
175
+ },
176
+ children: "\u5DF2\u7ECF\u4ED8\u6B3E\u6210\u529F"
177
+ }), /*#__PURE__*/_jsx(Button, {
178
+ onClick: function onClick() {
179
+ return setPayResult(false);
180
+ },
181
+ children: "\u672A\u4ED8\u6B3E"
182
+ })]
183
+ })
184
+ })]
181
185
  })]
182
- })]
186
+ })
183
187
  });
184
188
  };
185
189
  export default VipQr;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ DrawerDialog: 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
+ DrawerDialog: styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ktv-ai-drawerDialog {\n .ant-drawer-body {\n background-color: #f5f5f5;\n }\n &.light{\n .ant-drawer-body {\n background-color: #FFF;\n }\n }\n }\n "])))
6
+ };
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import './DialogDrawer.scss';
3
2
  interface Props {
4
3
  onClose?: any;
5
4
  content?: any;
@@ -2,10 +2,11 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
2
  import { Drawer, ConfigProvider } from 'antd';
3
3
  import React, { useState, useEffect } from 'react';
4
4
  import Tool from "../lib/Tool";
5
- import "./DialogDrawer.scss";
5
+ import styles from "./DialogDrawer.css";
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  // 抽屉
8
8
  var DialogDrawer = function DialogDrawer(props) {
9
+ var _window;
9
10
  var state = Tool.extend({
10
11
  id: '',
11
12
  title: '提示',
@@ -20,7 +21,7 @@ var DialogDrawer = function DialogDrawer(props) {
20
21
  }, props);
21
22
 
22
23
  // 宽度
23
- state.width = Math.min(state.width, window.innerWidth);
24
+ state.width = Math.min(state.width, (_window = window) === null || _window === void 0 ? void 0 : _window.innerWidth);
24
25
 
25
26
  // 管理 显示隐藏
26
27
  var _useState = useState(true),
@@ -50,17 +51,19 @@ var DialogDrawer = function DialogDrawer(props) {
50
51
  colorPrimary: '#722ED1'
51
52
  }
52
53
  },
53
- children: /*#__PURE__*/_jsx(Drawer, {
54
- className: "ktv-ai-drawerDialog ".concat(state.bgTheme, " "),
55
- title: state.title,
56
- placement: state.placement,
57
- closable: state.closable,
58
- onClose: function onClose() {
59
- return _onClose();
60
- },
61
- visible: visible,
62
- width: state.width,
63
- children: props.content
54
+ children: /*#__PURE__*/_jsx(styles.DrawerDialog, {
55
+ children: /*#__PURE__*/_jsx(Drawer, {
56
+ className: "ktv-ai-drawerDialog ".concat(state.bgTheme, " "),
57
+ title: state.title,
58
+ placement: state.placement,
59
+ closable: state.closable,
60
+ onClose: function onClose() {
61
+ return _onClose();
62
+ },
63
+ visible: visible,
64
+ width: state.width,
65
+ children: props.content
66
+ })
64
67
  })
65
68
  });
66
69
  };
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ DialogDrawerFooter: 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
+ DialogDrawerFooter: styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .warp{\n position: absolute;\n left: 0;\n bottom: 0;\n z-index: 20;\n width: 100%;\n height: 56px;\n background-color: #FFF;\n line-height: 56px;\n text-align: right;\n }\n .warpChildren{\n padding: 0 20px 0 0;\n }\n .pos{\n height: 56px;\n }\n "])))
6
+ };
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import './DialogDrawerFooter.scss';
3
2
  interface Props {
4
3
  children: React.ReactNode;
5
4
  }