future vor 2 Jahren
Ursprung
Commit
efeab53d5f
4 geänderte Dateien mit 23 neuen und 1 gelöschten Zeilen
  1. 8 0
      pages/enter/enter-navigator.vue
  2. 8 0
      pages/enter/enter.vue
  3. 6 1
      pages/home/home-brief.vue
  4. 1 0
      utils/config.js

+ 8 - 0
pages/enter/enter-navigator.vue

@@ -32,6 +32,14 @@
 				default: 0
 			}
 		},
+		watch: {
+			selectedIndex: {
+				handler(newVal) {
+					this.currenIndex = newVal
+				},
+				immediate: true
+			},
+		},		
 		mounted() {
 			this.is_login = this.tools.is_login()
 			this.$emit('clickToIndex', this.currenIndex)

+ 8 - 0
pages/enter/enter.vue

@@ -37,6 +37,14 @@
 			
 			this.subviewTop = 60
 			this.subviewHeight = systemInfo.screenHeight - this.subviewTop
+			
+			let self = this
+			uni.$on(config.notification.switch_page_index, function(index) {
+				self.nav_current_index = index
+			})
+		},
+		onUnload() {
+			uni.$off(config.notification.switch_page_index)
 		},
 		components: {
 			enterNavigator,

+ 6 - 1
pages/home/home-brief.vue

@@ -8,7 +8,7 @@
 				<view class="briefContent_info_content">
 					基于人工智能技术开发而成的个人助手,能够极大地提高办公和生活效率为用户节省处理事务的时间和精力。无论是在工作还是日常生活中,智能助理都可以帮助用户提高处理信息的速度,更快地完成工作和安排,打造更加便捷、高效的生活。通过智能学习和精准分析,智能助理还可以了解用户的喜好和习惯,为用户提供个性化的服务和建议,让用户的使用更加舒适和无忧。
 				</view>
-				<view class="briefContent_button">
+				<view class="briefContent_button" @click="clickToTiyan">
 					立即体验 →
 				</view>
 			</view>
@@ -27,6 +27,11 @@
 			}
 		},
 		methods: {
+			clickToTiyan() {
+				if(this.tools.is_login_gotoLogin()) {
+					uni.$emit(this.config.notification.switch_page_index, this.config.page_index.ai_chat)
+				}
+			}
 			
 		}
 	}

+ 1 - 0
utils/config.js

@@ -9,6 +9,7 @@ const config = {
 	},
 	notification:{
 		login_state_changed:"login_state_changed",
+		switch_page_index: "switch_page_index",
 	},
 	userData:"userData",
 };