Procházet zdrojové kódy

完善起始页默认配置解析

cc12458 před 1 týdnem
rodič
revize
8d90f450ef
1 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. 4 4
      src/request/model/index.ts

+ 4 - 4
src/request/model/index.ts

@@ -10,19 +10,19 @@ export function application(data: Record<string, any>) {
   const image = analysis(
     [
       ['preset', '\\d+', '1'],
-      ['el', '[\\w|]+', 'scan|btn'],
+      ['el', '[\\w|]+', ''],
       ['page', '/\\w+', '/screen'],
       ['com', '[^;]+'],
       ['title', '[^;]+'],
     ] as const,
     data?.tabletDrainageImage
   );
-  if (image.preset === '1') image.el ??= `scan|btn`;
-  else if (image.preset === '2') {
+  if (!image.el) image.el = void 0 as any;
+  if (image.preset === '2') {
     image.el ??= `scan`;
     image.com ??= `scan.page`
     image.title ??= `萧山区中医智能辅诊系统`
-  }
+  } else image.el ??= `btn`;
 
   return {
     copyright: [data?.partner, data?.technicalSupporter].filter(Boolean).join('<br>'),