Browse Source

Merge branch 'dev' of company:project-shenyangk11/sy_k11_H_base_daoshi_vue_ts into dev

pull/2/head
deepblues 3 years ago
parent
commit
462210ffdf
  1. 19138
      package-lock.json
  2. BIN
      src/assets/images/index/activity.png
  3. BIN
      src/assets/images/index/art.png
  4. BIN
      src/assets/images/index/bg.png
  5. BIN
      src/assets/images/index/brand.png
  6. BIN
      src/assets/images/index/member.png
  7. BIN
      src/assets/images/index/park.png
  8. BIN
      src/assets/images/index/parking.png
  9. BIN
      src/assets/images/index/school.png
  10. BIN
      src/assets/images/index/search.png
  11. BIN
      src/assets/images/index/ser.png
  12. BIN
      src/assets/images/index/service.png
  13. BIN
      src/assets/images/index/toilet.png
  14. BIN
      src/assets/images/menu/activity.png
  15. BIN
      src/assets/images/menu/activitys.png
  16. BIN
      src/assets/images/menu/art.png
  17. BIN
      src/assets/images/menu/arts.png
  18. BIN
      src/assets/images/menu/bg.png
  19. BIN
      src/assets/images/menu/brand.png
  20. BIN
      src/assets/images/menu/brands.png
  21. BIN
      src/assets/images/menu/home.png
  22. BIN
      src/assets/images/menu/homes.png
  23. BIN
      src/assets/images/menu/member.png
  24. BIN
      src/assets/images/menu/members.png
  25. BIN
      src/assets/images/menu/parking.png
  26. BIN
      src/assets/images/menu/parkings.png
  27. BIN
      src/assets/images/menu/school.png
  28. BIN
      src/assets/images/menu/schools.png
  29. BIN
      src/assets/images/menu/service.png
  30. BIN
      src/assets/images/menu/services.png
  31. 13
      src/assets/scss/mixin.scss
  32. 142
      src/components/Menu/Menu.vue
  33. 2
      src/components/PublicComponent/PublicComponent.vue
  34. 3
      src/i18n/lang/en.json
  35. 3
      src/i18n/lang/tw.json
  36. 3
      src/i18n/lang/zh.json
  37. 8
      src/views/Index/Index.vue
  38. 72
      src/views/Index/Middle.vue
  39. 71
      src/views/Index/Top.vue

19138
package-lock.json

File diff suppressed because it is too large

BIN
src/assets/images/index/activity.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

BIN
src/assets/images/index/art.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

BIN
src/assets/images/index/bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
src/assets/images/index/brand.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

BIN
src/assets/images/index/member.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

BIN
src/assets/images/index/park.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

BIN
src/assets/images/index/parking.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
src/assets/images/index/school.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
src/assets/images/index/search.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
src/assets/images/index/ser.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

BIN
src/assets/images/index/service.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
src/assets/images/index/toilet.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
src/assets/images/menu/activity.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/assets/images/menu/activitys.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
src/assets/images/menu/art.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 915 B

BIN
src/assets/images/menu/arts.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
src/assets/images/menu/bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

BIN
src/assets/images/menu/brand.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
src/assets/images/menu/brands.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
src/assets/images/menu/home.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 812 B

BIN
src/assets/images/menu/homes.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/assets/images/menu/member.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/assets/images/menu/members.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
src/assets/images/menu/parking.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 849 B

BIN
src/assets/images/menu/parkings.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
src/assets/images/menu/school.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1021 B

BIN
src/assets/images/menu/schools.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
src/assets/images/menu/service.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/assets/images/menu/services.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

13
src/assets/scss/mixin.scss

@ -32,3 +32,16 @@
font-family: 'font_bold'; font-family: 'font_bold';
font-weight: 700; font-weight: 700;
} }
@mixin fl($j: flex-start, $a: center) {
display: flex;
justify-content: $j;
align-items: $a;
}
@mixin ab($t: 0, $l: 0, $z: 1) {
position: absolute;
top: $t;
left: $l;
z-index: $z;
}

142
src/components/Menu/Menu.vue

