更新JS URI计算规则

This commit is contained in:
邹景立 2017-02-16 10:57:52 +08:00
parent 942ac89cf1
commit 081361619a
2 changed files with 3 additions and 2 deletions

View File

@ -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) {

View File

@ -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);