many adjust

This commit is contained in:
iFish 2014-09-09 14:55:30 +08:00
parent 431d5b8283
commit ce405c6142
12 changed files with 58 additions and 26 deletions

View File

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

View File

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
@ -223,14 +224,18 @@ namespace Web12306
if (ep1 != ep2) if (ep1 != ep2)
return ep2 - ep1; return ep2 - ep1;
//再看价格 //再看价格
var ap1 = (int)x.Lines.Min(s => s.ExtraPrice); var ap1 = x.Lines.Min(s => s.Radio);
var ap2 = (int)y.Lines.Min(s => s.ExtraPrice); var ap2 = y.Lines.Min(s => s.Radio);
if (ap1 != ap2) if (ap1 != ap2)
return ap1 - ap2; return ap1 - ap2;
return 0; return 0;
}); });
//最多推荐5条线路
if (line.Count > 5)
line.RemoveRange(5, line.Count - 5);
//再对组内排序 //再对组内排序
foreach (var current in line) foreach (var current in line)
@ -303,7 +308,7 @@ namespace Web12306
if (i != 0) if (i != 0)
{ {
//对于非始发站,停靠时间相同或更短,则不做推荐。 //对于非始发站,停靠时间相同或更短,则不做推荐。
if (stopTime <= stopTimeFrom) if (stopTime < stopTimeFrom && i < indexFrom - 3)
continue; continue;
} }
@ -323,8 +328,8 @@ namespace Web12306
//排序 //排序
altFrom.Sort(new AlternativeStationComparer()); altFrom.Sort(new AlternativeStationComparer());
if (altFrom.Count > 3) if (altFrom.Count > 5)
altFrom.RemoveRange(altFrom.Count - 3, 3); altFrom.RemoveRange(5, altFrom.Count - 5);
} }
if (indexTo != stops.Length - 1) if (indexTo != stops.Length - 1)
{ {
@ -342,7 +347,7 @@ namespace Web12306
if (i != stops.Length - 1) if (i != stops.Length - 1)
{ {
//对于非终到站,停靠时间相同或更短,则不做推荐。 //对于非终到站,停靠时间相同或更短,则不做推荐。
if (stopTime <= stopTimeTo) if (stopTime < stopTimeTo && i > indexTo + 3)
continue; continue;
} }
@ -358,8 +363,8 @@ namespace Web12306
}); });
} }
altTo.Sort(new AlternativeStationComparer()); altTo.Sort(new AlternativeStationComparer());
if (altTo.Count > 3) if (altTo.Count > 5)
altTo.RemoveRange(altFrom.Count - 3, 3); altTo.RemoveRange(5, altTo.Count - 5);
} }
//plus 原始线路 //plus 原始线路
altFrom.Add(new AlternativeStation altFrom.Add(new AlternativeStation

View File

@ -115,6 +115,13 @@
#chat_container .chat-editor > header { #chat_container .chat-editor > header {
} }
#chat_container .chat-editor > header > select,
#chat_container .chat-editor > header > input,
#chat_container .chat-editor > header > button {
margin-right: 5px;
}
#chat_container .chat-editor input[type='color'] { #chat_container .chat-editor input[type='color'] {
padding: 0; padding: 0;
background: none; background: none;

View File

