@etsoo/materialui 1.4.15 → 1.4.16
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/lib/app/ServiceApp.js
CHANGED
|
@@ -141,9 +141,17 @@ export class ServiceApp extends ReactApp {
|
|
|
141
141
|
onFailure();
|
|
142
142
|
return false;
|
|
143
143
|
}
|
|
144
|
+
const coreTokenDecrypted = this.decrypt(coreToken);
|
|
145
|
+
if (!coreTokenDecrypted) {
|
|
146
|
+
onFailure();
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
144
149
|
params.onSuccess = () => {
|
|
145
150
|
// Call the core system API refresh token
|
|
146
|
-
this.apiRefreshTokenData(this.coreApi,
|
|
151
|
+
this.apiRefreshTokenData(this.coreApi, {
|
|
152
|
+
token: coreTokenDecrypted,
|
|
153
|
+
appId: this.settings.appId
|
|
154
|
+
}).then((data) => {
|
|
147
155
|
if (data == null)
|
|
148
156
|
return;
|
|
149
157
|
// Cache the core system refresh token
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/materialui",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.16",
|
|
4
4
|
"description": "TypeScript Material-UI Implementation",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@emotion/css": "^11.13.4",
|
|
51
51
|
"@emotion/react": "^11.13.3",
|
|
52
52
|
"@emotion/styled": "^11.13.0",
|
|
53
|
-
"@etsoo/appscript": "^1.5.
|
|
53
|
+
"@etsoo/appscript": "^1.5.58",
|
|
54
54
|
"@etsoo/notificationbase": "^1.1.52",
|
|
55
55
|
"@etsoo/react": "^1.7.89",
|
|
56
56
|
"@etsoo/shared": "^1.2.51",
|
|
@@ -3,10 +3,4 @@ import { IAppSettings } from "@etsoo/appscript";
|
|
|
3
3
|
/**
|
|
4
4
|
* Service app settings interface
|
|
5
5
|
*/
|
|
6
|
-
export interface IServiceAppSettings extends IAppSettings {
|
|
7
|
-
/**
|
|
8
|
-
* Application id
|
|
9
|
-
* 程序编号
|
|
10
|
-
*/
|
|
11
|
-
appId: number;
|
|
12
|
-
}
|
|
6
|
+
export interface IServiceAppSettings extends IAppSettings {}
|
package/src/app/ServiceApp.ts
CHANGED
|
@@ -199,9 +199,18 @@ export class ServiceApp<
|
|
|
199
199
|
return false;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
+
const coreTokenDecrypted = this.decrypt(coreToken);
|
|
203
|
+
if (!coreTokenDecrypted) {
|
|
204
|
+
onFailure();
|
|
205
|
+
return false;
|
|
206
|
+
}
|
|
207
|
+
|
|
202
208
|
params.onSuccess = () => {
|
|
203
209
|
// Call the core system API refresh token
|
|
204
|
-
this.apiRefreshTokenData(this.coreApi,
|
|
210
|
+
this.apiRefreshTokenData(this.coreApi, {
|
|
211
|
+
token: coreTokenDecrypted,
|
|
212
|
+
appId: this.settings.appId
|
|
213
|
+
}).then((data) => {
|
|
205
214
|
if (data == null) return;
|
|
206
215
|
|
|
207
216
|
// Cache the core system refresh token
|