John-Hong hace 2 años
padre
commit
3f9a040aab
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      public/index.html

+ 2 - 1
public/index.html

@@ -45,7 +45,8 @@
 </html>
 <script>
   // const debug = window.localStorage.getItem('H5_DEBUG');
-  const debug = true;
+  // 开发环境和qa环境 打开debug
+  const debug = /dev-|qa-/.test(window?.injectConfig?.api) || window.location.href.indexOf(8080) > -1;
   if (debug) {
     const script = document.createElement('script');
     script.src = 'https://unpkg.com/vconsole@latest/dist/vconsole.min.js';