Skip to content

Commit

Permalink
修改cart.js,token的合并
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaobinwu committed May 12, 2017
1 parent a6f54f1 commit a981300
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store

6 changes: 1 addition & 5 deletions utils/cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,7 @@ function syncCartData(store_id){
};

if(token){
if(ajaxCfg.header){
ajaxCfg.header.push({'X-Auth-Token': token});
}else{
ajaxCfg.header = {'X-Auth-Token': token};
}
ajaxCfg.header['X-Auth-Token'] = token;
}

return new Promise((resolve,reject)=>{
Expand Down

0 comments on commit a981300

Please sign in to comment.