@ -0,0 +1,142 @@
<template>
<div class="menu-container">
<div v-for="(item, index) in list" :key="item.title" class="menu-item" @click="changeMenu(item, index)">
<div class="top">
<img :src="current === index ? item.iconS : item.icon" alt="" />
<div v-if="current === index" class="ac"></div>
</div>
<div class="text">{{ switchLanguage(item, 'title') }}</div>
</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { useRouter } from 'vue-router'
type MenuItem = {
title: string
titleEn: string
icon: string
iconS: string
path: string
}
const list: MenuItem[] = [
{
title: '主页',
titleEn: 'Home',
icon: require('@/assets/images/menu/home.png'),
iconS: require('@/assets/images/menu/homes.png'),
path: '/'
},
{
title: '店铺导航',
titleEn: 'Brand',
icon: require('@/assets/images/menu/brand.png'),
iconS: require('@/assets/images/menu/brands.png'),
path: '/brand'
},
{
title: '优惠与活动',
titleEn: 'Activity',
icon: require('@/assets/images/menu/activity.png'),
iconS: require('@/assets/images/menu/activitys.png'),
path: '/activity'
},
{
title: '会员专享',
titleEn: 'Member',
icon: require('@/assets/images/menu/member.png'),
iconS: require('@/assets/images/menu/members.png'),
path: '/member'
},
{
title: '服务',
titleEn: 'Service',
icon: require('@/assets/images/menu/service.png'),
iconS: require('@/assets/images/menu/services.png'),
path: '/service'
},
{
title: '停车与缴费',
titleEn: 'Parking',
icon: require('@/assets/images/menu/parking.png'),
iconS: require('@/assets/images/menu/parkings.png'),
path: '/parking'
},
{
title: '文化学院',
titleEn: 'School',
icon: require('@/assets/images/menu/school.png'),
iconS: require('@/assets/images/menu/schools.png'),
path: '/school'
},
{
title: '艺术',
titleEn: 'Art',
icon: require('@/assets/images/menu/art.png'),
iconS: require('@/assets/images/menu/arts.png'),
path: '/art'
}
]
const router = useRouter()
const current = ref(0)
function changeMenu(item: MenuItem, index: number) {
current.value = index
router.push(item.path)
}
</script>
<style lang="scss" scoped>
.menu-container {
@include fl(space-between);
position: fixed;
bottom: 0;
left: 291px;
width: 1330px;
height: 88px;
padding: 12px 112px 6px 101px;
background: url('@/assets/images/menu/bg.png');
.menu-item {
@include fl(center);
position: relative;
min-width: 48px;
height: 70px;
flex-direction: column;
.top {
position: relative;
width: 48px;
height: 48px;
img {
position: absolute;
top: 0;
left: 0;
z-index: 2;
width: 48px;
height: 48px;
}
.ac {
position: absolute;
top: 0;
left: 0;
z-index: 1;
width: 48px;
height: 48px;
background: #a6976f;
border-radius: 50%;
filter: drop-shadow(0 4px 6px #b6a56b);
}
}
.text {
font-size: 14px;
font-family: 'font_regular';
color: #84754e;
font-style: normal;
font-weight: 400;
line-height: 22px;
}
}
}
</style>

2
src/components/PublicComponent/PublicComponent.vue

@ -1,5 +1,6 @@
<template> <template>
<Header /> <Header />
<Menu />
<!-- 地图容器 --> <!-- 地图容器 -->
<Map v-show="$route.meta.showMap" @handle-go="handleGO" @handle-detail="handleDetail" /> <Map v-show="$route.meta.showMap" @handle-go="handleGO" @handle-detail="handleDetail" />
@ -21,6 +22,7 @@ import { useHandleScreen } from '@/composables/useHandleScreen'
import { useInitMap } from '@/composables/useInitMap' import { useInitMap } from '@/composables/useInitMap'
import Map from '@/components/Map/Map.vue' import Map from '@/components/Map/Map.vue'
import Header from '../Header/Header.vue' import Header from '../Header/Header.vue'
import Menu from '../Menu/Menu.vue'
const Logout = defineAsyncComponent(() => import('@/base/Logout/Logout.vue')) const Logout = defineAsyncComponent(() => import('@/base/Logout/Logout.vue'))
const AutoBackNotification = defineAsyncComponent(() => import('@/base/AutoBackNotification/AutoBackNotification.vue')) const AutoBackNotification = defineAsyncComponent(() => import('@/base/AutoBackNotification/AutoBackNotification.vue'))

3
src/i18n/lang/en.json

@ -6,5 +6,6 @@
"pause": "Pause", "pause": "Pause",
"play": "Play", "play": "Play",
"speedUp": "Speed up", "speedUp": "Speed up",
"stopSpeedUp": "Stop acceleration"
"stopSpeedUp": "Stop acceleration",
"search_home": "Search"
} }

