feat(app): 新增首页地图动画组件并调整页面布局

- 添加 navbar 组件和 map 组件到首页
- 调整首页样式,增加 logo 和背景图片- 添加气球动画元素
- 调整 App.vue 样式,设置最小高度为 100vh
- 更新 .env
This commit is contained in:
陈昱达
2025-07-03 18:27:43 +08:00
parent b54233b8a0
commit 469c23c8ea
28 changed files with 233 additions and 77 deletions

1
.env
View File

@@ -4,3 +4,4 @@ NODE_ENV = 'dev' // 如果是生产环境请记得切换为production
# flag
VUE_APP_FLAG='dev'
VUE_APP_ADMIN='http://192.168.1.1:7006/'
VUE_APP_IMAGE='http://192.168.1.1:7006/'

View File

@@ -38,6 +38,7 @@ export default {
-moz-osx-font-smoothing: grayscale;
color: #2c3e50;
font-size: 14px;
min-height: 100vh;
}
.slide-left-leave-active,
.slide-left-enter-active,

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1017 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 KiB

View File

@@ -0,0 +1,30 @@
<template>
<div class="flex align-items-c justify-content-b p13 bg-white">
<img src="../assets/images/home/logo.png" alt="" class="logo" />
<div class="flex align-items-c">
<img src="../assets/images/home/search.png" alt="" class="navbar-icon" />
<img src="../assets/images/home/more.png" alt="" class="navbar-icon" />
</div>
</div>
</template>
<style scoped lang="scss">
.logo {
width: 106px;
height: 34px;
}
.ph13 {
padding-left: 13px;
padding-right: 13px;
}
.p13 {
padding: 13px;
}
.navbar-icon {
width: 18px;
height: 18px;
}
.navbar-icon + .navbar-icon {
margin-left: 25px;
}
</style>

View File

@@ -1,59 +0,0 @@
<template>
<div class="function-van-cellst-container">
<van-cell-group class="fs14 p20">
<van-cell class="fs18 mb10">基础功能清单</van-cell>
<van-cell>
1apirouterstore等模块划分
</van-cell>
<van-cell>
2mock方案rap2登录我的信息接口mock
</van-cell>
<van-cell>
3权限控制路由拦截器http拦截器
</van-cell>
<van-cell>
4表单验证
</van-cell>
<van-cell>
5常用sass
</van-cell>
<van-cell>
6路由页面切换动画
</van-cell>
<van-cell>
7多环境打包配置
</van-cell>
<van-cell>
8esvan-cellnt + prettier
</van-cell>
<van-cell>9移动端适配方案vw</van-cell>
<van-cell>10主题定制</van-cell>
<van-cell>
11过滤器注册移动端300ms延时调试工具eruda
</van-cell>
</van-cell-group>
<van-tabbar v-model="active">
<van-tabbar-item icon="home-o">首页</van-tabbar-item>
<van-tabbar-item icon="setting-o" @click="$toast('暂未开发……')">我的</van-tabbar-item>
</van-tabbar>
</div>
</template>
<script>
import { Tabbar, TabbarItem,Cell,CellGroup } from 'vant'
export default {
name: 'functionvan-cellst',
components: {
[Tabbar.name]: Tabbar,
[TabbarItem.name]: TabbarItem,
[Cell.name]: Cell,
[CellGroup.name]: CellGroup
},
data() {
return {
active: 0
}
}
}
</script>
<style lang="scss" scoped></style>

View File

@@ -4,37 +4,63 @@ http://www.ebiz-interactive.com/
-->
<template>
<div class="container">
<functionList></functionList>
<div class="container home-xfrs">
<navbar></navbar>
<div class="home-container">
<div class="home-logo">
<img src="../../assets/images/home/homeLogo.png" alt="" />
</div>
<!--地图动画 -->
<div class="animate-map">
<MapComp></MapComp>
</div>
<!-- 气球-->
<div class="animate-boll"></div>
</div>
</div>
</template>
<script>
import functionList from '@/views/app/FunctionList.vue'
import Navbar from '@/generatedComponents/navbar.vue'
import MapComp from '@/views/app/homeComponents/map.vue'
export default {
components: {
functionList
MapComp,
Navbar,
},
props: {},
data() {
return {
formData: {},
mtab37656ActiveTab: 'tab1',
mtab49216ActiveTab: 'tab1'
}
},
computed: {},
watch: {},
created() {},
mounted() {},
methods: {
// H5提交函数
submitForm() {}
}
}
</script>
<style lang="scss"></style>
<style lang="scss" scoped>
.home-xfrs {
display: flex;
flex-direction: column;
height: 100vh;
.home-container {
background: url('../../assets/images/home/homeBack.png') no-repeat 100% 100% / cover;
flex: 1;
& .home-logo {
padding-top: 48px;
padding-left: 30px;
img {
width: 205px;
height: 67px;
}
}
& .animate-map {
position: relative;
}
<style lang="scss" scoped></style>
& .animate-boll {
position: absolute;
}
}
}
</style>

