From 081361619aee795f62e7fd78636451aa6061b99d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Thu, 16 Feb 2017 10:57:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0JS=20URI=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/admin/listen.js | 3 ++- public/static/admin/plugs.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/static/admin/listen.js b/public/static/admin/listen.js index db086fc7e..643a2b4bb 100644 --- a/public/static/admin/listen.js +++ b/public/static/admin/listen.js @@ -158,7 +158,8 @@ define(['jquery', 'admin.plugs'], function () { (/^\w{16}$/.test(token)) && (params.token = token); } delete params[""]; - return uri + '?' + $.param(params); + var query = '?' + $.param(params); + return uri + (query !== '?' ? query : ''); }; /*! 通过URI查询最有可能的菜单NODE */ function queryNode(url) { diff --git a/public/static/admin/plugs.js b/public/static/admin/plugs.js index f1f549854..0d08fed0e 100644 --- a/public/static/admin/plugs.js +++ b/public/static/admin/plugs.js @@ -236,7 +236,7 @@ define(['zeroclipboard', 'jquery'], function (ZeroClipboard) { if (typeof (res) === 'object') { return $.msg.auto(res, time); } - if (res.indexOf('A PHP Error was encountered') !== -1) { + if (res.indexOf('A PHP Error was encountered') > -1) { return $.msg.tips(self.errMsg.replace('{status}', 'E505 - ')); } self.show(res);