-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathApp.vue
More file actions
43 lines (35 loc) · 821 Bytes
/
App.vue
File metadata and controls
43 lines (35 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<script setup>
import { onLaunch, onShow, onHide, onError, onPageNotFound, onUnhandledRejection } from "@dcloudio/uni-app";
import { checkForUpdate } from "@/utils";
import { redirectTo404Page } from "@/router";
onLaunch(() => {
console.log("App Launch");
// #ifdef MP-WEIXIN
checkForUpdate();
// #endif
});
onShow(() => {
console.log("App Show");
});
onHide(() => {
console.log("App Hide");
});
onError((error) => {
console.error("App Error", error);
});
onUnhandledRejection((res) => {
console.error("App UnhandledRejection", res);
});
onPageNotFound((res) => {
console.error("App PageNotFound", res);
redirectTo404Page();
});
</script>
<style lang="scss">
/* 每个页面公共css */
page {
height: 100%;
}
/* uv-ui基础样式 */
@import "@/uni_modules/uv-ui-tools/index.scss";
</style>