index.vue
4.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<!--
* @Date: 2023-06-21 10:23:09
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-16 14:09:56
* @FilePath: /xysBooking/src/views/index.vue
* @Description: 预约页首页
-->
<template>
<div class="index-page">
<div class="index-content">
<div style="height: 30vh;">
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
<van-swipe-item>
<img style="height: 30vh; width: 100vw;" src="https://cdn.ipadbiz.cn/xys/booking/banner.jpg" />
</van-swipe-item>
</van-swipe>
</div>
<div class="index-control">
<div class="booking" @click="toBooking">
<van-icon size="1.5rem" color="#FFFFFF" name="https://cdn.ipadbiz.cn/xys/booking/%E7%AB%8B%E5%8D%B3%E9%A2%84%E7%BA%A6@2x.png" />
立即预约
</div>
<div class="record" @click="toRecord">
<van-icon size="1.5rem" color="#A67939" name="https://cdn.ipadbiz.cn/xys/booking/%E9%A2%84%E7%BA%A6%E8%AE%B0%E5%BD%95@2x.png" />
预约记录
</div>
</div>
<div class="logo"></div>
</div>
<div class="index-nav">
<div class="nav-logo">
<van-icon size="1.5rem" name="https://cdn.ipadbiz.cn/xys/booking/%E9%A6%96%E9%A1%B502@2x.png" color="#A67939" />
首页
</div>
<div class="nav-logo" @click="toCode">
<van-icon size="5rem" name="https://cdn.ipadbiz.cn/xys/booking/%E4%BA%8C%E7%BB%B4%E7%A0%81@2x%20(1).png" color="#A67939" style="position: absolute; top: -4rem;" />
<van-icon size="1.5rem" name="wap-home" color="#FFF" style="opacity: 0;" />
预约码
</div>
<div class="nav-logo" @click="toMy">
<van-icon size="1.5rem" name="https://cdn.ipadbiz.cn/xys/booking/%E6%88%91%E7%9A%8401@2x.png" color="#A67939" />
我的
</div>
</div>
</div>
</template>
<script setup>
import { ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import dayjs from 'dayjs'
import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@/utils/generatePackage.js'
//import { } from '@/utils/generateModules.js'
//import { } from '@/utils/generateIcons.js'
//import { } from '@/composables'
import { showSuccessToast, showFailToast } from 'vant';
import { useGo } from '@/hooks/useGo'
const $route = useRoute();
const $router = useRouter();
useTitle($route.meta.title);
const go = useGo();
const toBooking = () => {
go('/notice');
}
const toRecord = () => {
go('/bookingList');
}
const toCode = () => {
go('/bookingCode');
}
const toMy = () => {
go('/me');
}
onMounted(async () => {
});
</script>
<style lang="less" scoped>
.index-page {
position: relative;
height: 100vh;
background-image: url('https://cdn.ipadbiz.cn/xys/booking/bg.jpg');
background-repeat: no-repeat;
background-position: center;
.index-content {
height: 90vh;
.index-control {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-top: 10vh;
// font-weight: bold;
font-size: 1.15rem;
.booking {
display: flex;
justify-content: center;
align-items: center;
background-color: #A67939;
border-radius: 7px;
color: #FFFFFF;
padding: 0.7rem 4rem;
border: 1px solid #A67939;
}
.record {
display: flex;
justify-content: center;
align-items: center;
color: #A67939;
border-radius: 7px;
padding: 0.7rem 4rem;
border: 1px solid #A67939;
margin-top: 1.5rem;
}
}
.logo {
position: absolute;
right: 0;
bottom: calc(15vh);
height: 30vh;
width: 20vw;
background-image: url('https://cdn.ipadbiz.cn/xys/booking/logo.png');
background-repeat: no-repeat;
background-size: contain;
background-position: center;
}
}
.my-swipe {
height: 30vh;
.van-swipe-item {
height: 30vh;
width: 100vw;
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
}
.index-nav {
position: absolute;
bottom: 0;
left: 0;
width: 100vw;
height: 10vh;
background: #FFFFFF;
box-shadow: 0rem -0.33rem 0.25rem 0rem rgba(0,0,0,0.12);
display: flex;
align-items: center;
justify-content: space-around;
color: #A67939;
.nav-logo {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
}
}
}
</style>