@eohjsc/react-native-smart-city 0.4.51 → 0.4.53
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/package.json
CHANGED
package/src/configs/SCConfig.js
CHANGED
|
@@ -100,8 +100,6 @@ const SCDefaultConfig = {
|
|
|
100
100
|
intervalWatchConfigTime: 30000,
|
|
101
101
|
setCurrentSensorDisplay: () => {},
|
|
102
102
|
appName: 'E-Ra',
|
|
103
|
-
packageName: 'com.eohjsc.eohmobile.staging',
|
|
104
|
-
versionCode: 1
|
|
105
103
|
};
|
|
106
104
|
|
|
107
105
|
export class SCConfig {
|
|
@@ -119,12 +117,15 @@ export class SCConfig {
|
|
|
119
117
|
static intervalWatchConfigTime = SCDefaultConfig.intervalWatchConfigTime;
|
|
120
118
|
static setCurrentSensorDisplay = SCDefaultConfig.setCurrentSensorDisplay;
|
|
121
119
|
static appName = SCDefaultConfig.appName;
|
|
122
|
-
static packageName = SCDefaultConfig.packageName;
|
|
123
|
-
static versionCode = SCDefaultConfig.versionCode;
|
|
124
120
|
}
|
|
125
121
|
|
|
126
122
|
export const initSCConfig = (config) => {
|
|
127
123
|
api.setBaseURL(config.apiRoot ?? SCDefaultConfig.apiRoot);
|
|
124
|
+
api.setHeaders({
|
|
125
|
+
'Content-Type': 'application/json',
|
|
126
|
+
'App-Version-Code': config.versionCode,
|
|
127
|
+
'App-Package-Name': config.packageName,
|
|
128
|
+
});
|
|
128
129
|
LocaleConfig.defaultLocale = config.language ?? SCConfig.language;
|
|
129
130
|
SCConfig.ENV = config.ENV ?? SCConfig.ENV;
|
|
130
131
|
SCConfig.language = config.language ?? SCConfig.language;
|
|
@@ -147,6 +148,4 @@ export const initSCConfig = (config) => {
|
|
|
147
148
|
SCConfig.setCurrentSensorDisplay =
|
|
148
149
|
config.setCurrentSensorDisplay ?? SCDefaultConfig.setCurrentSensorDisplay;
|
|
149
150
|
SCConfig.appName = config.appName ?? SCDefaultConfig.appName;
|
|
150
|
-
SCConfig.packageName = config.packageName ?? SCConfig.packageName,
|
|
151
|
-
SCConfig.versionCode = config.version ?? SCConfig.versionCode
|
|
152
151
|
};
|
package/src/utils/Apis/axios.js
CHANGED