version temp
This commit is contained in:
@@ -2,11 +2,7 @@
|
||||
<div class="home-layout min-h-screen flex flex-col">
|
||||
<!-- Header -->
|
||||
<div class="header">
|
||||
<img
|
||||
class="logo rounded-full overflow-hidden"
|
||||
src="/logo.jpg"
|
||||
alt="Logo"
|
||||
/>
|
||||
<img class="logo rounded-full overflow-hidden" src="/logo.jpg" alt="Logo" />
|
||||
<div class="title">天远数据</div>
|
||||
</div>
|
||||
|
||||
@@ -18,12 +14,8 @@
|
||||
<!-- Vant Tabbar -->
|
||||
|
||||
<van-tabbar v-model="tabbar" @change="tabChange">
|
||||
<van-tabbar-item
|
||||
v-for="(item, index) in menu"
|
||||
:key="index"
|
||||
:name="item.name"
|
||||
:icon="item.icon"
|
||||
>{{ item.title }}
|
||||
<van-tabbar-item v-for="(item, index) in menu" :key="index" :name="item.name" :icon="item.icon">{{
|
||||
item.title }}
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
|
||||
@@ -35,11 +27,7 @@
|
||||
<div class="disclaimer">
|
||||
<div class="flex flex-col items-center">
|
||||
<div class="flex items-center">
|
||||
<img
|
||||
class="w-4 h-4 mr-2"
|
||||
src="@/assets/images/public_security_record_icon.png"
|
||||
alt="公安备案"
|
||||
/>
|
||||
<img class="w-4 h-4 mr-2" src="@/assets/images/public_security_record_icon.png" alt="公安备案" />
|
||||
<text>琼公网安备46010002000584号</text>
|
||||
</div>
|
||||
<div>
|
||||
@@ -54,7 +42,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import { ref, reactive, onMounted, watch } from "vue";
|
||||
import { useRoute, useRouter } from "vue-router"; // 引入 Vue Router
|
||||
|
||||
const router = useRouter();
|
||||
@@ -62,7 +50,7 @@ const route = useRoute();
|
||||
const tabbar = ref("index");
|
||||
const menu = reactive([
|
||||
{ title: "首页", icon: "home-o", name: "index" },
|
||||
{ title: "推广", icon: "fire-o", name: "promote" },
|
||||
{ title: "更多", icon: "more-o", name: "more" },
|
||||
{ title: "资产", icon: "gold-coin-o", name: "agent" },
|
||||
{ title: "我的", icon: "user-o", name: "me" }
|
||||
]);
|
||||
@@ -73,23 +61,44 @@ onMounted(() => {
|
||||
tabbar.value = currentPage;
|
||||
});
|
||||
|
||||
const onClickOverlay = () => {};
|
||||
// 监听路由变化,更新 tabbar
|
||||
watch(() => route.name, (newName) => {
|
||||
if (newName) {
|
||||
tabbar.value = newName;
|
||||
}
|
||||
});
|
||||
|
||||
const onClickOverlay = () => { };
|
||||
// 跳转到相应页面
|
||||
const tabChange = (name) => {
|
||||
const tabChange = (name, a, b, c) => {
|
||||
if (name === "more") {
|
||||
showConfirmDialog({
|
||||
title: '更多报告',
|
||||
message:
|
||||
'是否前往天远查查询更多报告',
|
||||
})
|
||||
.then(() => {
|
||||
window.location.href = "https://www.tianyuancha.cn";
|
||||
})
|
||||
.catch(() => {
|
||||
tabbar.value = route.name;
|
||||
})
|
||||
return;
|
||||
}
|
||||
router.push({ name }); // 使用 Vue Router 进行跳转
|
||||
};
|
||||
|
||||
// 跳转到投诉页面
|
||||
const toComplaint = () => {
|
||||
window.location.href =
|
||||
"https://work.weixin.qq.com/kfid/kfc76b1d0f0d562777a"; // 跳转到客服页面
|
||||
"https://work.weixin.qq.com/kfid/kfc8a32720024833f57"; // 跳转到客服页面
|
||||
// router.push({ name: 'complaint' }); // 使用 Vue Router 进行跳转
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.home-layout {
|
||||
@apply from-orange-100/20 to-white bg-gradient-to-b
|
||||
@apply from-orange-100/20 to-white bg-gradient-to-b
|
||||
}
|
||||
|
||||
.header {
|
||||
|
||||
Reference in New Issue
Block a user