3
src/i18n/lang/tw.json

@ -6,5 +6,6 @@
"pause": "暫停", "pause": "暫停",
"play": "播放", "play": "播放",
"speedUp": "加速", "speedUp": "加速",
"stopSpeedUp": "停止加速"
"stopSpeedUp": "停止加速",
"search_home": "搜索"
} }

3
src/i18n/lang/zh.json

@ -6,5 +6,6 @@
"pause": "暂停", "pause": "暂停",
"play": "播放", "play": "播放",
"speedUp": "加速", "speedUp": "加速",
"stopSpeedUp": "停止加速"
"stopSpeedUp": "停止加速",
"search_home": "搜索"
} }

8
src/views/Index/Index.vue

@ -1,5 +1,9 @@
<template> <template>
<div></div>
<Top />
<Middle />
</template> </template>
<script setup lang="ts"></script>
<script setup lang="ts">
import Middle from './Middle.vue'
import Top from './Top.vue'
</script>

72
src/views/Index/Middle.vue

@ -0,0 +1,72 @@
<template>
<div class="middle-container">
<div class="brand"></div>
<div class="activity"></div>
<div class="art"></div>
<div class="school"></div>
<div class="service"></div>
<div class="member"></div>
<div class="parking"></div>
</div>
</template>
<script setup lang="ts"></script>
<style lang="scss" scoped>
.middle-container {
position: fixed;
top: 343px;
left: 295px;
width: 1330px;
height: 536px;
.brand {
@include ab(0, 0, 1);
width: 270px;
height: 536px;
background: url('@/assets/images/index/brand.png');
}
.activity {
@include ab(0, 280px, 1);
width: 520px;
height: 263px;
background: url('@/assets/images/index/activity.png');
}
.art {
@include ab(0, 810px, 1);
width: 220px;
height: 263px;
background: url('@/assets/images/index/art.png');
}
.school {
@include ab(0, 1040px, 1);
width: 290px;
height: 263px;
background: url('@/assets/images/index/school.png');
}
.service {
@include ab(273px, 280px, 1);
width: 255px;
height: 263px;
background: url('@/assets/images/index/ser.png');
}
.member {
@include ab(273px, 545px, 1);
width: 255px;
height: 263px;
background: url('@/assets/images/index/member.png');
}
.parking {
@include ab(273px, 810px, 1);
width: 520px;
height: 263px;
background: url('@/assets/images/index/park.png');
}
}
</style>

71
src/views/Index/Top.vue

@ -0,0 +1,71 @@
<template>
<div class="top-container">
<div class="top-item">
<div class="top">
<img src="@/assets/images/index/search.png" alt="" />
</div>
<div class="text">
{{ $t('search_home') }}
</div>
</div>
<div v-for="item in fac" :key="item.code" class="top-item">
<div class="top">
<img v-if="item.abbreviation === 'xsj'" src="@/assets/images/index/toilet.png" alt="" />
<img v-if="item.abbreviation === 'tcc'" src="@/assets/images/index/parking.png" alt="" />
<img v-if="item.abbreviation === 'fwt'" src="@/assets/images/index/service.png" alt="" />
</div>
<div class="text">
{{ switchLanguage(item, 'name') }}
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { toRefs, computed } from 'vue'
import { useRootStore } from '@/store/root'
const store = useRootStore()
const { facilityList } = toRefs(store)
const fac = computed(() => {
return facilityList.value.filter(item => item.abbreviation === 'xsj' || item.abbreviation === 'tcc' || item.abbreviation === 'fwt')
})
</script>
<style lang="scss" scoped>
.top-container {
@include fl(space-between);
position: fixed;
top: 159px;
left: 572px;
.top-item {
@include fl(center);
width: 176px;
height: 112px;
margin-right: 24px;
flex-direction: column;
.top {
@include fl(center);
width: 176px;
height: 64px;
background: url('@/assets/images/index/bg.png');
img {
width: 48px;
height: 48px;
}
}
.text {
margin-top: 20px;
font-size: 16px;
font-family: 'font_regular';
color: rgb(0 0 0 / 60%);
font-style: normal;
font-weight: 400;
line-height: 24px;
}
}
}
</style>
Loading…
Cancel
Save