From eac0a039248e9a1c06cfbd0be6d403aeb363f5f0 Mon Sep 17 00:00:00 2001
From: linfeng <2445465217@qq.com>
Date: Wed, 6 Sep 2023 11:18:38 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E404=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../linfeng-community-uniapp-ky/App.vue | 8 ++-
.../linfeng-community-uniapp-ky/pages.json | 9 +++
.../pages/error/error.vue | 70 +++++++++++++++++++
3 files changed, 86 insertions(+), 1 deletion(-)
create mode 100644 src/main/resources/static/linfeng-community-uniapp-ky/pages/error/error.vue
diff --git a/src/main/resources/static/linfeng-community-uniapp-ky/App.vue b/src/main/resources/static/linfeng-community-uniapp-ky/App.vue
index ab8d2ea..252786b 100644
--- a/src/main/resources/static/linfeng-community-uniapp-ky/App.vue
+++ b/src/main/resources/static/linfeng-community-uniapp-ky/App.vue
@@ -8,6 +8,12 @@
},
onHide: function() {
console.log('App Hide')
+ },
+ onPageNotFound() {
+ // 跳转到 404 页面:
+ uni.redirectTo({
+ url: "pages/error/error"
+ });
}
}
@@ -16,4 +22,4 @@
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
@import "uview-ui/index.scss";
@import "static/css/iconfont.css";
-
+
\ No newline at end of file
diff --git a/src/main/resources/static/linfeng-community-uniapp-ky/pages.json b/src/main/resources/static/linfeng-community-uniapp-ky/pages.json
index 536c587..7b539f8 100644
--- a/src/main/resources/static/linfeng-community-uniapp-ky/pages.json
+++ b/src/main/resources/static/linfeng-community-uniapp-ky/pages.json
@@ -110,6 +110,15 @@
}
}
+ ,{
+ "path" : "pages/error/error",
+ "style" :
+ {
+ "navigationBarTitleText": "404",
+ "enablePullDownRefresh": false
+ }
+
+ }
],
"globalStyle": {
"navigationBarTextStyle": "black",
diff --git a/src/main/resources/static/linfeng-community-uniapp-ky/pages/error/error.vue b/src/main/resources/static/linfeng-community-uniapp-ky/pages/error/error.vue
new file mode 100644
index 0000000..b4b2043
--- /dev/null
+++ b/src/main/resources/static/linfeng-community-uniapp-ky/pages/error/error.vue
@@ -0,0 +1,70 @@
+
+
+ 页面迷路啦~
+ 请确认访问地址是否有误
+ 返回首页
+ 前往官网
+
+
+
+
\ No newline at end of file