i***@163.com
i***@163.com
  • 发布:2017-12-14 16:35
  • 更新:2017-12-15 10:34
  • 阅读:1362

mui.ajax回调问题

分类:MUI
success: function(data, textStatus, xhr){  
                                        mui(that).button('reset');  
                                        console.log(xhr.getAllResponseHeaders());  
                                        var headers = xhr.getResponseHeader('Set-Cookie');  
                                        //console.log(data);  
                                        console.log(headers);  
                                        mui.toast('登录成功!');  
                                    },
``````javascript  

官方:http://www.html5plus.org/doc/zh_cn/xhr.html#plus.net.XMLHttpRequest.getAllResponseHeaders

服务器返回多个set-cookie
xhr.getAllResponseHeaders()总是返回的最后一个,
xhr.getResponseHeader( ‘Set-Cookie’); 也只能取出一个
我需要所有cookie,何解?Bug吗?

2017-12-14 16:35 负责人:无 分享
已邀请:
i***@163.com

i***@163.com (作者) - 这个人好勤快啊,还写了个人介绍呢

自己解决了!
服务端设置cookie,一定要带上domain。我是折腾够了
plus.navigator.getCookie('xxxxxx.com')

该问题目前已经被锁定, 无法添加新回复