diff --git a/pages/API/get-current-pages/get-current-pages.uvue b/pages/API/get-current-pages/get-current-pages.uvue
index 6d2412e41d0990544499b33598e53b979573c1f4..92ea03ec7b1de8ceabe9b25cdce10ebfd55ae13d 100644
--- a/pages/API/get-current-pages/get-current-pages.uvue
+++ b/pages/API/get-current-pages/get-current-pages.uvue
@@ -1,7 +1,7 @@
-
+
@@ -9,9 +9,7 @@
当前页面栈中 {{ pages.length }} 个页面,列表如下:
- index: {{ index }}, route: {{ page.route }}
+ index: {{ index }}, route: {{ page.route }}
@@ -21,11 +19,7 @@
-
-
+
@@ -108,7 +85,10 @@
return JSON.stringify(this.currentPageStyle)
}
},
- onLoad() {
+ onLoad(options : OnLoadOptions) {
+ if (options instanceof UTSJSONObject) {
+ this.checked = true
+ }
this.getPageStyle();
},
onPullDownRefresh() {
@@ -124,7 +104,7 @@
this.pages.length = 0
const pages = getCurrentPages()
this.pages.push(new Page(pages[0].route))
- if (this.pages[0].route.includes('/tabBar/') || this.pages[0].route == '/') {
+ if (this.checked && (this.pages[0].route.includes('/tabBar/') || this.pages[0].route == '/')) {
this.checked = true
}
for (let i = 1; i < pages.length; i++) {
@@ -175,7 +155,7 @@
const page = this.getCurrentPage()
let res = this.$page === page
if (this.testing && res) {
- res = page.options.get('test') == '123'
+ res = page.options['test'] == '123'
if (res) {
// #ifdef WEB
res = page.route == '/pages/API/get-current-pages/get-current-pages'
@@ -233,43 +213,43 @@
diff --git a/pages/API/navigator/new-page/new-page-1.uvue b/pages/API/navigator/new-page/new-page-1.uvue
index a67ad2e5489900cfe5f2c561d7813a1258993dff..4c18337089851a6d41b1946b75e5db412981aeb1 100644
--- a/pages/API/navigator/new-page/new-page-1.uvue
+++ b/pages/API/navigator/new-page/new-page-1.uvue
@@ -20,7 +20,7 @@
},
onLoad(options : OnLoadOptions) {
if (options['data'] != null) {
- this.data = options['data'] as string
+ this.data = options['data']!
}
},
methods: {
@@ -46,4 +46,4 @@
}
},
}
-
+
diff --git a/pages/template/list-news/detail/detail.uvue b/pages/template/list-news/detail/detail.uvue
index b667e56795a2c231c2b6d32b301df9a6fe14eae2..9f160926b901b965afb581c75ca674a315b4d92d 100644
--- a/pages/template/list-news/detail/detail.uvue
+++ b/pages/template/list-news/detail/detail.uvue
@@ -23,9 +23,9 @@
}
},
onLoad(event : OnLoadOptions) {
- this.post_id = event["post_id"] as string ?? "";
- this.cover = event["cover"] as string ?? "";
- this.title = event["title"] as string ?? "";
+ this.post_id = event["post_id"] ?? "";
+ this.cover = event["cover"] ?? "";
+ this.title = event["title"] ?? "";
this.getDetail();
},
methods: {