diff --git a/Web12306/css/ui/query-result.css b/Web12306/css/ui/query-result.css index f97de0a..db26624 100644 --- a/Web12306/css/ui/query-result.css +++ b/Web12306/css/ui/query-result.css @@ -282,6 +282,8 @@ #suggestion .result .train-list { border: 1px solid #dcdcdc; padding: 10px; + max-width: 500px; + word-wrap: break-word; } #suggestion .result .train-list span { diff --git a/Web12306/js/ui/chat/roomsession.js b/Web12306/js/ui/chat/roomsession.js index cfe97c0..339de0b 100644 --- a/Web12306/js/ui/chat/roomsession.js +++ b/Web12306/js/ui/chat/roomsession.js @@ -168,8 +168,10 @@ .done(function (json) { tip.close(); if (json.resCode === 0) { - data.images.push(json.data.img_url); - port.postMessage("chatRoomSendMsg", coder.encode(data)); + setTimeout(function () { + data.images.push(json.data.img_url); + port.postMessage("chatRoomSendMsg", coder.encode(data)); + }, 1000); } }).fail(function () { tip.setState("error", "图片上传失败:服务器开小差了...."); @@ -230,7 +232,7 @@ if (msg.color) msg.color = "#" + msg.color; //咩哈哈哈哈 - if (msg.fromUser === "iccfish" || msg.fromUser.username === "imfish") { + if (msg.fromUser.username === "iccfish" || msg.fromUser.username === "imfish") { msg.fromUser.realname = "木魚"; msg.fromUser.exStyle = "font-weight:bold;"; } @@ -356,30 +358,30 @@ editor.find(">header .chat-editor-color").val(color); editor.find(".chat-editor-container").css("color", color); - faceSelector.click(function () { - editor.find(">header>.popup-smail").toggleClass("popup-smail-on"); - loadImgIcons(); - }); - $(document).on("click", ".popup-smail>li", function () { - var img = this.childNodes[0]; - pasteHtml("  "); - editor.find(">header>.popup-smail-on").removeClass("popup-smail-on"); - }); - //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; - //}); - $(".chat-items").on("click", ".chat-item > section > img", function () { - $(this).colorbox({ html: this.outerHTML }); - }); }; + faceSelector.click(function () { + editor.find(">header>.popup-smail").toggleClass("popup-smail-on"); + loadImgIcons(); + }); + $(document).on("click", ".popup-smail>li", function () { + var img = this.childNodes[0]; + pasteHtml("  "); + editor.find(">header>.popup-smail-on").removeClass("popup-smail-on"); + }); + //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; + //}); + $(".chat-items").on("click", ".chat-item > section > img", function () { + $(this).colorbox({ html: this.outerHTML }); + }); var delayEnableSend = function () { sendBtn.prop("disabled", true); setTimeout(function () { @@ -491,7 +493,7 @@ var authorlink = item.find(".chat-item-at:eq(0)")[0]; var username = authorlink.dataset.un; - if (username === '*') { + if (username === '*' || username === "imfish" || username === "iccfish") { mp.showMessagePopup("error", "亲,不可以举报我们伟大的管理员哦 ♪(´ε`)"); return; }