View File

@@ -0,0 +1,157 @@
<template>
<div id="map-container" class="container map-container flex">
<!-- 睿智财富 -->
<div class="map-1 map">
<div class="relative">
<img src="../../../assets/images/home/map-1-t1.png" alt="" class="map-1-t1" />
<img src="" alt="" class="map-1-t1-ban" />
<img src="" alt="" class="map-1-t1-road" />
<div class="cursor">
<div class="cursor-title">睿智财富</div>
<div class="cursor-pointer"></div>
</div>
</div>
</div>
<!-- <div class="map-2 map">-->
<!-- <div class="relative">-->
<!-- <img src="" alt="" class="map-1-t1" />-->
<!-- <img src="" alt="" class="map-1-t1-ban" />-->
<!-- <img src="" alt="" class="map-1-t1-road" />-->
<!-- <div class="cursor">-->
<!-- <div class="cursor-title">乐活人生</div>-->
<!-- <div class="cursor-pointer"></div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="map-3 map">-->
<!-- <div class="relative">-->
<!-- <img src="" alt="" class="map-1-t1" />-->
<!-- <img src="" alt="" class="map-1-t1-ban" />-->
<!-- <img src="" alt="" class="map-1-t1-road" />-->
<!-- <div class="cursor">-->
<!-- <div class="cursor-title">养老生活</div>-->
<!-- <div class="cursor-pointer"></div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="map-4 map">-->
<!-- <div class="relative">-->
<!-- <img src="" alt="" class="map-1-t1" />-->
<!-- <img src="" alt="" class="map-1-t1-ban" />-->
<!-- <img src="" alt="" class="map-1-t1-road" />-->
<!-- <div class="cursor">-->
<!-- <div class="cursor-title">臻享健康</div>-->
<!-- <div class="cursor-pointer"></div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="map-5 map">-->
<!-- <div class="relative">-->
<!-- <img src="" alt="" class="map-1-t1" />-->
<!-- <img src="" alt="" class="map-1-t1-ban" />-->
<!-- <img src="" alt="" class="map-1-t1-road" />-->
<!-- <div class="cursor">-->
<!-- <div class="cursor-title">成长护航</div>-->
<!-- <div class="cursor-pointer"></div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<div class="map-6"></div>
</div>
</template>
<script>
export default {
name: 'map',
data() {
return {}
},
methods: {},
mounted() {
const cursors = document.querySelectorAll('.cursor')
cursors.forEach((cursor) => {
cursor.addEventListener('click', () => {
// 移除所有 .map 的 active 类
document.querySelectorAll('.cursor').forEach((map) => {
map.classList.remove('active')
})
// 给当前点击的 .cursor 所在的 .map 添加 active 类
const currentMap = cursor.closest('.cursor')
if (currentMap) {
currentMap.classList.add('active')
}
})
})
},
}
</script>
<style scoped lang="scss">
.relative {
position: relative;
}
.cursor {
position: absolute;
cursor: pointer;
display: flex;
flex-direction: column;
align-items: center;
//width: 150px;
& .cursor-pointer {
background: url('../../../assets/images/home/pointer.png') no-repeat 100% 100% / contain;
width: 36px;
height: 46px;
margin-top: 10px;
}
& .cursor-title {
color: red;
font-size: 19px;
font-weight: 800;
padding: 5px 10px;
background: #fff;
border: 2px solid red;
border-radius: 8px;
}
&.active {
& .cursor-title {
color: white;
font-size: 20px;
font-weight: 700;
background: red;
//外发光
box-shadow: 0 0 4px 5px #fff;
}
& .cursor-pointer {
background: url('../../../assets/images/home/pointer2.png') no-repeat 100% 100% / contain;
//width: 71px;
//height: 46px;
}
}
}
#map-container * {
transition: all 0.3s ease-in-out;
}
#map-container {
position: relative;
& .map {
position: absolute;
&.map-1 {
width: 142px;
height: 120px;
& .relative {
& .map-1-t1 {
width: 142px;
height: 120px;
// 旋转
//transform: rotate(-10deg);
}
}
}
}
}
</style>
<script setup></script>

View File

@@ -5,7 +5,7 @@ function resolve(dir) {
return path.join(__dirname, dir)
}
module.exports = {
publicPath: '/saleH5',
publicPath: '/h5',
lintOnSave: false, //是否开启代码检查
outputDir: 'dist', //打包输出目录
productionSourceMap: false,