Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
pingan-life-index-pro
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
0efb0be0
authored
2020-05-26 12:07:08 +0800
by
joe
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改首页的滚动逻辑
1 parent
b281a1ec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
56 deletions
src/common/lang/en.js
src/pages/index/index.js
src/pages/index/index.vue
src/common/lang/en.js
View file @
0efb0be
...
...
@@ -2,8 +2,8 @@ module.exports = {
common
:
{
Confirm
:
"Confirm"
,
Cancel
:
"Cancel"
,
Male
:
"M
ale
"
,
Female
:
"
Female
"
,
Male
:
"M
r.
"
,
Female
:
"
Mrs.
"
,
Sex
:
"Sex"
,
Age
:
"Age"
,
Birthday
:
"Birthday"
,
...
...
src/pages/index/index.js
View file @
0efb0be
...
...
@@ -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
:
{
...
...
src/pages/index/index.vue
View file @
0efb0be
...
...
@@ -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>
...
...
Please
register
or
sign in
to post a comment