Browse Source

Merge branch 'master' of http://192.168.0.115:3000/bill/fuse-code

xzw 3 years ago
parent
commit
996ffb660e
2 changed files with 5 additions and 5 deletions
  1. 1 1
      src/api/setup.ts
  2. 4 4
      src/sdk/sdk.ts

+ 1 - 1
src/api/setup.ts

@@ -166,7 +166,7 @@ export const axiosFactory = () => {
         if (response.data.code === ResCode.TOKEN_INVALID) {
           delToken()
         }
-        throw new Error(response.data.message)
+        throw new Error(response?.data?.message)
       } else {
         return response.data.data
       }

+ 4 - 4
src/sdk/sdk.ts

@@ -79,10 +79,10 @@ export const initialSDK = async (props: InialSDKProps) => {
   if (initialed) return;
   initialed = true
   const libs = [
-    `/lib/proj4/proj4.js`,
-    `/lib/jquery/jquery-3.1.1.min.js`,
-    `/lib/other/BinaryHeap.js`,
-    `/lib/tween/tween.min.js`,
+    `./lib/proj4/proj4.js`,
+    `./lib/jquery/jquery-3.1.1.min.js`,
+    `./lib/other/BinaryHeap.js`,
+    `./lib/tween/tween.min.js`,
   ]
   await Promise.all(libs.map(loadLib))
   await loadLib(`/lib/potree/potree.js`)