@ -30,7 +30,6 @@
background-color: #ffffff; background-color: #ffffff;
padding: 6px; padding: 6px;
display: none; display: none;
min-width: 600px;
} }
.passenger-notverified { .passenger-notverified {

View File

@ -12,7 +12,7 @@
padding: 14px; padding: 14px;
border-radius: 0 5px 5px 5px; border-radius: 0 5px 5px 5px;
z-index: 100; z-index: 100;
width: 320px; width: 420px;
border: 1px solid #c7c7c7; border: 1px solid #c7c7c7;
display: none; display: none;
} }
@ -36,7 +36,7 @@
.travel-theme-wrap section ul li { .travel-theme-wrap section ul li {
float: left; float: left;
width: 150px; width: 200px;
margin-right: 14px; margin-right: 14px;
line-height: 35px; line-height: 35px;
position: relative; position: relative;

View File

@ -994,6 +994,7 @@
<section class="chat-editor"> <section class="chat-editor">
<header> <header>
<input type="color" value="" class="chat-editor-color" /> <input type="color" value="" class="chat-editor-color" />
<select><option value=''>插入表情字符</option></select>
<button type="button" class="chat-btn-cls">清屏</button> <button type="button" class="chat-btn-cls">清屏</button>
</header> </header>
<section contenteditable="true" class="chat-editor-container"></section> <section contenteditable="true" class="chat-editor-container"></section>

View File

@ -256,7 +256,7 @@
get: function () { get: function () {
return session && session.currentProfile; return session && session.currentProfile;
}, set: function (value) { }, set: function (value) {
session.currentProfile = $.extend({}, _.clone(that.defaultProfile), value); session.currentProfile = $.extend({}, JSON.parse(JSON.stringify(that.defaultProfile)), value);
that.fireEvent("currentProfileChanged"); that.fireEvent("currentProfileChanged");
that.save(); that.save();
} }

View File

@ -84,6 +84,7 @@
//木有结果。 //木有结果。
suggestion = []; suggestion = [];
cachedSuggest.data = suggestion; cachedSuggest.data = suggestion;
localStorage['trainsuggestion'] = JSON.stringify(cachedSuggest);
isInQuery = false; isInQuery = false;
return; return;
} }
@ -179,7 +180,7 @@
lastQuerySuggest = null; lastQuerySuggest = null;
}; };
this.checkTrainSuggestion = function () { this.checkTrainSuggestion = function () {
var suggestKey = cp.fromCode + cp.toCode + ((cp.selectedTrain || []).join("|")) + ((cp.selectedSeatType || []).join("|")); var suggestKey = cp.fromCode + cp.toCode + cp.depDate + ((cp.selectedTrain || []).join("|")) + ((cp.selectedSeatType || []).join("|"));
if (suggestKey === cachedSuggest.key && cachedSuggest.data) { if (suggestKey === cachedSuggest.key && cachedSuggest.data) {
if (!lastQuerySuggest || (new Date() - lastQuerySuggest) > data.suggestRefreshInterval) { if (!lastQuerySuggest || (new Date() - lastQuerySuggest) > data.suggestRefreshInterval) {

View File

@ -170,6 +170,8 @@
var editor = page.find("section.chat-editor"); var editor = page.find("section.chat-editor");
var sendBtn = editor.find(">footer>button.button-primary"); var sendBtn = editor.find(">footer>button.button-primary");
var editorArea = editor.find(".chat-editor-container"); var editorArea = editor.find(".chat-editor-container");
var specChars ="(^.^)\n(;_;)\n(¬_¬)\n(u_u)\n♪(´ε`)\n♪(´▽`)\n*_*\n⊙⊙!\n(ーー;)\n(-_-)zz\n↖(^ω^)↗\n囧rz\n^_^\n`(*∩_∩*)\n ̄□ ̄\nO(∩_∩)O\n*^_^* \n^_^#\n(☆_☆)/~~\n→_→ \n( o )~zZ\n(^ω^) \n(ˇ^ˇ)\no(>_<)o ~~\n>_<#\n⊙▂⊙\n╰_╯\n`(*><*)\n(⊙o⊙)\no(╯□╰)o\n::>_<:: \n=_=\nT_T\no(>_<)o ~~\n(#)凸\n:-x\n{{{(>_< )}}} \n(╯-╰)/ \nY(^o^)Y~\nY(^o^)Y~\n($ _ $)\no(︶︿︶)o\n⊙△⊙\n~~~^o^~~~\n╮(╯_╰)╭\n^_^#\n`(*∩_∩*)\n(⊙_⊙;)\n>_<||| \n@_@\n(⊙⊙?)\n^_~ \n(ˉ(∞)ˉ) \n^(oo)^ \n(◦ \"̮ ◦)\nヽミ ´∀`ミノ< \nヽ゚Д゚丿\nヽ(●´ε`●) \nヽ(≧Д≦)\nヽ(^0^)\nヾ(@^▽^@) \nヽ(*´∀`)\nヾ ^_^♪\n━(゚∀゚)━!\n(^▽^)コ祝贺你\nლ(╹ε╹ლ) \nლ(╹◡╹ლ)\nლ(^o^ლ) \nΣ(゚д゚lll)\nΣ(゚д゚;)\nΣ(TωT)努力--\nσ(´┰`=)\nε=┌(;・∀・)┘\nε=(・д・`*)ハァ…\nY(・∀・)Y 蟹\nY(>_<、)Y\nw(^_ン\n=0=\nT(;_;)T\np(^^)q\no(TヘTo)\noo\nm(-_-m) \nm(__)m\n♪(´ε` )\n☆彡\n☆ミ\n☆⌒(>。≪)\n☆⌒(*-゜)v\n≡(  ´Д`)/≡=\n∑(O_O)\n∑(・∀・) コ坏了 !!\n<(ToT)>\n{[(-_-)(-_-)]}zzz\n(・o・)/!\n(◎o◎)\n(^o^)/了解!\n(つд⊂)伤心\n゚Θ゚ \n(T▽T)\n(T_T)/~~\n(o・・o)/~\n(๑╹ڡ╹)╭ ♡\n(・。・)\n(・(仝)・)\n(・(ェ)・)\n¬з¬\n(=゚Д゚=)\n(=-ω-)zzZZ乙乙\n(--〆)\n( ̄Д ̄)ノ\n(-_-メ) \n(^^♪\n(^。^)y\n-.。o○\n(^ _ ^)/~~\n(-。-)y-゜゜゜\n(*゚Д゚)つミ匚___\n(*°∀°)=3\n(ー_ー)!!\n ^ω^\n( ^∀^)".split('\n');
var faceSelector = editor.find(">header>select");
var initEditor = function () { var initEditor = function () {
if (!sessMgr.current) if (!sessMgr.current)
@ -177,6 +179,19 @@
var color = sessMgr.current.options.chatColor || "#000000"; var color = sessMgr.current.options.chatColor || "#000000";
editor.find(">header .chat-editor-color").val(color); editor.find(">header .chat-editor-color").val(color);
editor.find(".chat-editor-container").css("color", color); editor.find(".chat-editor-container").css("color", color);
var faceDom = faceSelector[0];
specChars.forEach(function(f) {
var x = new Option(f, f);
faceDom.options[faceDom.options.length] = x;
});
faceSelector.change(function() {
var v = faceSelector.val();
if (v) {
pasteHtml(v);
}
faceSelector[0].selectedIndex = 0;
});
}; };
var delayEnableSend = function () { var delayEnableSend = function () {
sendBtn.prop("disabled", true); sendBtn.prop("disabled", true);
@ -184,6 +199,18 @@
sendBtn.prop("disabled", false); sendBtn.prop("disabled", false);
}, param.chatSendMsgDelay); }, param.chatSendMsgDelay);
}; };
var pasteHtml = function(html) {
editorArea.append(html);
var range = document.createRange();
range.selectNodeContents(editorArea[0]);
range.collapse(false);
var selection = window.getSelection();
selection.removeAllRanges();
selection.addRange(range);
editorArea[0].focus();
};
initEditor(); initEditor();
editor.find(".chat-editor-container").keyup(function (e) { editor.find(".chat-editor-container").keyup(function (e) {
@ -240,15 +267,7 @@
return; return;
var html = "<span class='chat-editor-at' contenteditable='false' data-un='" + un + "'>@" + name + "</span>&nbsp;"; var html = "<span class='chat-editor-at' contenteditable='false' data-un='" + un + "'>@" + name + "</span>&nbsp;";
editorArea.append(html); pasteHtml(html);
var range = document.createRange();
range.selectNodeContents(editorArea[0]);
range.collapse(false);
var selection = window.getSelection();
selection.removeAllRanges();
selection.addRange(range);
editorArea[0].focus();
}); });
$(document).on("click", "a.chat-frame-reconnect", function () { $(document).on("click", "a.chat-frame-reconnect", function () {
$(".chat-item").remove(); $(".chat-item").remove();

View File

@ -95,7 +95,7 @@
var currentList = null; var currentList = null;
var currentPageIndex = 1; var currentPageIndex = 1;
var allpasseengers = null; var allpasseengers = null;
var pagesize = 12; var pagesize = 15;
var totalpage = 0; var totalpage = 0;
var performSearch = function (key) { var performSearch = function (key) {
key = key || uiInput.val(); key = key || uiInput.val();

View File

@ -110,7 +110,7 @@
dom.find("div>p:eq(0) span").html(data.orderId); dom.find("div>p:eq(0) span").html(data.orderId);
submitProgress.removeClass().addClass("ticket-submit-status ticket-submit-status-ok"); submitProgress.removeClass().addClass("ticket-submit-status ticket-submit-status-ok");
submitProgress.find("span").html("订票成功!订单号为 " + data.orderId); submitProgress.find("span").html("订票成功!订单号为 " + data.orderId);
share.makeWeiboShare(document.getElementById("lnkShareWb"), null, "尝试了各种办法买国庆火车票,差点就要放弃,没想到用 @猎豹浏览器 一下子就抢到了想要的车票,给力啊! #国庆抢票,就用猎豹# ", null); share.makeWeiboShare(document.getElementById("lnkShareWb"), null, "国庆假期的火车票太难买了,还好 @猎豹浏览器 抢票杠杠的,帮我瞬间抢到了车票! #国庆抢票就用猎豹# http://www.ijinshan.com/12306/?f=weiboshare", null);
submitBtn[0].disabled = false; submitBtn[0].disabled = false;
//track //track

View File

@ -149,7 +149,7 @@
} }
} }
]; ];
if (isLb) { if (!isLb) {
btns.unshift({ btns.unshift({
text: "安装猎豹浏览器", text: "安装猎豹浏览器",
type: "primary", type: "primary",