|
@@ -21,7 +21,37 @@
|
|
subviewHeight: 0,
|
|
subviewHeight: 0,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ mounted() {
|
|
|
|
+ let systemInfo = uni.getSystemInfoSync()
|
|
|
|
+
|
|
|
|
+ this.subviewTop = 60
|
|
|
|
+ this.subviewHeight = systemInfo.screenHeight - this.subviewTop
|
|
|
|
+
|
|
|
|
+ this.onNotification()
|
|
|
|
+ },
|
|
|
|
+ onUnload() {
|
|
|
|
+ this.offNotification()
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
|
|
+ onNotification() {
|
|
|
|
+ let self = this
|
|
|
|
+ uni.$on(config.notification.switch_page_index, function(index) {
|
|
|
|
+ if(self.nav_current_index == index) {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ self.nav_current_index = index
|
|
|
|
+ })
|
|
|
|
+ uni.$on(config.notification.login_success_goback_after_gotoAI, function() {
|
|
|
|
+ if(self.nav_current_index == config.page_index.ai_chat) {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ self.nav_current_index = config.page_index.ai_chat
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ offNotification() {
|
|
|
|
+ uni.$off(config.notification.switch_page_index)
|
|
|
|
+ uni.$off(config.notification.login_success_goback_after_gotoAI)
|
|
|
|
+ },
|
|
homeNavigatorClick(index) {
|
|
homeNavigatorClick(index) {
|
|
if(index == config.page_index.ai_chat ||
|
|
if(index == config.page_index.ai_chat ||
|
|
index == config.page_index.ai_draw) {
|
|
index == config.page_index.ai_draw) {
|
|
@@ -33,23 +63,6 @@
|
|
this.tools.current_navigator_page_index = index
|
|
this.tools.current_navigator_page_index = index
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- mounted() {
|
|
|
|
- let systemInfo = uni.getSystemInfoSync()
|
|
|
|
-
|
|
|
|
- this.subviewTop = 60
|
|
|
|
- this.subviewHeight = systemInfo.screenHeight - this.subviewTop
|
|
|
|
-
|
|
|
|
- let self = this
|
|
|
|
- uni.$on(config.notification.switch_page_index, function(index) {
|
|
|
|
- if(self.nav_current_index == index) {
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- self.nav_current_index = index
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- onUnload() {
|
|
|
|
- uni.$off(config.notification.switch_page_index)
|
|
|
|
- },
|
|
|
|
components: {
|
|
components: {
|
|
enterNavigator,
|
|
enterNavigator,
|
|
home,
|
|
home,
|