diff --git a/resources/assets/js/App.vue b/resources/assets/js/App.vue index 0616d176f..8ba91d139 100755 --- a/resources/assets/js/App.vue +++ b/resources/assets/js/App.vue @@ -1,7 +1,7 @@ @@ -51,6 +67,8 @@ import NetworkException from "./components/NetworkException"; import GuidePage from "./components/GuidePage"; import TaskOperation from "./pages/manage/components/TaskOperation"; import MeetingManager from "./pages/manage/components/MeetingManager"; +import MobileNotification from "./components/Mobile/Notification.vue"; +import MobileBack from "./components/Mobile/Back.vue"; import DropdownMenu from "./components/DropdownMenu"; import {ctrlPressed} from "./mixins/ctrlPressed"; import {mapState} from "vuex"; @@ -60,6 +78,7 @@ export default { mixins: [ctrlPressed], components: { + MobileBack, MobileNotification, AuthException, MeetingManager, DropdownMenu, @@ -74,8 +93,9 @@ export default { data() { return { appInter: null, + appBackgroundColor: "#f8f8f8", countDown: Math.min(30, 60 - $A.daytz().second()), - lastCheckUpgradeYmd: $A.daytz().format('YYYY-MM-DD') + lastCheckUpgradeYmd: $A.daytz().format('YYYY-MM-DD'), } }, @@ -95,14 +115,28 @@ export default { }, computed: { - ...mapState(['ws', 'themeConf', 'windowOrientation']), + ...mapState(['ws', 'themeConf', 'windowOrientation', 'safeAreaSize']), + + appStyle({appBackgroundColor}) { + return { + backgroundColor: appBackgroundColor, + } + }, + + childStyle({safeAreaSize}) { + return { + top: `${safeAreaSize.top}px`, + bottom: `${safeAreaSize.bottom}px`, + } + }, }, watch: { '$route': { - handler(to) { - this.$store.state.routeName = to.name - this.$store.state.routePath = to.path + handler({name, path, params}) { + this.$store.state.routeName = name + this.$store.state.routePath = path + this.$store.state.mobileTabbar = (name === 'manage-project' && !/^\d+$/.test(params.projectId)) || ['manage-dashboard', 'manage-messenger', 'manage-application'].includes(name); }, immediate: true, }, diff --git a/resources/assets/js/components/Mobile/Back.vue b/resources/assets/js/components/Mobile/Back.vue index d5eacbb6a..1d0bf7ea3 100644 --- a/resources/assets/js/components/Mobile/Back.vue +++ b/resources/assets/js/components/Mobile/Back.vue @@ -10,12 +10,6 @@ import microApp from '@micro-zoe/micro-app' export default { name: "MobileBack", - props: { - showTabbar: { - type: Boolean, - default: false - }, - }, data() { return { @@ -46,7 +40,7 @@ export default { }, computed: { - ...mapState(['fileLists', 'messengerSearchKey']), + ...mapState(['fileLists', 'messengerSearchKey', 'mobileTabbar']), style() { const offset = 135; @@ -112,7 +106,7 @@ export default { }, canBack() { - if (!this.showTabbar) { + if (!this.mobileTabbar) { return true; } if (this.$Modal.visibles().length > 0) { diff --git a/resources/assets/js/components/Mobile/Notification.vue b/resources/assets/js/components/Mobile/Notification.vue index ba76e52ed..043d2f48d 100644 --- a/resources/assets/js/components/Mobile/Notification.vue +++ b/resources/assets/js/components/Mobile/Notification.vue @@ -14,6 +14,8 @@