component-shipinlv 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +21 -0
- package/README.md +4 -0
- package/dist/AuthClient/index.d.ts +10 -0
- package/dist/AuthClient/index.js +24 -0
- package/dist/AuthClient/login-reg.d.ts +9 -0
- package/dist/AuthClient/login-reg.js +62 -0
- package/dist/AuthClient/login-reg.less +13 -0
- package/dist/AuthClient/login.d.ts +7 -0
- package/dist/AuthClient/login.js +159 -0
- package/dist/AuthClient/login.less +52 -0
- package/dist/AuthClient/qr/index.d.ts +13 -0
- package/dist/AuthClient/qr/index.js +315 -0
- package/dist/AuthClient/qr/index.less +84 -0
- package/dist/AuthClient/qr/typings.d.ts +22 -0
- package/dist/AuthClient/qr/ws.d.ts +20 -0
- package/dist/AuthClient/qr/ws.js +253 -0
- package/dist/AuthClient/reg.d.ts +7 -0
- package/dist/AuthClient/reg.js +170 -0
- package/dist/AuthClient/reg.less +3 -0
- package/dist/Buy/index.d.ts +14 -0
- package/dist/Buy/index.js +91 -0
- package/dist/Buy/index.less +26 -0
- package/dist/Buy/qr.d.ts +11 -0
- package/dist/Buy/qr.js +185 -0
- package/dist/Buy/qr.less +69 -0
- package/dist/Login/index.d.ts +2 -0
- package/dist/Login/index.js +5 -0
- package/dist/Product/index.d.ts +4 -0
- package/dist/Product/index.js +34 -0
- package/dist/Product/index.less +84 -0
- package/dist/UI/DialogDrawer.d.ts +8 -0
- package/dist/UI/DialogDrawer.js +67 -0
- package/dist/UI/DialogDrawer.less +10 -0
- package/dist/UI/DialogDrawerFooter.d.ts +7 -0
- package/dist/UI/DialogDrawerFooter.js +23 -0
- package/dist/UI/DialogDrawerFooter.less +19 -0
- package/dist/UI/LoadError.d.ts +10 -0
- package/dist/UI/LoadError.js +37 -0
- package/dist/UI/LoadError.less +18 -0
- package/dist/UI/PageContentWarp.d.ts +16 -0
- package/dist/UI/PageContentWarp.js +46 -0
- package/dist/UI/PageContentWarp.less +11 -0
- package/dist/VipCompare/commend.d.ts +7 -0
- package/dist/VipCompare/commend.js +29 -0
- package/dist/VipCompare/commend.less +7 -0
- package/dist/VipCompare/index.d.ts +9 -0
- package/dist/VipCompare/index.js +320 -0
- package/dist/VipCompare/index.less +26 -0
- package/dist/component/product-dict.d.ts +10 -0
- package/dist/component/product-dict.js +11 -0
- package/dist/component/product-type.d.ts +6 -0
- package/dist/component/product-type.js +19 -0
- package/dist/component/websocket/index.d.ts +22 -0
- package/dist/component/websocket/index.js +139 -0
- package/dist/config/apiUrls.d.ts +9 -0
- package/dist/config/apiUrls.js +25 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/lib/Tool.d.ts +201 -0
- package/dist/lib/Tool.js +1086 -0
- package/dist/lib/call-mini-url.d.ts +2 -0
- package/dist/lib/call-mini-url.js +8 -0
- package/dist/lib/getApiUrl.d.ts +5 -0
- package/dist/lib/getApiUrl.js +56 -0
- package/dist/lib/goAuth.d.ts +1 -0
- package/dist/lib/goAuth.js +28 -0
- package/dist/lib/js-error.d.ts +2 -0
- package/dist/lib/js-error.js +27 -0
- package/dist/lib/notification.d.ts +9 -0
- package/dist/lib/notification.js +42 -0
- package/dist/lib/platform.d.ts +12 -0
- package/dist/lib/platform.js +48 -0
- package/dist/lib/postMessage.d.ts +3 -0
- package/dist/lib/postMessage.js +8 -0
- package/dist/lib/request.d.ts +3 -0
- package/dist/lib/request.js +97 -0
- package/dist/service/api/AuthController.d.ts +16 -0
- package/dist/service/api/AuthController.js +75 -0
- package/dist/service/api/JsErrorController.d.ts +5 -0
- package/dist/service/api/JsErrorController.js +27 -0
- package/dist/service/api/ProductController.d.ts +7 -0
- package/dist/service/api/ProductController.js +53 -0
- package/dist/service/api/TradeController.d.ts +7 -0
- package/dist/service/api/TradeController.js +52 -0
- package/dist/service/api/UserController.d.ts +2 -0
- package/dist/service/api/UserController.js +52 -0
- package/dist/service/api/VipController.d.ts +6 -0
- package/dist/service/api/VipController.js +50 -0
- package/dist/service/typing.d.ts +12 -0
- package/dist/typings/Product.d.ts +25 -0
- package/dist/typings/Product.js +0 -0
- package/dist/typings/Trade.d.ts +29 -0
- package/dist/typings/Trade.js +0 -0
- package/dist/typings/User.d.ts +54 -0
- package/dist/typings/User.js +0 -0
- package/dist/typings/Vip.d.ts +15 -0
- package/dist/typings/Vip.js +0 -0
- package/dist/typings.d.ts +66 -0
- package/dist/window.d.ts +9 -0
- package/package.json +88 -0
@@ -0,0 +1,84 @@
|
|
1
|
+
.authQrLogin{
|
2
|
+
.loginForm{
|
3
|
+
margin: 0 auto;
|
4
|
+
padding: 0 0 5px 0 ;
|
5
|
+
background-color: rgba(255, 255, 255, 0.75 );
|
6
|
+
border-radius: 6px;
|
7
|
+
}
|
8
|
+
.webTitle{
|
9
|
+
font-weight: normal;
|
10
|
+
font-size: 22px;
|
11
|
+
text-align: center;
|
12
|
+
padding: 0;
|
13
|
+
margin: 6px 0 0 0;
|
14
|
+
line-height: 1em;
|
15
|
+
span{
|
16
|
+
display: inline-block;
|
17
|
+
padding-left: 5px;
|
18
|
+
font-weight: lighter;
|
19
|
+
font-size: 16px;
|
20
|
+
};
|
21
|
+
}
|
22
|
+
.weQrUrlBox{
|
23
|
+
min-height: 240px !important;
|
24
|
+
.weQrUrl{
|
25
|
+
width: 240px;
|
26
|
+
display: block;
|
27
|
+
margin: 10px auto 0;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
.qr{
|
32
|
+
display: block;
|
33
|
+
margin: 12px auto 0;
|
34
|
+
width: 230px;
|
35
|
+
height: 230px;
|
36
|
+
background-repeat: no-repeat;
|
37
|
+
background-size: cover;
|
38
|
+
background-position: center;
|
39
|
+
&.qrAlipay{
|
40
|
+
border: 3px solid #1677ff;
|
41
|
+
}
|
42
|
+
.reTry{
|
43
|
+
font-size: 80px;
|
44
|
+
background-color: rgba( 255, 255, 255, 0.95 );
|
45
|
+
text-align: center;
|
46
|
+
line-height: 210px;
|
47
|
+
height: 100%;
|
48
|
+
a{
|
49
|
+
display: block;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
.alt{
|
54
|
+
padding: 10px 0 0;
|
55
|
+
color: #999;
|
56
|
+
text-align: center;
|
57
|
+
}
|
58
|
+
.altWeb{
|
59
|
+
padding: 16px 0 0;
|
60
|
+
max-width: 300px;
|
61
|
+
margin: 0 auto;
|
62
|
+
.titles{
|
63
|
+
text-align: center;
|
64
|
+
font-weight: bold;
|
65
|
+
}
|
66
|
+
ul{
|
67
|
+
margin: 0 10px;
|
68
|
+
}
|
69
|
+
|
70
|
+
}
|
71
|
+
.percent{
|
72
|
+
width: 100%;
|
73
|
+
position: absolute;
|
74
|
+
overflow: hidden;
|
75
|
+
left: 0;
|
76
|
+
bottom: 0;
|
77
|
+
.warp{
|
78
|
+
height: 4px;
|
79
|
+
background-color: #1677ff;
|
80
|
+
transition: all 1.6s ease-in-out;
|
81
|
+
-webkit-transition: all 1.6s ease-in-out;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
@@ -0,0 +1,67 @@
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
2
|
+
import { Drawer, ConfigProvider } from 'antd';
|
3
|
+
import React, { useState, useEffect } from 'react';
|
4
|
+
import Tool from "../lib/Tool";
|
5
|
+
import "./DialogDrawer.less";
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
7
|
+
// 抽屉
|
8
|
+
var DialogDrawer = function DialogDrawer(props) {
|
9
|
+
var state = Tool.extend({
|
10
|
+
id: '',
|
11
|
+
title: '提示',
|
12
|
+
visible: true,
|
13
|
+
placement: 'right',
|
14
|
+
closable: true,
|
15
|
+
content: '',
|
16
|
+
width: 400,
|
17
|
+
maskClosable: false,
|
18
|
+
onClose: function onClose() {},
|
19
|
+
bgTheme: '' // 'light' , "",
|
20
|
+
}, props);
|
21
|
+
|
22
|
+
// 宽度
|
23
|
+
state.width = Math.min(state.width, window.innerWidth);
|
24
|
+
|
25
|
+
// 管理 显示隐藏
|
26
|
+
var _useState = useState(true),
|
27
|
+
_useState2 = _slicedToArray(_useState, 2),
|
28
|
+
visible = _useState2[0],
|
29
|
+
setVisible = _useState2[1];
|
30
|
+
|
31
|
+
// 关闭
|
32
|
+
var _onClose = function onClose() {
|
33
|
+
setVisible(false);
|
34
|
+
if (typeof props.onClose === 'function') {
|
35
|
+
props.onClose();
|
36
|
+
}
|
37
|
+
};
|
38
|
+
var componentWillUnmount = function componentWillUnmount() {
|
39
|
+
Tool.event.off("drawer-close.".concat(state.id));
|
40
|
+
};
|
41
|
+
useEffect(function () {
|
42
|
+
Tool.event.on("drawer-close.".concat(state.id), function () {
|
43
|
+
_onClose();
|
44
|
+
});
|
45
|
+
return componentWillUnmount;
|
46
|
+
}, []);
|
47
|
+
return /*#__PURE__*/_jsx(ConfigProvider, {
|
48
|
+
theme: {
|
49
|
+
token: {
|
50
|
+
colorPrimary: '#722ED1'
|
51
|
+
}
|
52
|
+
},
|
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
|
64
|
+
})
|
65
|
+
});
|
66
|
+
};
|
67
|
+
export default DialogDrawer;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Space } from 'antd';
|
3
|
+
import "./DialogDrawerFooter.less";
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
6
|
+
var DialogDrawerFooter = function DialogDrawerFooter(_ref) {
|
7
|
+
var children = _ref.children;
|
8
|
+
return /*#__PURE__*/_jsxs("div", {
|
9
|
+
className: "ktv-ai-dialogDrawerFooter",
|
10
|
+
children: [/*#__PURE__*/_jsx("div", {
|
11
|
+
className: "warp",
|
12
|
+
children: /*#__PURE__*/_jsx("div", {
|
13
|
+
className: "warpChildren",
|
14
|
+
children: /*#__PURE__*/_jsx(Space, {
|
15
|
+
children: children
|
16
|
+
})
|
17
|
+
})
|
18
|
+
}), /*#__PURE__*/_jsx("div", {
|
19
|
+
className: "pos"
|
20
|
+
})]
|
21
|
+
});
|
22
|
+
};
|
23
|
+
export default DialogDrawerFooter;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
.ktv-ai-dialogDrawerFooter{
|
2
|
+
.warp{
|
3
|
+
position: absolute;
|
4
|
+
left: 0;
|
5
|
+
bottom: 0;
|
6
|
+
z-index: 20;
|
7
|
+
width: 100%;
|
8
|
+
height: 56px;
|
9
|
+
background-color: #FFF;
|
10
|
+
line-height: 56px;
|
11
|
+
text-align: right;
|
12
|
+
}
|
13
|
+
.warpChildren{
|
14
|
+
padding: 0 20px 0 0;
|
15
|
+
}
|
16
|
+
.pos{
|
17
|
+
height: 56px;
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Button, Result } from 'antd';
|
3
|
+
import "./LoadError.less";
|
4
|
+
import { MehOutlined } from '@ant-design/icons';
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
6
|
+
var LoadError = function LoadError(_ref) {
|
7
|
+
var _ref$title = _ref.title,
|
8
|
+
title = _ref$title === void 0 ? '似乎遇到了一些问题, 请稍后重试' : _ref$title,
|
9
|
+
_ref$code = _ref.code,
|
10
|
+
code = _ref$code === void 0 ? '' : _ref$code,
|
11
|
+
subTitle = _ref.subTitle,
|
12
|
+
_ref$onReload = _ref.onReload,
|
13
|
+
onReload = _ref$onReload === void 0 ? '' : _ref$onReload;
|
14
|
+
var getTitle = function getTitle() {
|
15
|
+
var outTitle = title === 'http error' ? '网络似乎有些问题' : title;
|
16
|
+
if (code === 'not-login') {
|
17
|
+
outTitle = '请登录后查看';
|
18
|
+
}
|
19
|
+
return outTitle;
|
20
|
+
};
|
21
|
+
return /*#__PURE__*/_jsx("div", {
|
22
|
+
className: "ktv-ai-loadError",
|
23
|
+
children: /*#__PURE__*/_jsx(Result, {
|
24
|
+
icon: /*#__PURE__*/_jsx(MehOutlined, {}),
|
25
|
+
title: getTitle(),
|
26
|
+
subTitle: subTitle,
|
27
|
+
extra: typeof onReload === 'function' && !['_____'].includes(code) ? /*#__PURE__*/_jsx(Button, {
|
28
|
+
type: "primary",
|
29
|
+
onClick: function onClick(e) {
|
30
|
+
return onReload();
|
31
|
+
},
|
32
|
+
children: "\u91CD\u8BD5"
|
33
|
+
}) : ''
|
34
|
+
})
|
35
|
+
});
|
36
|
+
};
|
37
|
+
export default LoadError;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
.ktv-ai-loadError {
|
2
|
+
.ant-result {
|
3
|
+
padding: 20px 2px;
|
4
|
+
}
|
5
|
+
.ant-result-image {
|
6
|
+
width: 200px;
|
7
|
+
height: 260px;
|
8
|
+
svg {
|
9
|
+
transform: scale(0.8);
|
10
|
+
transform-origin: 0 50%;
|
11
|
+
}
|
12
|
+
}
|
13
|
+
.ant-result-title {
|
14
|
+
color: #666;
|
15
|
+
font-weight: 400;
|
16
|
+
font-size: 18px;
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import './PageContentWarp.less';
|
3
|
+
interface Props {
|
4
|
+
title?: React.ReactNode;
|
5
|
+
className?: string;
|
6
|
+
minHeight?: number;
|
7
|
+
loading?: boolean;
|
8
|
+
loadingDom?: React.ReactNode;
|
9
|
+
error?: Error | null;
|
10
|
+
extInfo?: React.ReactNode;
|
11
|
+
children?: React.ReactNode;
|
12
|
+
errorNode?: (err: Error) => React.ReactNode;
|
13
|
+
onReload?: () => void;
|
14
|
+
}
|
15
|
+
declare const PageContentWarp: React.FC<Props>;
|
16
|
+
export default PageContentWarp;
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import "./PageContentWarp.less";
|
3
|
+
import LoadError from "./LoadError";
|
4
|
+
import { LoadingOutlined } from '@ant-design/icons';
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
6
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
7
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
8
|
+
var PageContentWarp = function PageContentWarp(_ref) {
|
9
|
+
var _ref$title = _ref.title,
|
10
|
+
title = _ref$title === void 0 ? '' : _ref$title,
|
11
|
+
_ref$className = _ref.className,
|
12
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
13
|
+
_ref$minHeight = _ref.minHeight,
|
14
|
+
minHeight = _ref$minHeight === void 0 ? -1 : _ref$minHeight,
|
15
|
+
_ref$loading = _ref.loading,
|
16
|
+
loading = _ref$loading === void 0 ? false : _ref$loading,
|
17
|
+
_ref$loadingDom = _ref.loadingDom,
|
18
|
+
loadingDom = _ref$loadingDom === void 0 ? '' : _ref$loadingDom,
|
19
|
+
_ref$extInfo = _ref.extInfo,
|
20
|
+
extInfo = _ref$extInfo === void 0 ? '' : _ref$extInfo,
|
21
|
+
children = _ref.children,
|
22
|
+
error = _ref.error,
|
23
|
+
errorNode = _ref.errorNode,
|
24
|
+
onReload = _ref.onReload;
|
25
|
+
return /*#__PURE__*/_jsxs("div", {
|
26
|
+
className: "ktv-ai-pageContentBox ".concat(className),
|
27
|
+
style: {
|
28
|
+
minHeight: minHeight > 0 ? minHeight : 'auto'
|
29
|
+
},
|
30
|
+
children: [title && /*#__PURE__*/_jsx("h2", {
|
31
|
+
children: title
|
32
|
+
}), error ? /*#__PURE__*/_jsx(_Fragment, {
|
33
|
+
children: errorNode && errorNode(error) ? errorNode(error) : /*#__PURE__*/_jsx(LoadError, {
|
34
|
+
title: error.message,
|
35
|
+
code: error.name,
|
36
|
+
onReload: onReload
|
37
|
+
})
|
38
|
+
}) : /*#__PURE__*/_jsx(_Fragment, {
|
39
|
+
children: loading ? loadingDom ? loadingDom : /*#__PURE__*/_jsx("div", {
|
40
|
+
className: "pageContentBoxLoading ktv-ai-loading",
|
41
|
+
children: /*#__PURE__*/_jsx(LoadingOutlined, {})
|
42
|
+
}) : children
|
43
|
+
})]
|
44
|
+
});
|
45
|
+
};
|
46
|
+
export default PageContentWarp;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
2
|
+
import React, { useEffect, useState } from 'react';
|
3
|
+
import { LikeOutlined } from '@ant-design/icons';
|
4
|
+
import "./commend.less";
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
6
|
+
var VipCommend = function VipCommend(_ref) {
|
7
|
+
var _ref$commend = _ref.commend,
|
8
|
+
commend = _ref$commend === void 0 ? 0 : _ref$commend;
|
9
|
+
var _useState = useState([]),
|
10
|
+
_useState2 = _slicedToArray(_useState, 2),
|
11
|
+
list = _useState2[0],
|
12
|
+
setList = _useState2[1];
|
13
|
+
useEffect(function () {
|
14
|
+
var dataList = [];
|
15
|
+
for (var i = 0; i < commend; i++) {
|
16
|
+
dataList.push(i);
|
17
|
+
}
|
18
|
+
setList(dataList);
|
19
|
+
}, [commend]);
|
20
|
+
return /*#__PURE__*/_jsx("span", {
|
21
|
+
className: "ktv-ai-vipCommend",
|
22
|
+
children: list.map(function (num, i) {
|
23
|
+
return /*#__PURE__*/_jsx(LikeOutlined, {
|
24
|
+
className: "ktv-ai-icon"
|
25
|
+
}, i);
|
26
|
+
})
|
27
|
+
});
|
28
|
+
};
|
29
|
+
export default VipCommend;
|