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
e5ad7063
authored
2020-05-16 12:31:22 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
首页
1 parent
28c18b90
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
140 additions
and
135 deletions
src/assets/images/index/index-tab-act-bk2.png
src/assets/images/index/index-tab-bk2.png
src/pages/gen-rich/gen-rich.js
src/pages/gen-rich/gen-rich.scss
src/pages/index/index.js
src/pages/index/index.scss
src/pages/index/index.vue
src/pages/vhis-detail/vhis-detail.js
src/assets/images/index/index-tab-act-bk2.png
0 → 100644
View file @
e5ad706
13.3 KB
src/assets/images/index/index-tab-bk2.png
0 → 100644
View file @
e5ad706
796 Bytes
src/pages/gen-rich/gen-rich.js
View file @
e5ad706
...
...
@@ -30,12 +30,12 @@ export default {
el
:
'.swiper-pagination'
,
clickable
:
true
,
},
autoplay
:
{
delay
:
5000
,
stopOnLastSlide
:
false
,
disableOnInteraction
:
false
},
speed
:
1000
,
//
autoplay: {
//
delay: 5000,
//
stopOnLastSlide: false,
//
disableOnInteraction: false
//
},
//
speed: 1000,
},
bannerList
:
[],
bannerCandidateList
:
[],
...
...
src/pages/gen-rich/gen-rich.scss
View file @
e5ad706
...
...
@@ -35,7 +35,6 @@ $borderSize: 6px;
width
:
1920px
;
height
:
100%
;
overflow
:
hidden
;
// height: 791px;
.banner-img
{
width
:
100%
;
...
...
src/pages/index/index.js
View file @
e5ad706
...
...
@@ -3,10 +3,15 @@
*/
import
api
from
"@/api/api"
;
import
{
httpGet
,
httpPost
}
from
"@/api/fetch-api.js"
;
import
{
httpGet
,
httpPost
}
from
"@/api/fetch-api.js"
;
import
DatePicker
from
"@/components/date-picker/date-picker.vue"
;
import
{
ddMMyyyy2yyyyMMdd
}
from
"@utils/utils.js"
;
import
{
ddMMyyyy2yyyyMMdd
}
from
"@utils/utils.js"
;
export
default
{
data
()
{
...
...
@@ -22,18 +27,19 @@ export default {
el
:
".swiper-pagination"
,
clickable
:
true
},
autoplay
:
{
delay
:
5000
,
stopOnLastSlide
:
false
,
disableOnInteraction
:
false
},
speed
:
1000
//
autoplay: {
//
delay: 5000,
//
stopOnLastSlide: false,
//
disableOnInteraction: false
//
},
//
speed: 1000
},
dataList
:
[],
// 首页请求数据
bannerList
:
[],
bannerCandidateList
:
[],
// 导航菜单
//
tab
List: [
//
data
List: [
// {
// name: "平安“好e時”<br>自願醫保標準計劃",
// url: "",
...
...
@@ -60,33 +66,6 @@ export default {
// index: 4
// }
// ],
tabList
:
[
{
name
:
"平安“好e時”<br>自願醫保標準計劃"
,
url
:
""
,
index
:
0
},
{
name
:
"「平安 ‧ 傳家福<br>分紅終身壽險計劃"
,
url
:
""
,
index
:
1
},
{
name
:
"Ping An 'Pro Easy'<br>VHIS Standard Plan"
,
url
:
""
,
index
:
2
},
{
name
:
"Ping An GenRich<br>Insurance Plan"
,
url
:
""
,
index
:
3
},
{
name
:
"Ping An 'Pro Easy'<br>VHIS Standard Plan"
,
url
:
""
,
index
:
4
}
],
curTab
:
{},
// 投保
...
...
@@ -94,8 +73,7 @@ export default {
gender
:
1
},
// 投保背景图
quoteBgUrl
:
"https://kdcdn.oss-cn-shenzhen.aliyuncs.com/temp/pingan-life/index-quote-bg-temp.png"
,
quoteBgUrl
:
"https://kdcdn.oss-cn-shenzhen.aliyuncs.com/temp/pingan-life/index-quote-bg-temp.png"
,
// 表单
formData
:
{
...
...
@@ -103,8 +81,7 @@ export default {
birthDate
:
""
},
// 性别列表
genderList
:
[
{
genderList
:
[{
n
:
"先生"
,
v
:
"M"
},
...
...
@@ -125,17 +102,16 @@ export default {
return
this
.
$i18n
.
locale
||
"tc"
;
},
i18n
()
{
return
this
.
$i18n
.
messages
&&
this
.
$i18n
.
locale
?
this
.
$i18n
.
messages
[
this
.
$i18n
.
locale
]
:
{};
return
this
.
$i18n
.
messages
&&
this
.
$i18n
.
locale
?
this
.
$i18n
.
messages
[
this
.
$i18n
.
locale
]
:
{};
},
// 表格tab缩进计算
tableTapIndentation
()
{
let
result
=
{};
let
mar
=
0
;
// 两边缩进
let
ind
=
0
;
// 缩进简介
let
tabList
=
this
.
tab
List
;
let
len
=
tab
List
.
length
;
let
dataList
=
this
.
data
List
;
let
len
=
data
List
.
length
;
switch
(
len
)
{
case
1
:
mar
=
100
;
...
...
@@ -144,17 +120,17 @@ export default {
case
2
:
mar
=
60
;
ind
=
12
4
;
ind
=
12
0
;
break
;
case
3
:
mar
=
30
;
ind
=
6
2
;
ind
=
6
0
;
break
;
case
4
:
mar
=
20
;
ind
=
4
1
;
ind
=
4
0
;
break
;
case
5
:
...
...
@@ -169,7 +145,7 @@ export default {
mar
,
ind
};
console
.
log
(
"result:"
,
result
);
//
console.log("result:", result);
return
result
;
}
// tableTapOpt(){
...
...
@@ -179,33 +155,27 @@ export default {
// },
},
methods
:
{
initData
()
{
this
.
curTab
=
this
.
tabList
[
0
];
this
.
fetchBanner
().
then
(
res
=>
{
this
.
bannerCandidateList
=
res
;
this
.
refreshBanner
();
});
},
fetchBanner
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
httpPost
({
url
:
api
.
banner
}).
then
(
res
=>
{
resolve
(
res
);
});
});
},
refreshBanner
()
{
let
key
=
this
.
locale
;
if
(
key
==
"zh"
)
{
key
=
"cn"
;
}
let
bannerList
=
[];
this
.
bannerCandidateList
.
forEach
(
element
=>
{
bannerList
.
push
(
element
[
key
]);
});
this
.
$set
(
this
,
"bannerList"
,
bannerList
);
},
// fetchBanner() {
// return new Promise((resolve, reject) => {
// httpPost({
// url: api.banner
// }).then(res => {
// resolve(res);
// });
// });
// },
// refreshBanner() {
// let key = this.locale;
// if (key == "zh") {
// key = "cn";
// }
// let bannerList = [];
// this.bannerCandidateList.forEach(element => {
// bannerList.push(element[key]);
// });
// this.$set(this, "bannerList", bannerList);
// },
btnNavigateTo
(
type
,
link
)
{
switch
(
type
)
{
case
"none"
:
...
...
@@ -241,28 +211,32 @@ export default {
onQuoteSexHandler
(
gender
)
{
this
.
quoteData
.
gender
=
gender
;
},
// 上一个tab
onPrevTabHandler
()
{
if
(
this
.
tab
List
.
length
<=
0
)
return
;
if
(
this
.
data
List
.
length
<=
0
)
return
;
let
index
=
this
.
curTab
.
index
;
index
--
;
if
(
index
<
0
)
{
index
=
this
.
tab
List
.
length
-
1
;
index
=
this
.
data
List
.
length
-
1
;
}
this
.
curTab
=
this
.
tab
List
[
index
];
this
.
curTab
=
this
.
data
List
[
index
];
},
// 下一个tab
onNextTabHandler
()
{
if
(
this
.
tab
List
.
length
<=
0
)
return
;
if
(
this
.
data
List
.
length
<=
0
)
return
;
let
index
=
this
.
curTab
.
index
;
index
++
;
if
(
index
>=
this
.
tab
List
.
length
)
{
if
(
index
>=
this
.
data
List
.
length
)
{
index
=
0
;
}
this
.
curTab
=
this
.
tab
List
[
index
];
this
.
curTab
=
this
.
data
List
[
index
];
},
// 联系我们
toContactUs
()
{
this
.
$router
.
push
({
path
:
"/custom/service?q=m1"
});
},
/**
* 点击我要报价
...
...
@@ -272,29 +246,60 @@ export default {
onQuoteHandler
()
{
// gotoVHIS();
},
queryIndexManageListApi
()
{
// queryIndexManageListApi() {
// },
initData
()
{
// this.fetchBanner().then(res => {
// this.bannerCandidateList = res;
// this.refreshBanner();
// });
// 可以埋数据在 localStorage
httpPost
({
url
:
api
.
indexManageListApi
,
data
:
{},
sid
:
true
}).
then
((
result
)
=>
{
this
.
dataList
=
[];
// console.log("11111");
result
.
forEach
(
element
=>
{
let
content
=
JSON
.
parse
(
element
.
content
);
let
item
=
{}
switch
(
this
.
locale
)
{
case
"en"
:
item
=
content
.
confEn
;
break
;
case
"zh"
:
item
=
content
.
confCn
;
break
;
default
:
item
=
content
.
confTc
;
break
;
}
this
.
dataList
.
push
(
item
);
});
this
.
dataList
.
forEach
((
element
,
idx
)
=>
{
element
.
index
=
idx
;
element
.
describeList
=
element
.
describe
.
split
(
"\n"
);
});
this
.
curTab
=
this
.
dataList
[
0
];
this
.
bannerList
=
this
.
dataList
;
console
.
log
(
"this.dataList:"
,
this
.
dataList
);
})
.
then
(
response
=>
{
console
.
log
(
"response:"
,
response
);
let
ttt
=
JSON
.
parse
(
response
[
0
].
content
);
console
.
log
(
"ttt:"
,
ttt
);
})
.
catch
(
res
=>
{});
}
},
},
beforeDestroy
()
{},
mounted
()
{
this
.
initData
();
},
created
()
{
// this.queryIndexManageListApi();
this
.
$root
.
eventBus
.
$on
(
"langChange"
,
()
=>
{
try
{
this
.
refreshBanner
();
// this.refreshBanner();
this
.
initData
();
}
catch
(
e
)
{}
});
}
...
...
src/pages/index/index.scss
View file @
e5ad706
...
...
@@ -15,8 +15,8 @@
// banner 轮播
.banner-contaner
{
width
:
100%
;
//
height: 502px;
height
:
470px
;
height
:
502px
;
//
height: 470px;
margin
:
0
auto
;
position
:
relative
;
z-index
:
1
;
...
...
@@ -32,6 +32,7 @@
margin-left
:
-960px
;
top
:
0
;
width
:
1920px
;
height
:
100%
;
overflow
:
hidden
;
.banner-img
{
...
...
@@ -246,6 +247,8 @@
font-weight
:
bold
;
cursor
:
pointer
;
// filter: drop-shadow(2px 0px 0px rgba(0, 0, 0, 0.3));
&
-act
{
background-image
:
url("~@/assets/images/index/index-tab-act.png")
;
color
:
#ffffff
;
...
...
@@ -262,7 +265,7 @@
}
&
-cont
{
height
:
380px
;
min-
height
:
380px
;
margin
:
0
auto
0
;
position
:
relative
;
display
:
flex
;
...
...
@@ -278,6 +281,8 @@
// position: relative;
@extend
.fcc
;
.desc
{
@extend
.bb
;
padding
:
48px
;
&
-item
{
color
:
#ffffff
;
line-height
:
1
.6
;
...
...
@@ -418,8 +423,6 @@
width
:
100%
;
&
-item
{
.ipt-wrap-linear
{
margin-bottom
:
28px
;
...
...
src/pages/index/index.vue
View file @
e5ad706
...
...
@@ -36,10 +36,12 @@
<div
class=
"swiper-button-next"
slot=
"button-next"
></div>
-->
</div>
<!-- 导航菜单切换 -->
<div
class=
"gird-g nav-tab"
>
<div
class=
"nav-tab-item"
:class=
"
{ 'nav-tab-item-act': item.index == curTab.index }" :style="'width: calc(100% / ' +
tabList.length + ');'" @click="onTabHandler(item)" v-html="item.name" v-for="item in tabList" :key="item.id">
{{
item
.
n
ame
}}
</div>
<!--
<div
class=
"nav-tab-item pure-u-1 pure-u-md-1-5"
:class=
"
{ 'nav-tab-item-act': item.index == curTab.index }" @click="onTabHandler(item)" v-html="item.
name" v-for="item in tabList" :key="item.id" >
{{
item
.
n
ame
}}
</div>
-->
<div
class=
"nav-tab-item"
:class=
"
{ 'nav-tab-item-act': item.index == curTab.index }" :style="'width: calc(100% / ' +
dataList.length + ');'" @click="onTabHandler(item)" v-html="item.tabName" v-for="item in dataList" :key="item.id">
{{
item
.
tabN
ame
}}
</div>
<!--
<div
class=
"nav-tab-item pure-u-1 pure-u-md-1-5"
:class=
"
{ 'nav-tab-item-act': item.index == curTab.index }" @click="onTabHandler(item)" v-html="item.
tabName" v-for="item in dataList" :key="item.id" >
{{
item
.
tabN
ame
}}
</div>
-->
</div>
<!-- 推荐 为什么选择平安人寿 -->
<div
class=
"recommend"
>
<div
class=
"tit"
>
{{
$t
(
"index.recommend.title"
)
}}
</div>
...
...
@@ -72,32 +74,28 @@
<!-- 线上报价 -->
<div
class=
"quote"
:style=
"'background-image: url(' + quoteBgUrl + ');'"
>
<div
class=
"space1"
></div>
<div
class=
"tit"
>
線上報價 閃速投保
</div>
<div
class=
"tit"
>
{{
curTab
.
pageMidTitle
}}
</div>
<div
class=
"tit2"
>
平安「好e時」自願醫保標準計劃為政府自願醫保認可的標準計劃,
涵蓋重點醫療保障,投保流程簡易,全程線上進行。
{{
curTab
.
pageMidDescribe
}}
</div>
<!-- tab表格 -->
<div
class=
"table"
:class=
"
{'table-1':
tab
List.length
<
=1}">
<div
class=
"table"
:class=
"
{'table-1':
data
List.length
<
=1}">
<div
class=
"table-tab"
>
<div
class=
"table-tab-item"
@
click=
"onTabHandler(item)"
v-html=
"item.
name"
v-for=
"(item, index) in tab
List"
:key=
"item.id"
:class=
"
{ 'table-tab-item-act': item.index == curTab.index }" :style="
'margin:0 -'+tableTapIndentation.mar+'px;width: calc(100% / ' +
tabList.length + ');z-index:' + (tab
List.length - index) + ''">
{{
item
.
name
}}
</div>
<div
class=
"table-tab-item"
@
click=
"onTabHandler(item)"
v-html=
"item.
tabName"
v-for=
"(item, index) in data
List"
: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:' + (data
List.length - index) + ''">
{{
item
.
name
}}
</div>
</div>
<div
class=
"linear"
:style=
"'width: calc(100% - '+tableTapIndentation.ind+'px *' + (
tab
List.length - 1) + ')'"
></div>
<div
class=
"table-cont"
:style=
"'width: calc(100% - '+tableTapIndentation.ind+'px *' + (
tab
List.length - 1) + ')'"
>
<div
class=
"linear"
:style=
"'width: calc(100% - '+tableTapIndentation.ind+'px *' + (
data
List.length - 1) + ')'"
></div>
<div
class=
"table-cont"
:style=
"'width: calc(100% - '+tableTapIndentation.ind+'px *' + (
data
List.length - 1) + ')'"
>
<div
class=
"panel panel-left"
>
<div
@
click=
"onPrevTabHandler()"
class=
"arrow arrow-left"
></div>
<div
@
click=
"onNextTabHandler()"
class=
"arrow arrow-right"
></div>
<div
class=
"desc"
>
<div
class=
"desc-item"
>
・潛在長線資本增值
</div>
<div
class=
"desc-item"
>
・創建家族財富
</div>
<div
class=
"desc-item"
>
・身故及意外身故賠償
</div>
<div
class=
"desc-item"
>
・保單持有人意外身故賠償
</div>
<div
class=
"desc-item"
>
・自選保費繳付期
</div>
<div
class=
"desc-item"
>
・彈性賠償支付方式
</div>
<div
class=
"desc-item"
>
・豁免醫療核保
</div>
<div
class=
"desc-item"
v-for=
"item in curTab.describeList"
:key=
"item.id"
>
{{
item
}}
</div>
</div>
</div>
<div
class=
"panel panel-right"
>
...
...
@@ -233,17 +231,17 @@
</
style
>
<
style
lang=
"scss"
>
@media
(
max-width
:
768px
)
{
.contact
{
.panel
{
.panel-right
{
.form
{
.el-input__inner
{
font-size
:
18px
;
//
$fontSize-M2
}
//
@media
(
max-width
:
768px
)
{
.contact
{
.panel
{
.panel-right
{
.form
{
.el-input__inner
{
font-size
:
18px
;
//
$fontSize-M2
}
}
}
}
}
//
}
</
style
>
...
...
src/pages/vhis-detail/vhis-detail.js
View file @
e5ad706
...
...
@@ -30,12 +30,12 @@ export default {
el
:
'.swiper-pagination'
,
clickable
:
true
,
},
autoplay
:
{
delay
:
5000
,
stopOnLastSlide
:
false
,
disableOnInteraction
:
false
},
speed
:
1000
,
//
autoplay: {
//
delay: 5000,
//
stopOnLastSlide: false,
//
disableOnInteraction: false
//
},
//
speed: 1000,
},
bannerList
:
[],
bannerCandidateList
:
[],
...
...
Please
register
or
sign in
to post a comment