0efb0be0 by joe

修改首页的滚动逻辑

1 parent b281a1ec
......@@ -2,8 +2,8 @@ module.exports = {
common: {
Confirm: "Confirm",
Cancel: "Cancel",
Male: "Male",
Female: "Female",
Male: "Mr.",
Female: "Mrs.",
Sex: "Sex",
Age: "Age",
Birthday: "Birthday",
......
......@@ -88,51 +88,51 @@ export default {
// 繳費期列表
paymentPeriodList: [{
v: 3,
n: "",
p: 333.330000
},
{
v: 5,
n: "",
p: 200.000000
},
{
v: 8,
n: "",
p: 125.000000
},
{
v: 10,
n: "",
p: 100.000000
}
v: 3,
n: "",
p: 333.330000
},
{
v: 5,
n: "",
p: 200.000000
},
{
v: 8,
n: "",
p: 125.000000
},
{
v: 10,
n: "",
p: 100.000000
}
],
// 缴费选项列表
paymentOptionList: [{
v: 1,
m: 12,
n: "",
p: 1
},
{
v: 2,
m: 6,
n: "",
p: 0.5064
},
{
v: 4,
m: 6,
n: "",
p: 0.2548
},
{
v: 12,
m: 1,
n: "",
p: 0.0853
}
v: 1,
m: 12,
n: "",
p: 1
},
{
v: 2,
m: 6,
n: "",
p: 0.5064
},
{
v: 4,
m: 6,
n: "",
p: 0.2548
},
{
v: 12,
m: 1,
n: "",
p: 0.0853
}
],
// 当前选择保费期
......@@ -157,13 +157,13 @@ export default {
},
titleList() {
let result = [{
n: this.i18n.common.Male,
v: "M"
},
{
n: this.i18n.common.Female,
v: "F"
}
n: this.i18n.common.Male,
v: "M"
},
{
n: this.i18n.common.Female,
v: "F"
}
]
// console.log("result:", result);
return result;
......@@ -270,6 +270,7 @@ export default {
break;
default:
location.href = link;
this.initView();
break;
}
},
......@@ -481,7 +482,18 @@ export default {
this.modalContent = content;
this.modalVisiable = true;
},
initView() {
let pos = this.$route.query.pos;
let idx = this.$route.query.idx;
if (pos && this.$refs[pos]) {
this.$refs[pos].scrollIntoView();
}
if (idx >= 0) {
idx = idx > this.dataList.length - 1 ? this.dataList.length - 1 : idx;
this.curTab = this.dataList[idx];
this.swiperSiderTo(idx);
}
},
initData() {
this.curPaymentPeriod = this.paymentPeriodList[0];
......@@ -549,11 +561,13 @@ export default {
// 设置缓存
sessionStorage.setItem("_pingan_index_datalist", JSON.stringify(this.dataList));
sessionStorage.setItem("_pingan_index_bannerlist", JSON.stringify(this.bannerList));
this.initView();
})
},
},
beforeDestroy() {},
beforeDestroy() { },
mounted() {
this.initData();
},
......@@ -562,7 +576,7 @@ export default {
try {
// this.refreshBanner();
this.initData();
} catch (e) {}
} catch (e) { }
});
},
watch: {
......
......@@ -93,7 +93,7 @@
<div class="quote-cont">
<!-- tab表格 -->
<div class="table" :class="{'table-1':dataList.length<=1}">
<div class="table-tab">
<div class="table-tab" ref="quote">
<!-- <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> -->
......@@ -210,7 +210,7 @@
</div>
<!-- 联系我们表单 -->
<div class="contact">
<div class="contact" ref="contact">
<div class="box-w panel">
<div class="panel-left">
<div v-html="$t('index.contact.t1')" class="t1"></div>
......