@cloud-app-dev/vidc 2.0.0-alpha.20 → 2.0.0-alpha.21
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.
|
@@ -13,7 +13,7 @@ export function queryBSConfig() {
|
|
|
13
13
|
case 0:
|
|
14
14
|
_context.next = 2;
|
|
15
15
|
return Service.http({
|
|
16
|
-
url:
|
|
16
|
+
url: "/config/web.conf.json?".concat(Date.now())
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
case 2:
|
|
@@ -40,7 +40,7 @@ export function queryMicroApplicationList() {
|
|
|
40
40
|
case 0:
|
|
41
41
|
_context2.next = 2;
|
|
42
42
|
return Service.http({
|
|
43
|
-
url: "/
|
|
43
|
+
url: "/config/app.conf.json?".concat(Date.now())
|
|
44
44
|
});
|
|
45
45
|
|
|
46
46
|
case 2:
|
|
@@ -66,7 +66,7 @@ export function querySystemUpdate() {
|
|
|
66
66
|
switch (_context3.prev = _context3.next) {
|
|
67
67
|
case 0:
|
|
68
68
|
return _context3.abrupt("return", Service.http({
|
|
69
|
-
url: "/
|
|
69
|
+
url: "/config/update.status.conf.json?".concat(Date.now())
|
|
70
70
|
}));
|
|
71
71
|
|
|
72
72
|
case 1:
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { InitDataType } from './utils';
|
|
2
3
|
interface IInitialRequestProps {
|
|
3
4
|
children: React.ReactNode;
|
|
4
5
|
Spin?: React.ReactNode;
|
|
6
|
+
customInitialization?: () => Promise<InitDataType>;
|
|
5
7
|
}
|
|
6
|
-
declare function InitialRequest({ children, Spin }: IInitialRequestProps): JSX.Element;
|
|
8
|
+
declare function InitialRequest({ children, Spin, customInitialization }: IInitialRequestProps): JSX.Element;
|
|
7
9
|
export default InitialRequest;
|
|
@@ -23,7 +23,8 @@ function InitialRequest(_ref) {
|
|
|
23
23
|
var _this = this;
|
|
24
24
|
|
|
25
25
|
var children = _ref.children,
|
|
26
|
-
Spin = _ref.Spin
|
|
26
|
+
Spin = _ref.Spin,
|
|
27
|
+
customInitialization = _ref.customInitialization;
|
|
27
28
|
|
|
28
29
|
var _useContext = useContext(AppContext.Context),
|
|
29
30
|
updateUser = _useContext.updateUser,
|
|
@@ -42,22 +43,23 @@ function InitialRequest(_ref) {
|
|
|
42
43
|
|
|
43
44
|
var init = function init() {
|
|
44
45
|
return __awaiter(_this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
45
|
-
var _yield$
|
|
46
|
+
var fetchInitData, _yield$fetchInitData, userFeatures, operationInfo, systemFeatures, userInfo, themeConfig;
|
|
46
47
|
|
|
47
48
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
48
49
|
while (1) {
|
|
49
50
|
switch (_context.prev = _context.next) {
|
|
50
51
|
case 0:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
52
|
+
fetchInitData = customInitialization || initialization;
|
|
53
|
+
_context.next = 3;
|
|
54
|
+
return fetchInitData();
|
|
55
|
+
|
|
56
|
+
case 3:
|
|
57
|
+
_yield$fetchInitData = _context.sent;
|
|
58
|
+
userFeatures = _yield$fetchInitData.userFeatures;
|
|
59
|
+
operationInfo = _yield$fetchInitData.operationInfo;
|
|
60
|
+
systemFeatures = _yield$fetchInitData.systemFeatures;
|
|
61
|
+
userInfo = _yield$fetchInitData.userInfo;
|
|
62
|
+
themeConfig = _yield$fetchInitData.themeConfig;
|
|
61
63
|
updateUser(userInfo);
|
|
62
64
|
updateOperation(operationInfo);
|
|
63
65
|
Config.registerFeatrueIds(userFeatures);
|
|
@@ -70,7 +72,7 @@ function InitialRequest(_ref) {
|
|
|
70
72
|
|
|
71
73
|
_BASE_DATA_INIT = true;
|
|
72
74
|
|
|
73
|
-
case
|
|
75
|
+
case 16:
|
|
74
76
|
case "end":
|
|
75
77
|
return _context.stop();
|
|
76
78
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { UserInfoType, OperationInfoType } from '../AppContext/interface';
|
|
2
2
|
import { FeatureItemType, ThemeInfoType } from '../Config/interface';
|
|
3
|
-
export declare
|
|
3
|
+
export declare type InitDataType = {
|
|
4
4
|
userInfo: UserInfoType;
|
|
5
5
|
userFeatures: string[];
|
|
6
6
|
systemFeatures: FeatureItemType[];
|
|
7
7
|
operationInfo: OperationInfoType;
|
|
8
8
|
themeConfig: ThemeInfoType;
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
|
+
export declare function initialization(): Promise<InitDataType>;
|