优化代码
This commit is contained in:
parent
fd2714e968
commit
b081a06cf9
11
src/App.vue
11
src/App.vue
|
@ -4,8 +4,17 @@ export default {
|
||||||
pageConfig: {},
|
pageConfig: {},
|
||||||
},
|
},
|
||||||
onLaunch: function () {
|
onLaunch: function () {
|
||||||
|
let that = this;
|
||||||
|
for (let method of ["navigateTo", "redirectTo", "reLaunch", "switchTab", "navigateBack"]) {
|
||||||
|
uni.addInterceptor(method, {
|
||||||
|
success() {
|
||||||
|
that.$store.commit("toast/show", false);
|
||||||
|
that.$store.commit("toast/title", "");
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
let pageConfig = this.$storage.get("system_config");
|
let pageConfig = this.$storage.get("system_config");
|
||||||
if (true) {
|
if (!pageConfig) {
|
||||||
const { windowWidth, windowHeight, statusBarHeight, safeAreaInsets } = uni.getSystemInfoSync();
|
const { windowWidth, windowHeight, statusBarHeight, safeAreaInsets } = uni.getSystemInfoSync();
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
const { height, top } = uni.getMenuButtonBoundingClientRect();
|
const { height, top } = uni.getMenuButtonBoundingClientRect();
|
||||||
|
|
Loading…
Reference in New Issue