瀏覽代碼

fest: 判断timeLog是否可用

TIANYONG 4 月之前
父節點
當前提交
1784f558bc
共有 3 個文件被更改,包括 11 次插入4 次删除
  1. 5 2
      src/page-instrument/view-detail/index.tsx
  2. 5 1
      src/view/audio-list/index.tsx
  3. 1 1
      vite.config.ts

+ 5 - 2
src/page-instrument/view-detail/index.tsx

@@ -215,8 +215,11 @@ export default defineComponent({
       state.isLoading = false
       api_cloudLoading();
       console.timeEnd("渲染加载耗时");
-      console.timeLog('加载过程','谱面渲染完成')
-      
+      if (typeof console.timeLog === 'function') {
+        console.timeLog('加载过程','谱面渲染完成')
+      } else {
+        console.log('加载过程','谱面渲染完成')
+      }
       detailData.skeletonLoading = false;
       state.osmd = osmd;
       // 预览模式不需要往下执行

+ 5 - 1
src/view/audio-list/index.tsx

@@ -660,7 +660,11 @@ export default defineComponent({
 				state.audioDone = true;
 				// state.isLoading = false
 				console.timeEnd("音频加载耗时")
-				console.timeLog('加载过程','音频加载完成')
+				if (typeof console.timeLog === 'function') {
+					console.timeLog('加载过程','音频加载完成')
+				} else {
+					console.log('加载过程','音频加载完成')
+				}
 				console.log("音频数据:",audioData)
 				api_playProgress(progress);
 			} else {

+ 1 - 1
vite.config.ts

@@ -81,7 +81,7 @@ export default defineConfig({
     // https: true,
     proxy: {
       "^/instrument/.*": {
-        target: "https://gym.lexiaoya.cn",
+        target: "https://test.gym.lexiaoya.cn",
         changeOrigin: true,
         rewrite: (path) => path.replace(/^\/instrument/, ""),
       },