查询时添加If-Modified-Since头
This commit is contained in:
parent
87f2abae80
commit
6e53542051
@ -165,7 +165,8 @@
|
|||||||
"leftTicketDTO.to_station": to,
|
"leftTicketDTO.to_station": to,
|
||||||
"purpose_codes": student ? "0X00" : "ADULT"
|
"purpose_codes": student ? "0X00" : "ADULT"
|
||||||
};
|
};
|
||||||
var cookie = (function (obj) { var arr = [];
|
var cookie = (function (obj) {
|
||||||
|
var arr = [];
|
||||||
_.forEach(obj, function (v, k) { arr.push(k + '=' + v); });
|
_.forEach(obj, function (v, k) { arr.push(k + '=' + v); });
|
||||||
return arr.join("; ");
|
return arr.join("; ");
|
||||||
})(extensionVersion >= 720 ? {
|
})(extensionVersion >= 720 ? {
|
||||||
@ -199,7 +200,8 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
}, false, {
|
}, false, {
|
||||||
"Cookie": cookie
|
"Cookie": cookie,
|
||||||
|
"If-Modified-Since": "0"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var fetchTicketUrl = function () {
|
var fetchTicketUrl = function () {
|
||||||
@ -238,9 +240,9 @@
|
|||||||
if (!isLogOpen || (lastLogTime && (new Date() - lastLogTime) < 5000))
|
if (!isLogOpen || (lastLogTime && (new Date() - lastLogTime) < 5000))
|
||||||
return;
|
return;
|
||||||
lastLogTime = new Date();
|
lastLogTime = new Date();
|
||||||
ajax.sendGet("leftTicket/log", "leftTicket/init", data, "json", function() {
|
ajax.sendGet("leftTicket/log", "leftTicket/init", data, "json", function () {
|
||||||
|
|
||||||
},function() {
|
}, function () {
|
||||||
|
|
||||||
}, false, {
|
}, false, {
|
||||||
"Cookie": cookies
|
"Cookie": cookies
|
||||||
|
Loading…
Reference in New Issue
Block a user