index.vue 17.1 KB
<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 }}&nbsp;&gt;</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">
            <swiper :options="swiperOption" ref="quoteSwiper" class="quote-swiper">
              <swiper-slide v-for="(item, index) in dataList" :key="index">
                <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.Birthday')}}</div>
                          <div class="age">
                            <div class="ipt-wrap-linear">
                              <div class="down-arrow"></div>
                              <div class="cont">
                                <!-- <el-select class="ipt" v-model="quoteData.age" :placeholder="$t('common.Age')">
                        <el-option v-for="(item, index) in 100" :key="index" :label="item" :value="item"></el-option>
                      </el-select> -->
                                <date-picker class="ipt-date" :placeholder="$t('common.Birthday') + '*'" 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">滑動選擇保額</div>
                        <div class="func2-tit2">保額(萬美元)</div>
                        <!-- <div class="slider">
                  <div class="slider-bar">
                    <div class="slider-bar-thumb" >
                      <div class="num">300</div>
                      <div class="circle"></div>
                    </div>
                  </div>
                </div> -->

                        <slider class="slider" :min="sliderMin" :max="sliderMax" v-model="sliderPer"></slider>
                        <!-- 表格选择 -->
                        <div class="form">
                          <div class="form-item">
                            <div class="label">繳費期</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">繳費選項</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">每月保费</div>
                          <div class="value">$ <span class="price">{{sumAssured}}</span></div>
                        </div>
                        <!-- 提示 -->
                        <div class="tips">Please contact your financial consultant to quote for insured
                          amount that exceeds USD 3 million</div>
                      </div>
                    </div>

                  </div>

                </div>
              </swiper-slide>
            </swiper>

            <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>