一、总则
diff --git a/plugins/permission.js b/plugins/permission.js
index bed1f8e..783a0e9 100644
--- a/plugins/permission.js
+++ b/plugins/permission.js
@@ -21,7 +21,7 @@ routes.forEach((item) => {
* @returns
*/
export function hasPerm(path = "") {
- if (!isPathExists(path)) {
+ if (!isPathExists(path) && path !== '/') {
uni.redirectTo({
url: ERROR404_PATH,
});
@@ -34,7 +34,7 @@ export function hasPerm(path = "") {
if (!hasPermission) {
// 将用户的目标路径传递过去,这样可以实现用户登录之后,直接跳转到目标页面
uni.redirectTo({
- url: `/pages/index/index`,
+ url: `${LOGIN_PATH}?redirect=${encodeURIComponent(path)}`,
});
}
return hasPermission;
diff --git a/static/404.png b/static/404.png
new file mode 100644
index 0000000..c4d3dbf
Binary files /dev/null and b/static/404.png differ
diff --git a/static/imgs/alipay.png b/static/imgs/alipay.png
new file mode 100644
index 0000000..9a193c4
Binary files /dev/null and b/static/imgs/alipay.png differ