变更百度统计代码。

This commit is contained in:
iFish 2014-09-09 20:13:56 +08:00
parent d4bda222b8
commit 09fb3632c7
3 changed files with 10 additions and 8 deletions

View File

@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
//
// 你可以指定所有值,也可以让修订版本和内部版本号采用默认值,
// 方法是按如下所示使用 "*":
[assembly: AssemblyVersion("1.0.14252.73")]
[assembly: AssemblyVersion("1.0.14252.74")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -684,6 +684,14 @@ namespace Web12306
return true;
}
//added 2014-9-9 检测非法车次
if (SelectedTrain != null && SelectedTrain.Length > 0)
{
var reg = new Regex("^(" + string.Join("|", SelectedTrain) + ")$", RegexOptions.IgnoreCase);
if (Stops.Keys.Any(s => !reg.IsMatch(s)))
return true;
}
return false;
}

View File

@ -68,13 +68,7 @@
//百度统计
if (window._hmt && type !== param.trackTypes.OPEN_PAGE_INDEX) {
try {
var data = "";
if (values) {
data = values.map(function(s) {
return encodeURIComponent(s);
}).join("&");
}
window._hmt.push(['_trackEvent', '12306', type, data]);
window._hmt.push(['_trackEvent', '12306_' + type]);
} catch (e) {
}