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,52 @@
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
3
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
4
|
+
import request from "../../lib/request";
|
5
|
+
export function getInfo(_x, _x2) {
|
6
|
+
return _getInfo.apply(this, arguments);
|
7
|
+
}
|
8
|
+
|
9
|
+
//
|
10
|
+
function _getInfo() {
|
11
|
+
_getInfo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(body, options) {
|
12
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
13
|
+
while (1) switch (_context.prev = _context.next) {
|
14
|
+
case 0:
|
15
|
+
return _context.abrupt("return", request("user/info", _objectSpread({
|
16
|
+
method: 'POST',
|
17
|
+
headers: {
|
18
|
+
'Content-Type': 'application/json'
|
19
|
+
},
|
20
|
+
data: _objectSpread({}, body)
|
21
|
+
}, options || {})));
|
22
|
+
case 1:
|
23
|
+
case "end":
|
24
|
+
return _context.stop();
|
25
|
+
}
|
26
|
+
}, _callee);
|
27
|
+
}));
|
28
|
+
return _getInfo.apply(this, arguments);
|
29
|
+
}
|
30
|
+
export function userVipInfo(_x3, _x4) {
|
31
|
+
return _userVipInfo.apply(this, arguments);
|
32
|
+
}
|
33
|
+
function _userVipInfo() {
|
34
|
+
_userVipInfo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(body, options) {
|
35
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
36
|
+
while (1) switch (_context2.prev = _context2.next) {
|
37
|
+
case 0:
|
38
|
+
return _context2.abrupt("return", request("user/userVipInfo", _objectSpread({
|
39
|
+
method: 'GET',
|
40
|
+
headers: {
|
41
|
+
'Content-Type': 'application/json'
|
42
|
+
},
|
43
|
+
data: _objectSpread({}, body)
|
44
|
+
}, options || {})));
|
45
|
+
case 1:
|
46
|
+
case "end":
|
47
|
+
return _context2.stop();
|
48
|
+
}
|
49
|
+
}, _callee2);
|
50
|
+
}));
|
51
|
+
return _userVipInfo.apply(this, arguments);
|
52
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
3
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
4
|
+
import request from "../../lib/request";
|
5
|
+
export function list(_x, _x2) {
|
6
|
+
return _list.apply(this, arguments);
|
7
|
+
}
|
8
|
+
function _list() {
|
9
|
+
_list = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params, options) {
|
10
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
11
|
+
while (1) switch (_context.prev = _context.next) {
|
12
|
+
case 0:
|
13
|
+
return _context.abrupt("return", request("vip/compare", _objectSpread({
|
14
|
+
method: 'GET',
|
15
|
+
headers: {
|
16
|
+
'Content-Type': 'application/json'
|
17
|
+
},
|
18
|
+
params: _objectSpread({}, params)
|
19
|
+
}, options || {})));
|
20
|
+
case 1:
|
21
|
+
case "end":
|
22
|
+
return _context.stop();
|
23
|
+
}
|
24
|
+
}, _callee);
|
25
|
+
}));
|
26
|
+
return _list.apply(this, arguments);
|
27
|
+
}
|
28
|
+
export function detail(_x3, _x4) {
|
29
|
+
return _detail.apply(this, arguments);
|
30
|
+
}
|
31
|
+
function _detail() {
|
32
|
+
_detail = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params, options) {
|
33
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
34
|
+
while (1) switch (_context2.prev = _context2.next) {
|
35
|
+
case 0:
|
36
|
+
return _context2.abrupt("return", request("vip/detail", _objectSpread({
|
37
|
+
method: 'GET',
|
38
|
+
headers: {
|
39
|
+
'Content-Type': 'application/json'
|
40
|
+
},
|
41
|
+
params: _objectSpread({}, params)
|
42
|
+
}, options || {})));
|
43
|
+
case 1:
|
44
|
+
case "end":
|
45
|
+
return _context2.stop();
|
46
|
+
}
|
47
|
+
}, _callee2);
|
48
|
+
}));
|
49
|
+
return _detail.apply(this, arguments);
|
50
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
declare namespace Product {
|
2
|
+
interface Detail {
|
3
|
+
name: string;
|
4
|
+
thumbUrl: string;
|
5
|
+
productType: string;
|
6
|
+
onlyBuyOne: boolean;
|
7
|
+
highIntroduction: string;
|
8
|
+
introduction: string;
|
9
|
+
content: string;
|
10
|
+
screenshotPreview: string[];
|
11
|
+
tag: string[];
|
12
|
+
}
|
13
|
+
interface VersionList {
|
14
|
+
title: string;
|
15
|
+
version: string;
|
16
|
+
osType: string;
|
17
|
+
osTypeBit: string;
|
18
|
+
url: string;
|
19
|
+
created: number;
|
20
|
+
dealerId: number;
|
21
|
+
productType: string;
|
22
|
+
content: string;
|
23
|
+
versionReal: number;
|
24
|
+
}
|
25
|
+
}
|
File without changes
|
@@ -0,0 +1,29 @@
|
|
1
|
+
declare namespace Trade {
|
2
|
+
type PayType = 'NATIVE' | 'MWEB';
|
3
|
+
interface CommonCreateQuery {
|
4
|
+
productKind: Global.ProductKind;
|
5
|
+
productTypeId: number;
|
6
|
+
productCount: number;
|
7
|
+
userId: number;
|
8
|
+
payType: PayType;
|
9
|
+
[name: string]: any;
|
10
|
+
}
|
11
|
+
interface CreateResult {
|
12
|
+
codeUrl: string;
|
13
|
+
mWebUrl: string;
|
14
|
+
}
|
15
|
+
interface CommonCreateResult {
|
16
|
+
"h5PayUrl": string;
|
17
|
+
"orderIdKey": string;
|
18
|
+
"tradeIdKey": string;
|
19
|
+
"tradeNo": string;
|
20
|
+
jsApiInfo: {
|
21
|
+
appId: string;
|
22
|
+
timeStamp: string;
|
23
|
+
nonceStr: string;
|
24
|
+
signType: string;
|
25
|
+
package: string;
|
26
|
+
paySign: string;
|
27
|
+
};
|
28
|
+
}
|
29
|
+
}
|
File without changes
|
@@ -0,0 +1,54 @@
|
|
1
|
+
declare namespace UserAuth {
|
2
|
+
interface LoginSuccessData {
|
3
|
+
sid: string;
|
4
|
+
avatarUrl: string;
|
5
|
+
userId: number;
|
6
|
+
}
|
7
|
+
type FromWhere = 'web' | 'client';
|
8
|
+
type FromChannel = 'alipay' | 'wechat';
|
9
|
+
interface UserInfo {
|
10
|
+
id: number;
|
11
|
+
sid: string;
|
12
|
+
shareId: number;
|
13
|
+
nickname: string;
|
14
|
+
isLogin: boolean;
|
15
|
+
avatarUrl: string;
|
16
|
+
userIdKey: string;
|
17
|
+
gender: number;
|
18
|
+
fromChannel: string;
|
19
|
+
weQrUrl: string;
|
20
|
+
canWithdraw: number;
|
21
|
+
douzhuliId36: string;
|
22
|
+
userVip?: {
|
23
|
+
[productName: string]: {
|
24
|
+
"vipLevel": number;
|
25
|
+
"isVip": boolean;
|
26
|
+
"expired": number;
|
27
|
+
};
|
28
|
+
};
|
29
|
+
}
|
30
|
+
interface MyUpInfo {
|
31
|
+
nickname: string;
|
32
|
+
gender: 0 | 1 | 2;
|
33
|
+
avatarUrl: string;
|
34
|
+
weQrUrl: string;
|
35
|
+
}
|
36
|
+
interface UserVipInfo {
|
37
|
+
productType: string;
|
38
|
+
ratioDownPercent1: number;
|
39
|
+
ratioDownPercent2: number;
|
40
|
+
vipLevel: number;
|
41
|
+
expired: number;
|
42
|
+
created: number;
|
43
|
+
isVip: boolean;
|
44
|
+
vipLevelName: string;
|
45
|
+
}
|
46
|
+
interface UserVipDouzhuliGroupInfo {
|
47
|
+
wechatQrUrl: string;
|
48
|
+
message: string;
|
49
|
+
}
|
50
|
+
interface WeQrResult {
|
51
|
+
expireSeconds: number;
|
52
|
+
url: string;
|
53
|
+
}
|
54
|
+
}
|
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
declare namespace Vip {
|
2
|
+
interface List {
|
3
|
+
id: number;
|
4
|
+
marketPrice: number;
|
5
|
+
month: number;
|
6
|
+
monthTitle: string;
|
7
|
+
price: number;
|
8
|
+
productType: string;
|
9
|
+
productName: string;
|
10
|
+
ratioDownPercent1: number;
|
11
|
+
ratioDownPercent2: number;
|
12
|
+
alt: string;
|
13
|
+
recommend: number;
|
14
|
+
}
|
15
|
+
}
|
File without changes
|
@@ -0,0 +1,66 @@
|
|
1
|
+
declare namespace Global {
|
2
|
+
export type Env = 'local' | 'pre' | 'prod';
|
3
|
+
export type AuthClientLoginType = 'wechat' | 'account' | 'alipay';
|
4
|
+
export type ProductKind = 'vip' | 'card-vip' | string;
|
5
|
+
interface RequestResult{
|
6
|
+
code: string;
|
7
|
+
success?: boolean;
|
8
|
+
message: string;
|
9
|
+
data?: any;
|
10
|
+
}
|
11
|
+
interface Columns<T>{
|
12
|
+
title: string;
|
13
|
+
dataIndex?: string;
|
14
|
+
key: string;
|
15
|
+
width?: string | number;
|
16
|
+
render?: ( filed?: any, record?: T , index?: number ) => React.ReactNode;
|
17
|
+
}
|
18
|
+
interface Pagination {
|
19
|
+
current: number;
|
20
|
+
pageSize: number;
|
21
|
+
total: number;
|
22
|
+
simple?: boolean;
|
23
|
+
more?: boolean;
|
24
|
+
}
|
25
|
+
|
26
|
+
interface ApiResult<T> {
|
27
|
+
data: T;
|
28
|
+
success: boolean;
|
29
|
+
message: string;
|
30
|
+
}
|
31
|
+
|
32
|
+
interface RequestOptions {
|
33
|
+
silent?: boolean;
|
34
|
+
env?: Global.Env | '';
|
35
|
+
[key: string]: any;
|
36
|
+
}
|
37
|
+
|
38
|
+
type WebKind = 'douzhuli' | 'douxidong' | 'shipinlv';
|
39
|
+
interface WebBaseConfig{
|
40
|
+
currentEnv: Global.CurrentEnv;
|
41
|
+
appEnv: Global.CurrentEnv;
|
42
|
+
webKind: WebKind;
|
43
|
+
version: string;
|
44
|
+
versionReal: string;
|
45
|
+
|
46
|
+
douzhuli: WebBaseConfigItem;
|
47
|
+
douxidong: WebBaseConfigItem;
|
48
|
+
shipinlv: WebBaseConfigItem;
|
49
|
+
}
|
50
|
+
|
51
|
+
interface WebBaseConfigItem{
|
52
|
+
title: string;
|
53
|
+
subtitle: string;
|
54
|
+
apiUrls: {
|
55
|
+
[env in Global.CurrentEnv]: WebBaseConfigApiUrlsItem
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
interface WebBaseConfigApiUrlsItem{
|
60
|
+
api: string;
|
61
|
+
ws: string;
|
62
|
+
authApi: string;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
|
package/dist/window.d.ts
ADDED
package/package.json
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
{
|
2
|
+
"name": "component-shipinlv",
|
3
|
+
"version": "0.0.1",
|
4
|
+
"description": "",
|
5
|
+
"module": "dist/index.js",
|
6
|
+
"types": "dist/index.d.ts",
|
7
|
+
"private": false,
|
8
|
+
"author": "tangwenru <i@alone.cat>",
|
9
|
+
"email": "mail.alone.cat@qq.com",
|
10
|
+
"authors": [
|
11
|
+
"i@alone.cat"
|
12
|
+
],
|
13
|
+
"license": "MIT",
|
14
|
+
"files": [
|
15
|
+
"dist"
|
16
|
+
],
|
17
|
+
"commitlint": {
|
18
|
+
"extends": [
|
19
|
+
"@commitlint/config-conventional"
|
20
|
+
]
|
21
|
+
},
|
22
|
+
"lint-staged": {
|
23
|
+
"*.{md,json}": [
|
24
|
+
"prettier --write --no-error-on-unmatched-pattern"
|
25
|
+
],
|
26
|
+
"*.{css,less}": [
|
27
|
+
"stylelint --fix",
|
28
|
+
"prettier --write"
|
29
|
+
],
|
30
|
+
"*.{js,jsx}": [
|
31
|
+
"eslint --fix",
|
32
|
+
"prettier --write"
|
33
|
+
],
|
34
|
+
"*.{ts,tsx}": [
|
35
|
+
"eslint --fix",
|
36
|
+
"prettier --parser=typescript --write"
|
37
|
+
]
|
38
|
+
},
|
39
|
+
"publishConfig": {
|
40
|
+
"access": "public"
|
41
|
+
},
|
42
|
+
"peerDependencies": {
|
43
|
+
"antd": "^18.x",
|
44
|
+
"react": ">=18.x",
|
45
|
+
"react-dom": ">=18.x"
|
46
|
+
},
|
47
|
+
"devDependencies": {
|
48
|
+
"@commitlint/cli": "^17.1.2",
|
49
|
+
"@commitlint/config-conventional": "^17.1.0",
|
50
|
+
"@types/less": "^3.0.6",
|
51
|
+
"@types/react": "^18.x",
|
52
|
+
"@types/react-dom": "^18.2.1",
|
53
|
+
"@umijs/lint": "^4.0.0",
|
54
|
+
"antd": "^5.4.6",
|
55
|
+
"css-loader": "^6.7.3",
|
56
|
+
"dumi": "^2.2.16",
|
57
|
+
"eslint": "^8.23.0",
|
58
|
+
"father": "^4.3.8",
|
59
|
+
"less-loader": "^11.1.0",
|
60
|
+
"lint-staged": "^13.0.3",
|
61
|
+
"prettier": "^2.7.1",
|
62
|
+
"prettier-plugin-organize-imports": "^3.0.0",
|
63
|
+
"prettier-plugin-packagejson": "^2.2.18",
|
64
|
+
"react": "^18.x",
|
65
|
+
"react-dom": "^18.x",
|
66
|
+
"stylelint": "^14.9.1"
|
67
|
+
},
|
68
|
+
"dependencies": {
|
69
|
+
"@ant-design/icons": "^5.2.6",
|
70
|
+
"@babel/runtime": "^7.23.6",
|
71
|
+
"@umijs/hooks": "^1.9.3",
|
72
|
+
"jr-qrcode": "^1.1.4",
|
73
|
+
"moment": "^2.29.4",
|
74
|
+
"umi-request": "^1.4.0",
|
75
|
+
"yarn": "^1.22.19"
|
76
|
+
},
|
77
|
+
"scripts": {
|
78
|
+
"start": "npm run dev",
|
79
|
+
"dev": "dumi dev",
|
80
|
+
"build": "father build",
|
81
|
+
"build:watch": "father dev",
|
82
|
+
"docs:build": "dumi build",
|
83
|
+
"doctor": "father doctor",
|
84
|
+
"lint": "npm run lint:es && npm run lint:css",
|
85
|
+
"lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
|
86
|
+
"lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\""
|
87
|
+
}
|
88
|
+
}
|