component-shipinlv 0.0.1

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 (100) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +4 -0
  3. package/dist/AuthClient/index.d.ts +10 -0
  4. package/dist/AuthClient/index.js +24 -0
  5. package/dist/AuthClient/login-reg.d.ts +9 -0
  6. package/dist/AuthClient/login-reg.js +62 -0
  7. package/dist/AuthClient/login-reg.less +13 -0
  8. package/dist/AuthClient/login.d.ts +7 -0
  9. package/dist/AuthClient/login.js +159 -0
  10. package/dist/AuthClient/login.less +52 -0
  11. package/dist/AuthClient/qr/index.d.ts +13 -0
  12. package/dist/AuthClient/qr/index.js +315 -0
  13. package/dist/AuthClient/qr/index.less +84 -0
  14. package/dist/AuthClient/qr/typings.d.ts +22 -0
  15. package/dist/AuthClient/qr/ws.d.ts +20 -0
  16. package/dist/AuthClient/qr/ws.js +253 -0
  17. package/dist/AuthClient/reg.d.ts +7 -0
  18. package/dist/AuthClient/reg.js +170 -0
  19. package/dist/AuthClient/reg.less +3 -0
  20. package/dist/Buy/index.d.ts +14 -0
  21. package/dist/Buy/index.js +91 -0
  22. package/dist/Buy/index.less +26 -0
  23. package/dist/Buy/qr.d.ts +11 -0
  24. package/dist/Buy/qr.js +185 -0
  25. package/dist/Buy/qr.less +69 -0
  26. package/dist/Login/index.d.ts +2 -0
  27. package/dist/Login/index.js +5 -0
  28. package/dist/Product/index.d.ts +4 -0
  29. package/dist/Product/index.js +34 -0
  30. package/dist/Product/index.less +84 -0
  31. package/dist/UI/DialogDrawer.d.ts +8 -0
  32. package/dist/UI/DialogDrawer.js +67 -0
  33. package/dist/UI/DialogDrawer.less +10 -0
  34. package/dist/UI/DialogDrawerFooter.d.ts +7 -0
  35. package/dist/UI/DialogDrawerFooter.js +23 -0
  36. package/dist/UI/DialogDrawerFooter.less +19 -0
  37. package/dist/UI/LoadError.d.ts +10 -0
  38. package/dist/UI/LoadError.js +37 -0
  39. package/dist/UI/LoadError.less +18 -0
  40. package/dist/UI/PageContentWarp.d.ts +16 -0
  41. package/dist/UI/PageContentWarp.js +46 -0
  42. package/dist/UI/PageContentWarp.less +11 -0
  43. package/dist/VipCompare/commend.d.ts +7 -0
  44. package/dist/VipCompare/commend.js +29 -0
  45. package/dist/VipCompare/commend.less +7 -0
  46. package/dist/VipCompare/index.d.ts +9 -0
  47. package/dist/VipCompare/index.js +320 -0
  48. package/dist/VipCompare/index.less +26 -0
  49. package/dist/component/product-dict.d.ts +10 -0
  50. package/dist/component/product-dict.js +11 -0
  51. package/dist/component/product-type.d.ts +6 -0
  52. package/dist/component/product-type.js +19 -0
  53. package/dist/component/websocket/index.d.ts +22 -0
  54. package/dist/component/websocket/index.js +139 -0
  55. package/dist/config/apiUrls.d.ts +9 -0
  56. package/dist/config/apiUrls.js +25 -0
  57. package/dist/index.d.ts +5 -0
  58. package/dist/index.js +5 -0
  59. package/dist/lib/Tool.d.ts +201 -0
  60. package/dist/lib/Tool.js +1086 -0
  61. package/dist/lib/call-mini-url.d.ts +2 -0
  62. package/dist/lib/call-mini-url.js +8 -0
  63. package/dist/lib/getApiUrl.d.ts +5 -0
  64. package/dist/lib/getApiUrl.js +56 -0
  65. package/dist/lib/goAuth.d.ts +1 -0
  66. package/dist/lib/goAuth.js +28 -0
  67. package/dist/lib/js-error.d.ts +2 -0
  68. package/dist/lib/js-error.js +27 -0
  69. package/dist/lib/notification.d.ts +9 -0
  70. package/dist/lib/notification.js +42 -0
  71. package/dist/lib/platform.d.ts +12 -0
  72. package/dist/lib/platform.js +48 -0
  73. package/dist/lib/postMessage.d.ts +3 -0
  74. package/dist/lib/postMessage.js +8 -0
  75. package/dist/lib/request.d.ts +3 -0
  76. package/dist/lib/request.js +97 -0
  77. package/dist/service/api/AuthController.d.ts +16 -0
  78. package/dist/service/api/AuthController.js +75 -0
  79. package/dist/service/api/JsErrorController.d.ts +5 -0
  80. package/dist/service/api/JsErrorController.js +27 -0
  81. package/dist/service/api/ProductController.d.ts +7 -0
  82. package/dist/service/api/ProductController.js +53 -0
  83. package/dist/service/api/TradeController.d.ts +7 -0
  84. package/dist/service/api/TradeController.js +52 -0
  85. package/dist/service/api/UserController.d.ts +2 -0
  86. package/dist/service/api/UserController.js +52 -0
  87. package/dist/service/api/VipController.d.ts +6 -0
  88. package/dist/service/api/VipController.js +50 -0
  89. package/dist/service/typing.d.ts +12 -0
  90. package/dist/typings/Product.d.ts +25 -0
  91. package/dist/typings/Product.js +0 -0
  92. package/dist/typings/Trade.d.ts +29 -0
  93. package/dist/typings/Trade.js +0 -0
  94. package/dist/typings/User.d.ts +54 -0
  95. package/dist/typings/User.js +0 -0
  96. package/dist/typings/Vip.d.ts +15 -0
  97. package/dist/typings/Vip.js +0 -0
  98. package/dist/typings.d.ts +66 -0
  99. package/dist/window.d.ts +9 -0
  100. package/package.json +88 -0
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import "./reg.less";
3
+ interface Props {
4
+ onSuccess: () => void;
5
+ }
6
+ declare const Reg: React.FC<Props>;
7
+ export default Reg;
@@ -0,0 +1,170 @@
1
+ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
+ import React from 'react';
6
+ import { LockOutlined, UserOutlined, EyeTwoTone, EyeInvisibleOutlined } from '@ant-design/icons';
7
+ import { Input, Button, Form } from 'antd';
8
+ import Tool from "../lib/Tool";
9
+ import "./reg.less";
10
+ import { useRequest } from "@umijs/hooks";
11
+ import * as AuthController from "../service/api/AuthController";
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { jsxs as _jsxs } from "react/jsx-runtime";
14
+ var formItemLayout = {
15
+ labelCol: {
16
+ xs: {
17
+ span: 24
18
+ },
19
+ sm: {
20
+ span: 5
21
+ }
22
+ },
23
+ wrapperCol: {
24
+ xs: {
25
+ span: 24
26
+ },
27
+ sm: {
28
+ span: 19
29
+ }
30
+ }
31
+ };
32
+ var tailFormItemLayout = {
33
+ wrapperCol: {
34
+ xs: {
35
+ span: 24,
36
+ offset: 5
37
+ },
38
+ sm: {
39
+ span: 16,
40
+ offset: 5
41
+ }
42
+ }
43
+ };
44
+ var Reg = function Reg(_ref) {
45
+ var _ref$onSuccess = _ref.onSuccess,
46
+ onSuccess = _ref$onSuccess === void 0 ? function () {} : _ref$onSuccess;
47
+ var _Form$useForm = Form.useForm(),
48
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
49
+ form = _Form$useForm2[0];
50
+ var _useRequest = useRequest(function (data) {
51
+ return AuthController.reg(_objectSpread(_objectSpread({}, data), {}, {
52
+ inviteUserId: Tool.getInviteUserId()
53
+ }));
54
+ }, {
55
+ manual: true,
56
+ onSuccess: function onSuccess(result) {
57
+ loginSuccess(result);
58
+ }
59
+ }),
60
+ loading = _useRequest.loading,
61
+ run = _useRequest.run;
62
+ var loginSuccess = function loginSuccess(data) {
63
+ //登入用户名存在本地;
64
+ Tool.setLocalUserInfo(_objectSpread(_objectSpread({}, data), {}, {
65
+ isLogin: true
66
+ }));
67
+ Tool.toast('登录成功');
68
+ Tool.event.run('user-info');
69
+ onSuccess();
70
+ };
71
+ var onFinish = /*#__PURE__*/function () {
72
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
73
+ var values,
74
+ _args = arguments;
75
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
76
+ while (1) switch (_context.prev = _context.next) {
77
+ case 0:
78
+ values = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
79
+ run(values);
80
+ case 2:
81
+ case "end":
82
+ return _context.stop();
83
+ }
84
+ }, _callee);
85
+ }));
86
+ return function onFinish() {
87
+ return _ref2.apply(this, arguments);
88
+ };
89
+ }();
90
+ return /*#__PURE__*/_jsx("section", {
91
+ className: "authClientReg",
92
+ children: /*#__PURE__*/_jsxs(Form, {
93
+ disabled: loading,
94
+ form: form,
95
+ onFinish: onFinish,
96
+ autoComplete: "off",
97
+ children: [/*#__PURE__*/_jsx(Form.Item, _objectSpread(_objectSpread({
98
+ label: "\u8D26\u53F7"
99
+ }, formItemLayout), {}, {
100
+ name: "accountName",
101
+ rules: [{
102
+ required: true,
103
+ message: '请输入'
104
+ }
105
+ // {
106
+ // pattern: /^([a-z0-9]+[_\-.]?)*[a-z0-9]+@([a-z0-9]+[_\-.]?)*[a-z0-9]+\.[a-z]{2,10}$/i,
107
+ // message: '这似乎不是一个电子邮箱'
108
+ // },
109
+ ],
110
+ children: /*#__PURE__*/_jsx(Input, {
111
+ placeholder: "\u8D26\u53F7",
112
+ prefix: /*#__PURE__*/_jsx(UserOutlined, {
113
+ className: "input-prefix-icon"
114
+ })
115
+ })
116
+ })), /*#__PURE__*/_jsx(Form.Item, _objectSpread(_objectSpread({}, formItemLayout), {}, {
117
+ label: "\u5BC6\u7801",
118
+ name: "password",
119
+ rules: [{
120
+ required: true,
121
+ message: '请输入密码!'
122
+ }, {
123
+ min: 6,
124
+ message: '密码最短6位哦'
125
+ }, {
126
+ max: 60,
127
+ message: '密码最长60位哦'
128
+ }],
129
+ children: /*#__PURE__*/_jsx(Input.Password, {
130
+ prefix: /*#__PURE__*/_jsx(LockOutlined, {
131
+ className: "input-prefix-icon"
132
+ }),
133
+ type: "password",
134
+ placeholder: "\u8F93\u5165\u60A8\u7684\u5BC6\u7801",
135
+ iconRender: function iconRender(visible) {
136
+ return visible ? /*#__PURE__*/_jsx(EyeTwoTone, {}) : /*#__PURE__*/_jsx(EyeInvisibleOutlined, {});
137
+ }
138
+ })
139
+ })), /*#__PURE__*/_jsx(Form.Item, _objectSpread(_objectSpread({}, formItemLayout), {}, {
140
+ label: "\u786E\u8BA4\u5BC6\u7801",
141
+ name: "inviteId",
142
+ rules: [{
143
+ required: true,
144
+ message: '请输入推荐码'
145
+ }, {
146
+ max: 60,
147
+ message: '密码最长60位哦'
148
+ }],
149
+ children: /*#__PURE__*/_jsx(Input.Password, {
150
+ type: "password",
151
+ prefix: /*#__PURE__*/_jsx(LockOutlined, {
152
+ className: "input-prefix-icon"
153
+ }),
154
+ placeholder: "\u628A\u4E0A\u9762\u7684\u5BC6\u7801\u518D\u8F93\u5165\u4E00\u6B21"
155
+ })
156
+ })), /*#__PURE__*/_jsx(Form.Item, _objectSpread(_objectSpread({}, tailFormItemLayout), {}, {
157
+ children: /*#__PURE__*/_jsx("div", {
158
+ children: /*#__PURE__*/_jsx(Button, {
159
+ type: "primary",
160
+ loading: loading,
161
+ htmlType: "submit",
162
+ icon: /*#__PURE__*/_jsx(UserOutlined, {}),
163
+ children: "\u6CE8\u518C"
164
+ })
165
+ })
166
+ }))]
167
+ })
168
+ });
169
+ };
170
+ export default Reg;
@@ -0,0 +1,3 @@
1
+ .authClientReg{
2
+
3
+ }
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import "./index.less";
3
+ import type { SizeType } from "antd/es/config-provider/SizeContext";
4
+ interface Props {
5
+ env?: Global.Env;
6
+ vipId: number;
7
+ productCount: number;
8
+ productKind: Global.ProductKind;
9
+ buttonSmall?: SizeType;
10
+ title?: React.ReactNode;
11
+ disabled?: boolean;
12
+ }
13
+ declare const Buy: React.FC<Props>;
14
+ export default Buy;
@@ -0,0 +1,91 @@
1
+ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
+ import React from 'react';
4
+ import { Button } from 'antd';
5
+ import Tool from "../lib/Tool";
6
+ import "./index.less";
7
+ import VipQr from "./qr";
8
+ import Platform from "../lib/platform";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ var Buy = function Buy(_ref) {
11
+ var _ref$env = _ref.env,
12
+ env = _ref$env === void 0 ? 'prod' : _ref$env,
13
+ _ref$buttonSmall = _ref.buttonSmall,
14
+ buttonSmall = _ref$buttonSmall === void 0 ? 'small' : _ref$buttonSmall,
15
+ _ref$productKind = _ref.productKind,
16
+ productKind = _ref$productKind === void 0 ? 'vip' : _ref$productKind,
17
+ _ref$vipId = _ref.vipId,
18
+ vipId = _ref$vipId === void 0 ? 0 : _ref$vipId,
19
+ _ref$productCount = _ref.productCount,
20
+ productCount = _ref$productCount === void 0 ? 1 : _ref$productCount,
21
+ _ref$title = _ref.title,
22
+ title = _ref$title === void 0 ? '购买' : _ref$title,
23
+ _ref$disabled = _ref.disabled,
24
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled;
25
+ var onBuy = /*#__PURE__*/function () {
26
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
27
+ var userInfo;
28
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
29
+ while (1) switch (_context.prev = _context.next) {
30
+ case 0:
31
+ // 先要登录;
32
+ userInfo = Tool.getLocalUserInfo();
33
+ if (userInfo.isLogin) {
34
+ _context.next = 4;
35
+ break;
36
+ }
37
+ console.log("not login");
38
+ return _context.abrupt("return", Tool.onLogin());
39
+ case 4:
40
+ onOpenVipQr();
41
+ case 5:
42
+ case "end":
43
+ return _context.stop();
44
+ }
45
+ }, _callee);
46
+ }));
47
+ return function onBuy() {
48
+ return _ref2.apply(this, arguments);
49
+ };
50
+ }();
51
+ var onOpenVipQr = function onOpenVipQr() {
52
+ var userId = Tool.getLocalUserInfo().id;
53
+ if (Platform.isWechat || Platform.isH5) {
54
+ Tool.h5Pay({
55
+ productKind: productKind,
56
+ // 'vip',
57
+ productId: vipId,
58
+ productCount: productCount,
59
+ userId: userId,
60
+ wechatAppId: Tool.getLocalSiteInfo().wechatAppId
61
+ });
62
+ return;
63
+ }
64
+ var dialog = Tool.drawer({
65
+ title: '购买会员',
66
+ content: /*#__PURE__*/_jsx(VipQr, {
67
+ env: env,
68
+ productKind: productKind,
69
+ vipId: vipId,
70
+ productCount: productCount,
71
+ onHandlePaySuccess: function onHandlePaySuccess() {
72
+ dialog.destroy();
73
+ Tool.toast('^_^,谢谢购买,祝您发财');
74
+ }
75
+ }),
76
+ width: Math.min(520, window.innerWidth * 0.95)
77
+ });
78
+ // 广播,点击了 购买;
79
+ Tool.event.run('vip-buy-click');
80
+ };
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
89
+ });
90
+ };
91
+ export default Buy;
@@ -0,0 +1,26 @@
1
+ .ktv-ai-vip-compare{
2
+ .vip-compare-price{
3
+ small{
4
+ color: #888;
5
+ vertical-align: middle;
6
+ }
7
+ }
8
+ .listMore{
9
+ position: absolute;
10
+ right: 10px;
11
+ top: 9px;
12
+ }
13
+
14
+ .vipCompareListMoreContent{
15
+ width: 500px;
16
+ .ratioAlt{
17
+ padding: 6px 0;
18
+ font-size: 13px;
19
+ color: #777;
20
+ .vip-compare-alt{
21
+
22
+ }
23
+ }
24
+ }
25
+
26
+ }
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import './qr.less';
3
+ interface Props {
4
+ env?: Global.Env;
5
+ productKind: string;
6
+ vipId: number;
7
+ productCount: number;
8
+ onHandlePaySuccess: () => void;
9
+ }
10
+ declare const VipQr: React.FC<Props>;
11
+ export default VipQr;
package/dist/Buy/qr.js ADDED
@@ -0,0 +1,185 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import React, { useState } from 'react';
3
+ import { Result, Button, Space, Divider } from 'antd';
4
+ import { CloseOutlined, PauseOutlined, WechatOutlined } from '@ant-design/icons';
5
+ import { useRequest } from '@umijs/hooks';
6
+ import * as TradeController from "../service/api/TradeController";
7
+ import * as VipController from "../service/api/VipController";
8
+ import Tool from "../lib/Tool";
9
+ import PageContentWarp from "../UI/PageContentWarp";
10
+ import "./qr.less";
11
+ import Platform from "../lib/platform";
12
+ import { jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ import { Fragment as _Fragment } from "react/jsx-runtime";
15
+ var VipQr = function VipQr(_ref) {
16
+ var _ref$env = _ref.env,
17
+ env = _ref$env === void 0 ? 'prod' : _ref$env,
18
+ _ref$productKind = _ref.productKind,
19
+ productKind = _ref$productKind === void 0 ? 'vip' : _ref$productKind,
20
+ _ref$productCount = _ref.productCount,
21
+ productCount = _ref$productCount === void 0 ? 1 : _ref$productCount,
22
+ _ref$vipId = _ref.vipId,
23
+ vipId = _ref$vipId === void 0 ? 0 : _ref$vipId,
24
+ _ref$onHandlePaySucce = _ref.onHandlePaySuccess,
25
+ onHandlePaySuccess = _ref$onHandlePaySucce === void 0 ? function () {} : _ref$onHandlePaySucce;
26
+ var _useState = useState(Tool.getLocalUserInfo()),
27
+ _useState2 = _slicedToArray(_useState, 1),
28
+ userInfo = _useState2[0];
29
+ var _useState3 = useState(false),
30
+ _useState4 = _slicedToArray(_useState3, 2),
31
+ payResult = _useState4[0],
32
+ setPayResult = _useState4[1];
33
+ var _useState5 = useState({
34
+ codeUrl: '',
35
+ mWebUrl: ''
36
+ }),
37
+ _useState6 = _slicedToArray(_useState5, 2),
38
+ orderPayInfo = _useState6[0],
39
+ setOrderPayInfo = _useState6[1];
40
+ var _useState7 = useState(''),
41
+ _useState8 = _slicedToArray(_useState7, 2),
42
+ payQrImageUrl = _useState8[0],
43
+ setPayQrImageUrl = _useState8[1];
44
+ var _useState9 = useState({
45
+ id: 0,
46
+ marketPrice: 0,
47
+ month: 0,
48
+ monthTitle: '',
49
+ price: 0,
50
+ productType: '',
51
+ productName: '',
52
+ ratioDownPercent1: 0,
53
+ ratioDownPercent2: 0,
54
+ alt: '',
55
+ recommend: 0
56
+ }),
57
+ _useState10 = _slicedToArray(_useState9, 2),
58
+ detailData = _useState10[0],
59
+ setDetailData = _useState10[1];
60
+ // 允许帮别人支付,只认码; 不认支付的小程序
61
+
62
+ var _useRequest = useRequest(function () {
63
+ return TradeController.create({
64
+ productKind: productKind,
65
+ productTypeId: vipId,
66
+ productCount: productCount,
67
+ userId: Tool.getLocalUserInfo().id,
68
+ payType: 'NATIVE' //Platform.isH5 ? 'MWEB' : 'NATIVE',
69
+ }, {
70
+ env: env
71
+ });
72
+ }, {
73
+ manual: true,
74
+ onSuccess: function onSuccess(result) {
75
+ console.log('re 1', result);
76
+ if (Platform.isH5) {
77
+ if (Platform.isWechat) {
78
+ // document.location.href = result.mWebUrl;
79
+ } else {}
80
+ } else {}
81
+ setOrderPayInfo(result);
82
+ setPayQrImageUrl(Tool.makeQrUrl(result.codeUrl || result.mWebUrl, '#0bc160'));
83
+ // 五秒后自动弹出;
84
+ setTimeout(function () {
85
+ setPayResult(true);
86
+ }, 20e3);
87
+ }
88
+ }),
89
+ loadingPay = _useRequest.loading,
90
+ runPay = _useRequest.run,
91
+ errorPay = _useRequest.error;
92
+ var _useRequest2 = useRequest(function () {
93
+ return VipController.detail({
94
+ id: vipId
95
+ }, {
96
+ env: env
97
+ });
98
+ }, {
99
+ onSuccess: function onSuccess(result) {
100
+ runPay();
101
+ console.log('re 1', result);
102
+ setDetailData(result);
103
+ }
104
+ }),
105
+ loading = _useRequest2.loading,
106
+ run = _useRequest2.run,
107
+ 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))
138
+ }), /*#__PURE__*/_jsx("small", {
139
+ className: "yen",
140
+ 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"
179
+ })]
180
+ })
181
+ })]
182
+ })]
183
+ });
184
+ };
185
+ export default VipQr;
@@ -0,0 +1,69 @@
1
+ .ktv-ai-vipQr{
2
+ position: relative;
3
+ text-align: center;
4
+ display: flex;
5
+ flex-direction: column;
6
+ height: 100%;
7
+ .qrImage{
8
+ width: 200px;
9
+ height: 200px;
10
+ margin: 20px auto 10px;
11
+ img{
12
+ display: block;
13
+ width: 100%;
14
+ max-width: 100%;
15
+ }
16
+ }
17
+ .price{
18
+ font-size: 16px;
19
+ strong{
20
+ font-size: 20px;
21
+ color: #F60;
22
+ }
23
+ .multiply{
24
+ display: inline-block;
25
+ margin: 0 10px;
26
+ color: #AAA;
27
+ }
28
+ .productCount{
29
+ font-size: 20px;
30
+ }
31
+ .equal{
32
+ transform: rotate(90deg);
33
+ display: inline-block;
34
+ margin: 0 10px;
35
+ color: #AAA;
36
+ }
37
+ .moneyAll{
38
+ color: #F60;
39
+ font-size: 32px;
40
+ }
41
+ }
42
+ .alt{
43
+ color: #999;
44
+ font-size: 13px;
45
+ .wechatIcon{
46
+ color: #0bc160;
47
+ }
48
+ }
49
+ .altInH5{
50
+ padding: 8px 0 0;
51
+ color: #C00;
52
+ font-size: 15px;
53
+ .toFriend{
54
+ font-size: 13px;
55
+ color: #888;
56
+ padding: 0;
57
+ margin: 0;
58
+ }
59
+ }
60
+
61
+ .payResult{
62
+ .ant-result{
63
+ padding: 0 30px 30px;
64
+ }
65
+ .ant-result-icon{
66
+ display: none;
67
+ }
68
+ }
69
+ }
@@ -0,0 +1,2 @@
1
+ declare const Login: () => void;
2
+ export default Login;
@@ -0,0 +1,5 @@
1
+ import PostMessage from "../lib/postMessage";
2
+ var Login = function Login() {
3
+ PostMessage('login');
4
+ };
5
+ export default Login;
@@ -0,0 +1,4 @@
1
+ declare class Product {
2
+ detail(productType: string): Promise<Product.Detail>;
3
+ }
4
+ export default Product;
@@ -0,0 +1,34 @@
1
+ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
4
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
5
+ import * as ProductController from "../service/api/ProductController";
6
+ var Product = /*#__PURE__*/function () {
7
+ function Product() {
8
+ _classCallCheck(this, Product);
9
+ }
10
+ _createClass(Product, [{
11
+ key: "detail",
12
+ value: function () {
13
+ var _detail = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(productType) {
14
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
15
+ while (1) switch (_context.prev = _context.next) {
16
+ case 0:
17
+ return _context.abrupt("return", ProductController.detail({
18
+ productType: productType
19
+ }));
20
+ case 1:
21
+ case "end":
22
+ return _context.stop();
23
+ }
24
+ }, _callee);
25
+ }));
26
+ function detail(_x) {
27
+ return _detail.apply(this, arguments);
28
+ }
29
+ return detail;
30
+ }()
31
+ }]);
32
+ return Product;
33
+ }();
34
+ export default Product;