@oinone/kunlun-vue-admin-layout 6.3.9 → 6.4.0

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.
@@ -204,6 +204,7 @@ export class DebugApiWidget extends VueWidget {
204
204
  };
205
205
  }
206
206
 
207
+ @Widget.Method()
207
208
  public async responseAnalysis(responseBody: DebugResponseData | DebugResponseData[]): Promise<string> {
208
209
  let { requestInfo } = this;
209
210
  if (!requestInfo) {
@@ -329,7 +330,11 @@ export class DebugApiWidget extends VueWidget {
329
330
  for (const namespace of Object.keys(responseData) || []) {
330
331
  const responseFunctionData = responseData[namespace] || {};
331
332
  if (typeof responseFunctionData === 'object') {
332
- for (const name of Object.keys(responseFunctionData) || []) {
333
+ const responseFunList = Object.keys(responseFunctionData) || [];
334
+ if (!responseFunList.length) {
335
+ responseFunList.push('unknown');
336
+ }
337
+ for (const name of responseFunList) {
333
338
  gqlInfos.push({
334
339
  key: `${i + 1}`,
335
340
  title: `GQL#${i + 1}`,
@@ -6,16 +6,19 @@ import { http } from '@oinone/kunlun-service';
6
6
  export class ModuleService {
7
7
  public static apps: IModule[] = [];
8
8
 
9
- public static async queryApplications(): Promise<IModule[]> {
10
- if (ModuleService.apps.length) {
9
+ /**
10
+ * 查询应用列表
11
+ * @param {boolean} force 强制重新加载应用列表,不走缓存
12
+ * @returns {Promise<IModule[]>} 返回应用列表
13
+ */
14
+ public static async queryApplications(force?: boolean): Promise<IModule[]> {
15
+ if (ModuleService.apps.length && !force) {
11
16
  return ModuleService.apps;
12
17
  }
13
18
 
14
19
  ClearCache.register(() => {
15
20
  ModuleService.apps = [];
16
21
  });
17
- const model = await ModelCache.get('base.AppSwitcherModuleProxy');
18
- const bindUrlFieldExist = (model?.modelFields ?? []).filter((it) => it.data === 'urlHomePage').length > 0;
19
22
 
20
23
  const body = gql`
21
24
  {
@@ -41,7 +44,10 @@ export class ModuleService {
41
44
  application
42
45
  latestVersion
43
46
  platformVersion
44
- ${bindUrlFieldExist ? 'urlHomePage {\ntarget\nurl\n}' : ''}
47
+ urlHomePage {
48
+ target
49
+ url
50
+ }
45
51
  }
46
52
  size
47
53
  totalPages