From 6e535420511a913b0e61f5ff0c31ec0a16241a65 Mon Sep 17 00:00:00 2001 From: iFish Date: Mon, 15 Sep 2014 15:02:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=97=B6=E6=B7=BB=E5=8A=A0If?= =?UTF-8?q?-Modified-Since=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web12306/js/otn/queryticket.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Web12306/js/otn/queryticket.js b/Web12306/js/otn/queryticket.js index ef3ea57..996adb9 100644 --- a/Web12306/js/otn/queryticket.js +++ b/Web12306/js/otn/queryticket.js @@ -165,7 +165,8 @@ "leftTicketDTO.to_station": to, "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); }); return arr.join("; "); })(extensionVersion >= 720 ? { @@ -199,7 +200,8 @@ } }, false, { - "Cookie": cookie + "Cookie": cookie, + "If-Modified-Since": "0" }); }; var fetchTicketUrl = function () { @@ -238,10 +240,10 @@ if (!isLogOpen || (lastLogTime && (new Date() - lastLogTime) < 5000)) return; lastLogTime = new Date(); - ajax.sendGet("leftTicket/log", "leftTicket/init", data, "json", function() { - - },function() { - + ajax.sendGet("leftTicket/log", "leftTicket/init", data, "json", function () { + + }, function () { + }, false, { "Cookie": cookies });