改进参数检查

This commit is contained in:
wolegca 2019-10-19 22:13:48 +08:00
parent c47209899d
commit 6d96bd8578

View File

@ -1,7 +1,7 @@
(function () {
var index = getQueryString('i');
if (index == '') {
message.alert('发生错误', '缺少参数请检查URL是否正确', function () {
var index = window.parseInt(getQueryString('i'));
if (window.isNaN(index)) {
message.alert('发生错误', '缺少参数或参数类型不正确请检查URL是否正确', function () {
window.location.replace('/');
});
return;