Browse Source

注释添加

zhouna 5 years ago
parent
commit
429025ca94
1 changed files with 2 additions and 15 deletions
  1. 2 15
      src/utils/ajax.js

+ 2 - 15
src/utils/ajax.js

@@ -64,26 +64,13 @@ const post=(url,data)=>{
 };
 
 //json传参
-const json=(url,data,spec)=>{
+const json=(url,data,spec)=>{     //spec:请求地址前缀不是api/icss,预问诊结果引用时添加
   //兼容ie8,axios在ie8下content-type设置不成功且会把headers置为null
   return axios({
     method:'post',
     url:url.indexOf('http:')!=-1?url:((spec&&isLocal)?host+url:((spec&&!isLocal)?orgin+url:qhost+url)),
     data
-  });/*new Promise((resolve,reject)=>{
-    $.ajax({
-      method:'post',
-      url:qhost+url,
-      data:JSON.stringify(data),
-      contentType:"application/json; charset=UTF-8",
-      success:function(res){
-        resolve({data:res});
-      },
-      error:function(error){
-        reject(error);
-      },
-    });
-  });*/
+  });
 };
 
 // 导出