1
0
mirror of https://gitee.com/bookshelfplus/bookshelfplus synced 2025-09-25 19:05:14 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

引入sweetalert代替alert;用户注册密码长度及字符校验;注册页前端显示密码策略及样式优化;字体渲染显示网页逻辑调整;后端添加40004错误码

This commit is contained in:
2022-04-28 19:34:00 +08:00
parent 3028d0d008
commit 1378ef1bdf
32 changed files with 291 additions and 184 deletions

View File

@@ -7,8 +7,9 @@
var fileObjectId = params.id;
var fileId = params.fileId;
if (!fileId) {
alert("未传入 fileId ");
history.go(-1);
swal("未传入 fileId ").then(function () {
history.go(-1);
});
}
var isModify = fileObjectId ? true : false;
@@ -28,11 +29,12 @@
data: { id: fileObjectId },
success: function (data) {
console.log(data);
alert(isModify ? "修改成功!" : "添加成功!");
if (params.referrer)
location.replace(params.referrer);
else
history.go(-1);
swal(isModify ? "修改成功!" : "添加成功!").then(function () {
if (params.referrer)
location.replace(params.referrer);
else
history.go(-1);
});
}
});
}
@@ -47,9 +49,10 @@
console.log(data)
return data;
} else {
alert(`出错啦!${data.errMsg} (错误码: ${data.errCode}) `);
// 回到上一页
history.go(-1);
swal(`出错啦!${data.errMsg} (错误码: ${data.errCode})`).then(function () {
// 回到上一页
history.go(-1);
});
}
}