feat: 首页调整

This commit is contained in:
2026-04-27 14:40:45 +08:00
parent 058c9c0e77
commit b41ca9c4a2
2 changed files with 11 additions and 31 deletions

View File

@@ -1,14 +1,11 @@
<template>
<AiTabSwitch v-model="tabIndex" :list="['探索发现', 'AI伴游']" @change="handleChange" />
<view> 探索发现
</view>
</template>
<script setup>
import { ref } from "vue";
import AiTabSwitch from "@/components/AiTabSwitch/index.vue";
const tabIndex = ref(0);
const handleChange = (i) => {
console.log("切换:", i);
};
</script>

View File

@@ -27,25 +27,9 @@
@change="handleChange"
/>
<view>
<view
class="absolute top-0 left-0 w-full h-full flex flex-col items-center justify-center"
>
<text class="font-size-24 font-bold color-white mb-4"
>欢迎来到AI助手</text
>
<text class="font-size-16 color-white mb-8"
>您的智能聊天伴侣随时为您提供帮助</text
>
<view class="flex space-x-4">
<view class="px-6 py-2 bg-green-500 text-white rounded-lg"
>开始聊天</view
>
<view class="px-6 py-2 bg-gray-300 text-gray-700 rounded-lg"
>了解更多</view
>
</view>
</view>
<view class="tab-content">
<Discovery v-if="tabIndex === 0" />
<ChatMainList v-if="tabIndex === 1" />
</view>
</view>
</view>
@@ -57,8 +41,9 @@ import { onLoad } from "@dcloudio/uni-app";
import HomeNavBar from "./components/HomeNavBar.vue";
import HomeWelcome from "./components/HomeWelcome.vue";
import AiTabSwitch from "@/components/AiTabSwitch/index.vue";
import ChatMainList from "../ChatMain/ChatMainList/index.vue";
import Discovery from "../Discovery/index.vue";
const tabIndex = ref(0);
@@ -80,7 +65,5 @@ onLoad(() => {
</script>
<style scoped>
.bg-color {
background: red;
}
</style>