t-lj-service 1.0.6 → 1.0.7
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/module/config.ts +4 -1
- package/package.json +1 -1
package/module/config.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import hooks from './hooks';
|
|
2
2
|
const BASE_URL = import.meta.env.MODE === 'dev' ? '/api' : hooks.getLocal("sessioncurraddr") || '';
|
|
3
|
-
const TIME_OUT =
|
|
3
|
+
const TIME_OUT = 10 * 1000;
|
|
4
4
|
export enum REQUEST_METHOD {
|
|
5
5
|
POST = 'post',
|
|
6
6
|
GET = 'get',
|
|
@@ -73,6 +73,9 @@ const RequestConfig = (config: any): any => {
|
|
|
73
73
|
if(config.Token !== undefined ){
|
|
74
74
|
config.headers['Token'] = config.Token;
|
|
75
75
|
}
|
|
76
|
+
if(config.Timeout !== undefined ){
|
|
77
|
+
config.timeout = Number(config.Timeout) * 1000;
|
|
78
|
+
}
|
|
76
79
|
hooks.setLocal('sessiononlineTime', new Date().toString());
|
|
77
80
|
return config;
|
|
78
81
|
}
|