Browse Source

。。。

sophieChenyx 6 years ago
parent
commit
c86d9784f4
1 changed files with 8 additions and 1 deletions
  1. 8 1
      src/utils/request.js

+ 8 - 1
src/utils/request.js

@@ -91,8 +91,15 @@ export default function request(url, options) {
       if (response.status === 204) {
         return response.text();
       }
+
+      if( response && response.ok && response.url ) {
+        // 获取的参数为Stream 形式
+        var blob = response.body;
+        
+      }
+
       console.log('fetch 中获取的response',response)
-      
+
       return response.json();
 
     })