|
|
|
@ -28,7 +28,7 @@ export class Session{
|
|
|
|
|
return wx.request({
|
|
|
|
|
...options,
|
|
|
|
|
url,
|
|
|
|
|
header: {...header, "Cookie": this.cookies},
|
|
|
|
|
header: {"Cookie": this.cookies,...header,},
|
|
|
|
|
success: (res) => {
|
|
|
|
|
console.debug("request success", res);
|
|
|
|
|
if (res.cookies && res.cookies.length>0)
|
|
|
|
@ -37,7 +37,7 @@ export class Session{
|
|
|
|
|
this.setCookies(this.splitCookies(res.header["Set-Cookie"]));
|
|
|
|
|
else if(res.header["set-cookie"])
|
|
|
|
|
this.setCookies(this.splitCookies(res.header["set-Cookie"]));
|
|
|
|
|
success(res);
|
|
|
|
|
success&&success(res);
|
|
|
|
|
if(url.indexOf("login.json")!=-1&&!res.data.status&&!this.cookies){
|
|
|
|
|
wx.reportMonitor("0", 2);
|
|
|
|
|
global.realTimeLog.error(res, "login fail: fail parse cookies!!", res);
|
|
|
|
|