index.vue
16.4 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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
<template>
<div class="page page-index">
<modal-comp :visible="modalVisiable" :show-confirm="false" :icon="modalIcon" :content="modalContent" :confirm="()=>{this.modalVisiable = false}" :overlay="()=>{this.modalVisiable = false}"></modal-comp>
<modal2-comp :visible="errorVisible" :close="()=>{errorVisible = false}" :content="$t('glbalTips.sysError')"></modal2-comp>
<!-- 该input用于防止chrome自动填充 -->
<input type="password" style="display: none;" />
<div class="banner-contaner">
<!-- banner 轮播 -->
<div class="banner banner-pc">
<swiper :options="swiperOption" ref="bannerSwiper">
<swiper-slide v-for="(item, index) in bannerList" :key="index">
<img class="banner-img" :src="item.pcBannerUrl" />
<div class="btn-wrap">
<div v-for="(btnItem, btnIndex) in item.btns" :key="btnIndex">
<div class="banner-btn" v-if="btnItem.n && btnItem.t && btnItem.c" @click="btnNavigateTo(btnItem.t, btnItem.l)" :style="{ backgroundColor: btnItem.c }">{{ btnItem.n }}</div>
</div>
</div>
</swiper-slide>
<!-- <div class="swiper-button-prev" slot="button-prev"></div>
<div class="swiper-button-next" slot="button-next"></div>-->
<!-- <div class="swiper-pagination" slot="pagination"></div> -->
</swiper>
</div>
<div class="banner banner-mobile">
<swiper class="swiper" :options="swiperOption">
<swiper-slide v-for="(item, index) in bannerList" :key="index">
<img class="banner-img" :src="item.mobileBannerUrl" />
<div class="btn-wrap">
<div class="banner-btn" v-for="(btnItem, btnIndex) in item.btns" :key="btnIndex" @click="btnNavigateTo(btnItem.t, btnItem.l)" :style="{ color: btnItem.c }">{{ btnItem.n }} ></div>
</div>
</swiper-slide>
<div class="swiper-pagination" slot="pagination"></div>
</swiper>
</div>
<!-- <div class="swiper-button-prev" slot="button-prev"></div>
<div class="swiper-button-next" slot="button-next"></div>-->
</div>
<!-- 导航菜单切换 -->
<div class="nav-tab">
<div class="nav-tab-item" :class="{ 'nav-tab-item-act': item.index == curTab.index,'nav-tab-item-single':dataList.length<=1 }" :style="'width: calc(1200px / ' + dataList.length + ');'" @click="onTabHandler(item)" v-html="item.tabName" v-for="item in dataList" :key="item.id">{{ item.tabName }}</div>
<!-- <div class="nav-tab-item" :class="{ 'nav-tab-item-act': item.index == curTab.index }" :style="'width: calc(100% / ' + dataList.length + '); '+ (index == dataList.length-1 ?'':'width:50%;') +' '" @click="onTabHandler(item)" v-html="item.tabName" v-for="item in dataList" :key="item.id">{{ item.tabName }}</div> -->
</div>
<!-- 推荐 为什么选择平安人寿 -->
<div class="recommend">
<div class="tit">{{ $t("index.recommend.title") }}</div>
<div class="gird-g features">
<div class="features-item pure-u-1 pure-u-md-1-3">
<div class="icon">
<img src="@/assets/images/index/recommend-icon-1.png" alt />
</div>
<div v-html="$t('index.recommend.item1.desc')" class="desc"></div>
</div>
<div class="features-item pure-u-1 pure-u-md-1-3">
<div class="icon">
<img src="@/assets/images/index/recommend-icon-2.png" alt />
</div>
<div v-html="$t('index.recommend.item2.desc')" class="desc"></div>
</div>
<div class="features-item pure-u-1 pure-u-md-1-3">
<div class="icon">
<img src="@/assets/images/index/recommend-icon-3.png" alt />
</div>
<div v-html="$t('index.recommend.item3.desc')" class="desc"></div>
</div>
</div>
<div @click="toContactUs" class="contact-tips">
<span class="icon"></span>
{{ $t("index.recommend.contact") }}
</div>
</div>
<!-- 线上报价 -->
<div class="quote">
<swiper :options="swiperOption" ref="quoteBgSwiper" class="quote-bg-swiper">
<swiper-slide v-for="(item, index) in dataList" :key="index">
<div class="ebg" :style="'background-image: url(' + item.pageMidImage + ');'"></div>
<div class="tit-wrap">
<div class="tit">{{curTab.pageMidTitle}}</div>
<div class="tit2">
{{curTab.pageMidDescribe}}
</div>
</div>
</swiper-slide>
</swiper>
<div class="space1"></div>
<div class="quote-cont">
<!-- tab表格 -->
<div class="table" :class="{'table-1':dataList.length<=1}">
<div class="table-tab">
<!-- <div class="table-tab-item" @click="onTabHandler(item)" v-html="item.tabName" v-for="(item, index) in dataList" :key="item.id" :class="{ 'table-tab-item-act': item.index == curTab.index }" :style="
'margin:0 -'+tableTapIndentation.mar+'px;width: calc(100% / ' + dataList.length + ');z-index:' + (dataList.length - index) + ''">{{ item.name }}</div>
</div> -->
<!-- <div class="linear" :style="'width: calc(100% - '+tableTapIndentation.ind+'px *' + (dataList.length - 1) + ')'"></div>
<div class="table-cont" :style="'width: calc(100% - '+tableTapIndentation.ind+'px *' + (dataList.length - 1) + ')'"> -->
<div class="table-tab-item" @click="onTabHandler(item)" v-html="item.tabName" v-for="(item, index) in dataList" :key="item.id" :class="{ 'table-tab-item-act': item.index == curTab.index }" :style="
';width: '+(index == 0 ? 'calc(100% / ' + dataList.length + ')' : tableTapIndentation.wid + 'px' ) +' ;z-index:' + (dataList.length - index) + ''">{{ item.name }}</div>
</div>
<div class="linear"></div>
<div class="table-wrap">
<div class="table-fl">
<div class="table-cont">
<div class="panel panel-left">
<div class="desc">
<div class="desc-item" v-for="item in curTab.describeList" :key="item.id">
{{ item }}
</div>
</div>
</div>
<div class="panel panel-right">
<!-- 好医时 -->
<div v-if="curTab.relation == PRODUCT_PRO_EASY " class="plugin fcc">
<div class="func func1">
<div class="func1-item">
<div class="k"> {{$t('common.Sex')}}</div>
<div class="gender">
<div class="gender-item" @click="onQuoteSexHandler('M')">
{{$t('common.Male')}}
<img v-if="quoteData.gender == 'M'" src="@/assets/images/common/icon-male-act.png" alt />
<img v-else src="@/assets/images/common/icon-male.png" alt />
</div>
<div class="gender-item" @click="onQuoteSexHandler('F')">
{{$t('common.Female')}}
<img v-if="quoteData.gender == 'F'" src="@/assets/images/common/icon-female-act.png" alt />
<img v-else src="@/assets/images/common/icon-female.png" alt />
</div>
</div>
</div>
<div class="func1-item">
<div class="k">{{$t('common.Birth')}}</div>
<div class="age">
<div class="ipt-wrap-linear">
<div class="down-arrow"></div>
<div class="cont">
<date-picker class="ipt-date" :placeholder="$t('common.Birth') + '*'" v-model="quoteData.birthday" :filtModel="['future']" :cusStyle="{
border: 'none !important',
'background-color': 'transparent !important',
padding: '16px 24px',
color: '#606266',
'text-align': 'center'
}">
</date-picker>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 传家福 -->
<div v-if="curTab.relation == PRODUCT_REN_RICH " class="plugin ">
<div class="func func2">
<div class="func2-tit">{{$t('index.quote.genRich.t1')}}</div>
<div class="func2-tit2">{{$t('index.quote.genRich.t2')}}</div>
<slider class="slider" :min="sliderMin" :max="sliderMax" v-model="sliderPer"></slider>
<!-- 表格选择 -->
<div class="form">
<div class="form-item">
<div class="label">{{$t('index.quote.genRich.PaymentPeriod')}}</div>
<div class="val">
<div @click="onSelectPaymentPeriodHandler(item)" class="item" :class="{'item-act':curPaymentPeriod.v==item.v}" v-for="item in paymentPeriodList" :key="item.id">
{{ item.n }}
</div>
</div>
</div>
<div class="form-item">
<div class="label">{{$t('index.quote.genRich.PaymentOptions')}}</div>
<div class="val val2">
<div @click="onSelectPaymentOptionHandler(item)" class="item" :class="{'item-act':curPaymentOption.v==item.v}" v-for="item in paymentOptionList" :key="item.id">
{{ item.n }}
</div>
</div>
</div>
</div>
<!-- 分割线 -->
<div class="line"></div>
<!-- 计算 -->
<div class="calculation">
<div class="label">{{curPaymentOption.n}}{{locale == 'en' ? ' ' : ''}}{{$t('index.quote.genRich.Premium')}}</div>
<div class="value">$ <span class="price">{{sumAssured}}</span></div>
</div>
<!-- 提示 -->
<div class="tips">{{$t('index.quote.genRich.tips')}}</div>
</div>
</div>
</div>
</div>
</div>
<div @click="onPrevTabHandler()" class="arrow arrow-left"></div>
<div @click="onNextTabHandler()" class="arrow arrow-right"></div>
</div>
</div>
<div @click="onQuoteHandler" class="quote-btn">{{$t('index.quote.quote')}}</div>
<div class="customer-service">
{{$t('index.quote.want')}}
<span @click="toContactUs" class="udl pointer">{{$t('index.quote.service')}}</span>
</div>
</div>
</div>
<!-- 联系我们表单 -->
<div class="contact">
<div class="box-w panel">
<div class="panel-left">
<div v-html="$t('index.contact.t1')" class="t1"></div>
<div v-html="$t('index.contact.t2')" class="t2"></div>
<img class="pic-mobile" src="@/assets/images/index/index-mobile.png" alt />
</div>
<div class="panel-right">
<div class="form">
<div class="form-item fl">
<!-- 称呼 -->
<div class="form-item-wrap dear">
<div class="ipt-wrap-linear">
<div class="down-arrow"></div>
<div class="cont">
<el-select class="ipt" v-model="formData.title" :placeholder="$t('index.contact.form.Title') + '*'">
<el-option v-for="(item, index) in titleList" :key="index" :label="item.n" :value="item.v"></el-option>
</el-select>
</div>
</div>
<div class="validator" v-if="errorTips.e1.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e1}}
</div>
</div>
<!-- 姓名 -->
<div class="form-item-wrap name">
<div class="ipt-wrap-linear ">
<div class="cont">
<input v-model="formData.name" autocomplete="new-password" class="ipt" type="text" :placeholder="$t('index.contact.form.Name') + '*'" />
</div>
</div>
<div class="validator" v-if="errorTips.e2.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e2}}
</div>
</div>
</div>
<!-- 联系电话 -->
<div class="form-item">
<div class="form-item-wrap">
<div class="ipt-wrap-linear">
<div class="cont">
<input v-model="formData.mobile" autocomplete="new-password" class="ipt" type="text" :placeholder="$t('index.contact.form.PhoneNumber') + '*'" />
</div>
</div>
<div class="validator" v-if="errorTips.e3.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e3}}
</div>
</div>
</div>
<!-- 電郵 -->
<div class="form-item">
<div class="form-item-wrap">
<div class="ipt-wrap-linear">
<div class="cont">
<input v-model="formData.email" class="ipt" type="text" :placeholder="$t('index.contact.form.Email') + '*'" />
</div>
</div>
<div class="validator" v-if="errorTips.e4.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e4}}
</div>
</div>
</div>
<!-- 理想聯絡時間 -->
<div class="form-item">
<div class="form-item-wrap">
<div class="ipt-wrap-linear">
<div class="down-arrow"></div>
<div class="cont">
<date-picker class="ipt-date" :placeholder="$t('index.contact.form.Time') + '*'" v-model="formData.contactTime" :filtModel="['history']" :cusStyle="{
border: 'none !important',
'background-color': 'transparent !important',
padding: '16px 24px',
color: '#606266',
'text-align': 'center'
}"></date-picker>
</div>
</div>
<div class="validator" v-if="errorTips.e5.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e5}}
</div>
</div>
</div>
<!-- 查詢事項 -->
<div class="form-item">
<div class="form-item-wrap">
<div class="ipt-wrap-linear">
<div class="cont">
<textarea v-model="formData.inquiry" class="ipt textarea" :placeholder="$t('index.contact.form.Inquiry')"></textarea>
</div>
</div>
<div class="validator" v-if="errorTips.e6.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e6}}
</div>
</div>
</div>
</div>
<!-- 错误提示 -->
<!-- <div class="err-tips">
<template v-if="errTips">
<img class="icon" src="@/assets/images/common/icon-alert-i.png" alt />
{{ errTips }}
</template>
</div> -->
<div @click="onSubmitContact" class="submit-btn" :class="{disabled: submitBtnDisabled}">
<van-loading v-if="loading" />{{ $t("index.contact.form.Submit") }}</div>
</div>
<img class="pic-mobile pic-mobile-botom" src="@/assets/images/index/index-mobile.png" alt />
</div>
</div>
</div>
</template>
<script src="./index.js"></script>
<style lang="scss" scoped>
@import "./index.scss";
</style>
<style lang="scss">
// @media (max-width: 768px) {
.contact {
.panel {
.panel-right {
.form {
.el-input__inner {
font-size: 18px; // $fontSize-M2
}
}
}
}
}
// }
</style>