Pārlūkot izejas kodu

修改进入多元融合的图标

wangfumin 3 mēneši atpakaļ
vecāks
revīzija
e0b1399e93
1 mainītis faili ar 5 papildinājumiem un 5 dzēšanām
  1. 5 5
      index.html

+ 5 - 5
index.html

@@ -12,7 +12,7 @@
       // 获取URL参数中的app值
       function getAppParam() {
         const urlParams = new URLSearchParams(window.location.search);
-        return urlParams.get('app');
+        return {app: urlParams.get('app'), isSample: urlParams.get('isSample')};
       }
   
       // 根据app参数设置favicon
@@ -22,13 +22,13 @@
         const basePath = window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/') + 1);
         let faviconPath = basePath + 'favicon.ico'; // 默认图标
         console.log(appParam, basePath, 6666)
-        if (appParam == '1') {
+        if (appParam.app == '1') {
           faviconPath = basePath + 'fire.ico';
-        } else if (appParam == '2') {
+        } else if (appParam.app == '2' && appParam.isSample == '0') {
           faviconPath = basePath + 'police.ico';
-        } else if (appParam == '3') {
+        } else if (appParam.app == '3') {
           faviconPath = basePath + 'jmlogo.png';
-        } else if (appParam == '4') {
+        } else if (appParam.app == '2' && appParam.isSample == '1') {
           faviconPath = basePath + 'logo_big.ico';
         }