Commit a7ef6fa9 by 肖康

x

parent e22a1ead
...@@ -29,7 +29,7 @@ switch (envs) { ...@@ -29,7 +29,7 @@ switch (envs) {
export const http = (method, url, param,loading) => { export const http = (method, url, param,loading) => {
axios.defaults.withCredentials = false; // 不携带cookie //axios.defaults.withCredentials = true; // 携带cookie
//loading 默认加载loading 传1 不加载 //loading 默认加载loading 传1 不加载
param = param && typeof param === 'object' ? param : {}; param = param && typeof param === 'object' ? param : {};
let token = Util.getCookie('token') || ''; let token = Util.getCookie('token') || '';
...@@ -41,13 +41,13 @@ export const http = (method, url, param,loading) => { ...@@ -41,13 +41,13 @@ export const http = (method, url, param,loading) => {
}], }],
loading:(loading?false:true) loading:(loading?false:true)
}; };
param.token=token //param.token=token
// if(url!="/auth/cp"&&url!="/auth/login"){ if(url!="/auth/cp"&&url!="/auth/login"){
// config.headers={ config.headers={
// 'Authorization': 'Bearer ' + token 'Authorization': 'Bearer ' + token
// } }
// } }
// post请求时需要设定Content-Type // post请求时需要设定Content-Type
if (method == 'post'||method == 'POST') { if (method == 'post'||method == 'POST') {
config.data = param; config.data = param;
......
...@@ -429,7 +429,7 @@ ...@@ -429,7 +429,7 @@
var self = this; var self = this;
for (var i = 0; i < self.kucundata.length; i++) { for (var i = 0; i < self.kucundata.length; i++) {
arr_[self.kucundata[i]['goods_id']] = { arr_[self.kucundata[i]['goods_id']] = {
cn_delivery_time: self.kucundata[i]['updateStock'] stock: self.kucundata[i]['updateStock']
} }
console.log(self.kucundata[i]['goods_id']) console.log(self.kucundata[i]['goods_id'])
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment