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.
- 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,8 @@
|
|
1
|
+
import { getEnv } from "./getApiUrl";
|
2
|
+
var CallMiniUrl = function CallMiniUrl(productType) {
|
3
|
+
var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
4
|
+
var env = getEnv();
|
5
|
+
var entParam = env === 'prod' ? '' : "_env=".concat(env, "&");
|
6
|
+
return "https://call-alipay-mini.douzhuli.shanren.wang/?".concat(entParam, "productType=").concat(productType, "&").concat(query);
|
7
|
+
};
|
8
|
+
export default CallMiniUrl;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
declare const getApiUrl: (apiName?: string, apiEnv?: Global.Env | '') => string;
|
2
|
+
export declare const getApiEnv: (apiEnv?: Global.Env | '') => Global.Env;
|
3
|
+
export declare const getEnv: (env?: Global.Env | '') => Global.Env;
|
4
|
+
export declare const getWsUrl: (env?: Global.Env | '') => string;
|
5
|
+
export default getApiUrl;
|
@@ -0,0 +1,56 @@
|
|
1
|
+
var _window$WebBaseConfig, _window$WebBaseConfig2, _window$WebBaseConfig3;
|
2
|
+
import ApiUrlsInfo, { currentEnv } from "../config/apiUrls";
|
3
|
+
var ApiUrls = ((_window$WebBaseConfig = window.WebBaseConfig) === null || _window$WebBaseConfig === void 0 || (_window$WebBaseConfig = _window$WebBaseConfig[(_window$WebBaseConfig2 = window.WebBaseConfig) === null || _window$WebBaseConfig2 === void 0 ? void 0 : _window$WebBaseConfig2.webKind]) === null || _window$WebBaseConfig === void 0 ? void 0 : _window$WebBaseConfig.apiUrls) || ApiUrlsInfo;
|
4
|
+
var envData = ((_window$WebBaseConfig3 = window.WebBaseConfig) === null || _window$WebBaseConfig3 === void 0 ? void 0 : _window$WebBaseConfig3.currentEnv) || currentEnv;
|
5
|
+
var getApiUrl = function getApiUrl() {
|
6
|
+
var _ref, _domain;
|
7
|
+
var apiName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
8
|
+
var apiEnv = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
9
|
+
// 允许 http
|
10
|
+
if (/^https?:\/\//i.test(apiName)) {
|
11
|
+
return apiName;
|
12
|
+
}
|
13
|
+
|
14
|
+
// 替换第一个 /
|
15
|
+
apiName = apiName.replace(/^\//, '');
|
16
|
+
var env = getApiEnv(apiEnv || envData);
|
17
|
+
var ApiUrlsItem = ApiUrls;
|
18
|
+
var domain = (_ref = ApiUrlsItem[env] || ApiUrlsItem.prod) === null || _ref === void 0 ? void 0 : _ref.api;
|
19
|
+
|
20
|
+
// 删除最后一个 /
|
21
|
+
domain = ((_domain = domain) === null || _domain === void 0 ? void 0 : _domain.replace(/\/$/, '')) || '';
|
22
|
+
|
23
|
+
// 改为小写
|
24
|
+
// 把 api 变小写,但不变参数
|
25
|
+
var apiNameInfo = apiName.split('?');
|
26
|
+
apiName = "".concat(apiNameInfo[0].toLowerCase()).concat(apiName.indexOf('?') > -1 ? '?' : '').concat(apiNameInfo[1] || '');
|
27
|
+
|
28
|
+
// 可能有
|
29
|
+
var url = "".concat(domain).concat(/\/$/.test(domain) ? '' : '/').concat(apiName);
|
30
|
+
return url;
|
31
|
+
};
|
32
|
+
//
|
33
|
+
export var getApiEnv = function getApiEnv(apiEnv) {
|
34
|
+
var env = apiEnv || envData;
|
35
|
+
// 开发者只允许使用 .local 后缀域名;
|
36
|
+
if (!/\.local$/i.test(document.location.hostname) && !/\.?localhost$/i.test(document.location.hostname)) {
|
37
|
+
env = 'prod';
|
38
|
+
}
|
39
|
+
|
40
|
+
// 预发环境::锁定
|
41
|
+
if (/^pre\./i.test(document.location.hostname)) {
|
42
|
+
env = 'pre';
|
43
|
+
}
|
44
|
+
return env || 'prod';
|
45
|
+
};
|
46
|
+
export var getEnv = function getEnv() {
|
47
|
+
var env = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
48
|
+
return getApiEnv(env);
|
49
|
+
};
|
50
|
+
export var getWsUrl = function getWsUrl() {
|
51
|
+
var _ref2;
|
52
|
+
var env = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
53
|
+
env = getEnv(env);
|
54
|
+
return (_ref2 = ApiUrls[env] || ApiUrls.prod) === null || _ref2 === void 0 ? void 0 : _ref2.ws;
|
55
|
+
};
|
56
|
+
export default getApiUrl;
|
@@ -0,0 +1 @@
|
|
1
|
+
export default function goAuth(authType?: string): void;
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import PostMessage from "./postMessage";
|
2
|
+
export default function goAuth() {
|
3
|
+
var authType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
4
|
+
// Tool.go(`${ authType }/auth`);
|
5
|
+
return PostMessage('login');
|
6
|
+
// return;
|
7
|
+
// if( window._openAuth_ ){
|
8
|
+
// return Promise.reject( false );
|
9
|
+
// }
|
10
|
+
// return new Promise(( resolve, reject ) => {
|
11
|
+
// const dialog = Tool.pageDialog({
|
12
|
+
// content: (
|
13
|
+
// <Auth
|
14
|
+
// onSuccess={ () => {
|
15
|
+
// window._openAuth_ = false;
|
16
|
+
// resolve(true);
|
17
|
+
// dialog.destroy();
|
18
|
+
// }}
|
19
|
+
// />
|
20
|
+
// ),
|
21
|
+
// width: 580,
|
22
|
+
// onCancel(){
|
23
|
+
// window._openAuth_ = false;
|
24
|
+
// reject( false );
|
25
|
+
// }
|
26
|
+
// })
|
27
|
+
// });
|
28
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import * as JsErrorController from "../service/api/JsErrorController";
|
2
|
+
var packageJson = require("../../package.json");
|
3
|
+
var JsError = function JsError() {
|
4
|
+
if (window.__onBindWindowError) {
|
5
|
+
console.log('onWindowError Binded 2!');
|
6
|
+
return false;
|
7
|
+
}
|
8
|
+
window.__onBindWindowError = true;
|
9
|
+
window.addEventListener('error', function (e) {
|
10
|
+
var content = JSON.stringify((e.error || {}).stack || '');
|
11
|
+
if (content.length < 3) {
|
12
|
+
content = JSON.stringify(e.message);
|
13
|
+
}
|
14
|
+
if (e.message === 'ResizeObserver loop limit exceeded') {
|
15
|
+
return;
|
16
|
+
}
|
17
|
+
console.log('onWindowError 2::', e, JSON.stringify(e), '|', e.error, e.message);
|
18
|
+
JsErrorController.create({
|
19
|
+
from: 'client',
|
20
|
+
appName: packageJson.name,
|
21
|
+
content: content
|
22
|
+
}, {
|
23
|
+
silent: true
|
24
|
+
});
|
25
|
+
}, false);
|
26
|
+
};
|
27
|
+
export default JsError;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
declare const notification: {
|
2
|
+
notification(type: 'success' | 'info' | 'warning' | 'error', message: string, description?: React.ReactNode, options?: NotificationOptions): void;
|
3
|
+
notificationSuccess(message: string, description?: React.ReactNode, options?: NotificationOptions): void;
|
4
|
+
notificationError(message: string, description?: React.ReactNode, options?: NotificationOptions): void;
|
5
|
+
notificationWarning(message: string, description?: React.ReactNode, options?: NotificationOptions): void;
|
6
|
+
notificationInfo(message: string, description?: React.ReactNode, options?: NotificationOptions): void;
|
7
|
+
notificationDestroy(): void;
|
8
|
+
};
|
9
|
+
export default notification;
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
+
import { notification as Notification } from 'antd';
|
3
|
+
import Tool from "./Tool";
|
4
|
+
var notification = {
|
5
|
+
notification: function notification(type, message, description) {
|
6
|
+
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
7
|
+
Notification[type](_objectSpread(_objectSpread({}, options), {}, {
|
8
|
+
message: message,
|
9
|
+
description: description
|
10
|
+
}));
|
11
|
+
},
|
12
|
+
notificationSuccess: function notificationSuccess(message, description) {
|
13
|
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
14
|
+
options = Tool.extend({
|
15
|
+
duration: 8
|
16
|
+
}, options);
|
17
|
+
this.notification('success', message, description, options);
|
18
|
+
},
|
19
|
+
notificationError: function notificationError(message, description) {
|
20
|
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
21
|
+
options = Tool.extend({
|
22
|
+
duration: 180
|
23
|
+
}, options);
|
24
|
+
console.log('options 2:', options);
|
25
|
+
this.notification('error', message, description, options);
|
26
|
+
},
|
27
|
+
notificationWarning: function notificationWarning(message, description) {
|
28
|
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
29
|
+
options = Tool.extend({
|
30
|
+
duration: 60
|
31
|
+
}, options);
|
32
|
+
this.notification('warning', message, description, options);
|
33
|
+
},
|
34
|
+
notificationInfo: function notificationInfo(message, description) {
|
35
|
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
36
|
+
this.notification('info', message, description, options);
|
37
|
+
},
|
38
|
+
notificationDestroy: function notificationDestroy() {
|
39
|
+
Notification.destroy();
|
40
|
+
}
|
41
|
+
};
|
42
|
+
export default notification;
|
@@ -0,0 +1,48 @@
|
|
1
|
+
var ua = window.navigator.userAgent.toLowerCase();
|
2
|
+
|
3
|
+
// android平台
|
4
|
+
var isAndroid = function () {
|
5
|
+
return /Android|Adr/i.test(ua);
|
6
|
+
}();
|
7
|
+
|
8
|
+
// ios平台
|
9
|
+
var isIos = function () {
|
10
|
+
return /iPhone|iPod|iPad/i.test(ua);
|
11
|
+
}();
|
12
|
+
|
13
|
+
// 微信生态
|
14
|
+
var isWechat = function () {
|
15
|
+
return /MicroMessenger/i.test(ua);
|
16
|
+
}();
|
17
|
+
|
18
|
+
// 微信小程序
|
19
|
+
var isWxmp = function () {
|
20
|
+
return /miniProgram/i.test(ua) || window.__wxjs_environment === 'miniprogram';
|
21
|
+
}();
|
22
|
+
|
23
|
+
// 钉钉环境
|
24
|
+
var isDingding = function () {
|
25
|
+
return /DingTalk/i.test(ua);
|
26
|
+
}();
|
27
|
+
var isH5 = function () {
|
28
|
+
return !!ua.match(/AppleWebKit.*Mobile.*/) || isAndroid || isIos; //是否为移动终端
|
29
|
+
}();
|
30
|
+
|
31
|
+
// 钉钉环境
|
32
|
+
var isWeb = function () {
|
33
|
+
return !isH5;
|
34
|
+
}();
|
35
|
+
var Platform = {
|
36
|
+
isAndroid: isAndroid,
|
37
|
+
isIos: isIos,
|
38
|
+
isWechat: isWechat,
|
39
|
+
isWxmp: isWxmp,
|
40
|
+
isDingding: isDingding,
|
41
|
+
isH5: isH5,
|
42
|
+
isWeb: isWeb,
|
43
|
+
isIPhone: ua.indexOf('iPhone') > -1,
|
44
|
+
//iPhone
|
45
|
+
isIPad: ua.indexOf('iPad') > -1 //iPad
|
46
|
+
};
|
47
|
+
|
48
|
+
export default Platform;
|
@@ -0,0 +1,97 @@
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
+
// 二次封装 hooks request ;
|
3
|
+
// 参数详见:https://github.com/umijs/umi-request/blob/master/README_zh-CN.md
|
4
|
+
import request from 'umi-request';
|
5
|
+
import getApiUrl, { getApiEnv } from "./getApiUrl";
|
6
|
+
import goAuth from "./goAuth";
|
7
|
+
import Tool from "./Tool";
|
8
|
+
var requestApi = function requestApi() {
|
9
|
+
var api = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
10
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
11
|
+
// 要请求的 url
|
12
|
+
var url = getApiUrl(api, options === null || options === void 0 ? void 0 : options.env);
|
13
|
+
console.log('makeAjax int 20 111 url:', url, options);
|
14
|
+
|
15
|
+
// const params = options.method === 'GET' ? options.data : {};
|
16
|
+
|
17
|
+
var userInfo = Tool.getLocalUserInfo();
|
18
|
+
var token = userInfo.sid;
|
19
|
+
var postUrl = url + (url.indexOf('?') === -1 ? '?' : '&') + '_token_=' + token;
|
20
|
+
|
21
|
+
// 追加环境参数
|
22
|
+
var env = getApiEnv(options === null || options === void 0 ? void 0 : options.env);
|
23
|
+
if (env !== 'prod') {
|
24
|
+
postUrl += "&_env=".concat(env);
|
25
|
+
}
|
26
|
+
var pageUrl = document.location.href;
|
27
|
+
return new Promise(function (resolve, reject) {
|
28
|
+
var requestData = request(postUrl, _objectSpread(_objectSpread({}, options), {}, {
|
29
|
+
timeout: options.timeout || 15e3
|
30
|
+
// requestType: options.payload === false ? 'form' : 'json',
|
31
|
+
// onSuccess( data: ApiResult ){
|
32
|
+
// console.log('ajax 1:', data );
|
33
|
+
// if( ! data?.success ){
|
34
|
+
// const error = new Error( data.message || '发生了一些问题' );
|
35
|
+
// error.name = 'api-not-success';
|
36
|
+
// throw error;
|
37
|
+
// }
|
38
|
+
// options.onSuccess( data );
|
39
|
+
// },
|
40
|
+
}));
|
41
|
+
|
42
|
+
requestData.then(function () {
|
43
|
+
var result = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
44
|
+
console.log('ajax requestData then:', result);
|
45
|
+
if (result.success) {
|
46
|
+
resolve(result.data);
|
47
|
+
} else {
|
48
|
+
var error = new Error((result === null || result === void 0 ? void 0 : result.message) || '发生了一些问题,请稍后重试');
|
49
|
+
error.name = result.code;
|
50
|
+
error.stack = result.data;
|
51
|
+
if (['staff-not-login', 'not-login'].includes(result === null || result === void 0 ? void 0 : result.code)) {
|
52
|
+
// 未登录,跳走;
|
53
|
+
goAuth(result.authType);
|
54
|
+
reject(error);
|
55
|
+
} else {
|
56
|
+
onError(pageUrl, url, error.message, JSON.stringify(error), options === null || options === void 0 ? void 0 : options.silent);
|
57
|
+
reject(error);
|
58
|
+
if (!(options !== null && options !== void 0 && options.silent)) {
|
59
|
+
Tool.toastError(result.message);
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}).catch(function (err) {
|
64
|
+
console.log('ajax error:', err);
|
65
|
+
if (['Failed to fetch', 'http error'].includes(err === null || err === void 0 ? void 0 : err.message)) {
|
66
|
+
err.message = '发生了一些问题,请稍后重试';
|
67
|
+
}
|
68
|
+
Tool.toastError(err.message);
|
69
|
+
onError(pageUrl, url, err.message, JSON.stringify(err), options === null || options === void 0 ? void 0 : options.silent);
|
70
|
+
reject(err);
|
71
|
+
});
|
72
|
+
});
|
73
|
+
};
|
74
|
+
var onError = function onError(pageUrl) {
|
75
|
+
var _window$__recordError;
|
76
|
+
var apiUrl = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
77
|
+
var title = arguments.length > 2 ? arguments[2] : undefined;
|
78
|
+
var content = arguments.length > 3 ? arguments[3] : undefined;
|
79
|
+
var silent = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
80
|
+
if (silent) {
|
81
|
+
return;
|
82
|
+
}
|
83
|
+
(_window$__recordError = window.__recordError) === null || _window$__recordError === void 0 || _window$__recordError.create([{
|
84
|
+
title: title,
|
85
|
+
siteUserId: Tool.getLocalUserInfo().id,
|
86
|
+
errorLevel: 1,
|
87
|
+
//'1:严重,2:警告;3:提示;',
|
88
|
+
errorType: 'HTTP',
|
89
|
+
//'HTTP: 网络错误; LOGICAL:逻辑错误;‘’: 不能定义的错误;',
|
90
|
+
language: 'JavaScript',
|
91
|
+
//Go','JavaScript','')
|
92
|
+
pageUrl: pageUrl,
|
93
|
+
content: content,
|
94
|
+
apiUrl: apiUrl
|
95
|
+
}]);
|
96
|
+
};
|
97
|
+
export default requestApi;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export declare function login(body: {
|
2
|
+
accountName: string;
|
3
|
+
password: string;
|
4
|
+
inviteUserId: number;
|
5
|
+
}): Promise<UserAuth.LoginSuccessData>;
|
6
|
+
export declare function weMiniLoginQr(body: {
|
7
|
+
loginId: string;
|
8
|
+
loginType: 'client';
|
9
|
+
inviteUserId: number;
|
10
|
+
env: Global.Env;
|
11
|
+
}): Promise<UserAuth.WeQrResult>;
|
12
|
+
export declare function reg(body: {
|
13
|
+
accountName: string;
|
14
|
+
password: string;
|
15
|
+
inviteUserId: number;
|
16
|
+
}): Promise<UserAuth.LoginSuccessData>;
|
@@ -0,0 +1,75 @@
|
|
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 login(_x) {
|
6
|
+
return _login.apply(this, arguments);
|
7
|
+
}
|
8
|
+
function _login() {
|
9
|
+
_login = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(body) {
|
10
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
11
|
+
while (1) switch (_context.prev = _context.next) {
|
12
|
+
case 0:
|
13
|
+
return _context.abrupt("return", request("auth/loginAccount", {
|
14
|
+
method: 'POST',
|
15
|
+
headers: {
|
16
|
+
'Content-Type': 'application/json'
|
17
|
+
},
|
18
|
+
data: _objectSpread({}, body)
|
19
|
+
}));
|
20
|
+
case 1:
|
21
|
+
case "end":
|
22
|
+
return _context.stop();
|
23
|
+
}
|
24
|
+
}, _callee);
|
25
|
+
}));
|
26
|
+
return _login.apply(this, arguments);
|
27
|
+
}
|
28
|
+
export function weMiniLoginQr(_x2) {
|
29
|
+
return _weMiniLoginQr.apply(this, arguments);
|
30
|
+
}
|
31
|
+
function _weMiniLoginQr() {
|
32
|
+
_weMiniLoginQr = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(body) {
|
33
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
34
|
+
while (1) switch (_context2.prev = _context2.next) {
|
35
|
+
case 0:
|
36
|
+
return _context2.abrupt("return", request('auth/wechatLoginQr',
|
37
|
+
//`client/auth/weMiniLoginQr`,
|
38
|
+
{
|
39
|
+
method: 'POST',
|
40
|
+
headers: {
|
41
|
+
'Content-Type': 'application/json'
|
42
|
+
},
|
43
|
+
data: _objectSpread({}, body)
|
44
|
+
}));
|
45
|
+
case 1:
|
46
|
+
case "end":
|
47
|
+
return _context2.stop();
|
48
|
+
}
|
49
|
+
}, _callee2);
|
50
|
+
}));
|
51
|
+
return _weMiniLoginQr.apply(this, arguments);
|
52
|
+
}
|
53
|
+
export function reg(_x3) {
|
54
|
+
return _reg.apply(this, arguments);
|
55
|
+
}
|
56
|
+
function _reg() {
|
57
|
+
_reg = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(body) {
|
58
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
59
|
+
while (1) switch (_context3.prev = _context3.next) {
|
60
|
+
case 0:
|
61
|
+
return _context3.abrupt("return", request("auth/reg", {
|
62
|
+
method: 'POST',
|
63
|
+
headers: {
|
64
|
+
'Content-Type': 'application/json'
|
65
|
+
},
|
66
|
+
data: _objectSpread({}, body)
|
67
|
+
}));
|
68
|
+
case 1:
|
69
|
+
case "end":
|
70
|
+
return _context3.stop();
|
71
|
+
}
|
72
|
+
}, _callee3);
|
73
|
+
}));
|
74
|
+
return _reg.apply(this, arguments);
|
75
|
+
}
|
@@ -0,0 +1,27 @@
|
|
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 create(_x, _x2) {
|
6
|
+
return _create.apply(this, arguments);
|
7
|
+
}
|
8
|
+
function _create() {
|
9
|
+
_create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(body, 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("client/jsError/create", _objectSpread({
|
14
|
+
method: 'POST',
|
15
|
+
headers: {
|
16
|
+
'Content-Type': 'application/json'
|
17
|
+
},
|
18
|
+
data: body
|
19
|
+
}, options || {})));
|
20
|
+
case 1:
|
21
|
+
case "end":
|
22
|
+
return _context.stop();
|
23
|
+
}
|
24
|
+
}, _callee);
|
25
|
+
}));
|
26
|
+
return _create.apply(this, arguments);
|
27
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
export declare function detail(body?: {
|
2
|
+
productType: string;
|
3
|
+
}, options?: Global.RequestOptions): Promise<Product.Detail>;
|
4
|
+
export declare function versionList(body?: {
|
5
|
+
dealerId: number;
|
6
|
+
productType: string;
|
7
|
+
}, options?: Global.RequestOptions): Promise<Product.VersionList[]>;
|
@@ -0,0 +1,53 @@
|
|
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 detail(_x, _x2) {
|
6
|
+
return _detail.apply(this, arguments);
|
7
|
+
}
|
8
|
+
|
9
|
+
// versionList
|
10
|
+
function _detail() {
|
11
|
+
_detail = _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("product/detail", _objectSpread({
|
16
|
+
env: (options === null || options === void 0 ? void 0 : options.env) || '',
|
17
|
+
method: 'GET',
|
18
|
+
headers: {
|
19
|
+
'Content-Type': 'application/json'
|
20
|
+
},
|
21
|
+
params: _objectSpread({}, body)
|
22
|
+
}, options || {})));
|
23
|
+
case 1:
|
24
|
+
case "end":
|
25
|
+
return _context.stop();
|
26
|
+
}
|
27
|
+
}, _callee);
|
28
|
+
}));
|
29
|
+
return _detail.apply(this, arguments);
|
30
|
+
}
|
31
|
+
export function versionList(_x3, _x4) {
|
32
|
+
return _versionList.apply(this, arguments);
|
33
|
+
}
|
34
|
+
function _versionList() {
|
35
|
+
_versionList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(body, options) {
|
36
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
37
|
+
while (1) switch (_context2.prev = _context2.next) {
|
38
|
+
case 0:
|
39
|
+
return _context2.abrupt("return", request("clientVersion/list", _objectSpread({
|
40
|
+
method: 'GET',
|
41
|
+
headers: {
|
42
|
+
'Content-Type': 'application/json'
|
43
|
+
},
|
44
|
+
params: _objectSpread({}, body)
|
45
|
+
}, options || {})));
|
46
|
+
case 1:
|
47
|
+
case "end":
|
48
|
+
return _context2.stop();
|
49
|
+
}
|
50
|
+
}, _callee2);
|
51
|
+
}));
|
52
|
+
return _versionList.apply(this, arguments);
|
53
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
export declare function create(body: Trade.CommonCreateQuery, options?: {
|
2
|
+
[key: string]: any;
|
3
|
+
}): Promise<Trade.CreateResult>;
|
4
|
+
export declare function versionList(body?: {
|
5
|
+
dealerId: number;
|
6
|
+
productType: string;
|
7
|
+
}, options?: Global.RequestOptions): Promise<Product.VersionList[]>;
|
@@ -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 create(_x, _x2) {
|
6
|
+
return _create.apply(this, arguments);
|
7
|
+
}
|
8
|
+
|
9
|
+
// versionList
|
10
|
+
function _create() {
|
11
|
+
_create = _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("trade/commonCreate", _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 _create.apply(this, arguments);
|
29
|
+
}
|
30
|
+
export function versionList(_x3, _x4) {
|
31
|
+
return _versionList.apply(this, arguments);
|
32
|
+
}
|
33
|
+
function _versionList() {
|
34
|
+
_versionList = _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("clientVersion/list", _objectSpread({
|
39
|
+
method: 'GET',
|
40
|
+
headers: {
|
41
|
+
'Content-Type': 'application/json'
|
42
|
+
},
|
43
|
+
params: _objectSpread({}, body)
|
44
|
+
}, options || {})));
|
45
|
+
case 1:
|
46
|
+
case "end":
|
47
|
+
return _context2.stop();
|
48
|
+
}
|
49
|
+
}, _callee2);
|
50
|
+
}));
|
51
|
+
return _versionList.apply(this, arguments);
|
52
|
+
}
|