ike-weblca-html 2.2.17 → 2.2.19
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/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/IkeWebFooter.js +12 -6
- package/src/IkeWebHeader.js +371 -330
- package/src/js/UserAgreement.js +15 -8
- package/src/js/requestError.js +24 -0
package/package.json
CHANGED
package/src/IkeWebFooter.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {css, html, LitElement} from 'lit-element';
|
|
2
|
-
import {property} from "lodash-es";
|
|
1
|
+
import {css, html, LitElement} from 'lit-element';
|
|
2
|
+
import {property} from "lodash-es";
|
|
3
|
+
import { getResponseErrorMessage, notifyRequestError } from './js/requestError'
|
|
3
4
|
|
|
4
5
|
export class IkeWebFooter extends LitElement {
|
|
5
6
|
static styles = css`
|
|
@@ -336,8 +337,13 @@ export class IkeWebFooter extends LitElement {
|
|
|
336
337
|
async fetchData() {
|
|
337
338
|
try {
|
|
338
339
|
const response = await fetch(this._getOrganizationByDomainUrl());
|
|
339
|
-
const jsonData = await response.json();
|
|
340
|
-
|
|
340
|
+
const jsonData = await response.json();
|
|
341
|
+
const errorMessage = getResponseErrorMessage(response, jsonData, '获取机构配置失败');
|
|
342
|
+
if (errorMessage) {
|
|
343
|
+
notifyRequestError(errorMessage);
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
let data = jsonData.data; // 将获取到的数据保存到 data 属性中
|
|
341
347
|
if (data && data.personalizedConfigJson) {
|
|
342
348
|
this.personalizedConfigJson = JSON.parse(data.personalizedConfigJson);
|
|
343
349
|
}
|
|
@@ -353,8 +359,8 @@ export class IkeWebFooter extends LitElement {
|
|
|
353
359
|
setTimeout(() => this.requestUpdate(), 1000)
|
|
354
360
|
|
|
355
361
|
// this.requestUpdate(); // 更新组件以触发重新渲染
|
|
356
|
-
} catch (error) {
|
|
357
|
-
|
|
362
|
+
} catch (error) {
|
|
363
|
+
notifyRequestError('获取机构配置失败');
|
|
358
364
|
}
|
|
359
365
|
}
|
|
360
366
|
|