Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ydLife
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sweet Zhang
ydLife
Commits
8c634c47
Commit
8c634c47
authored
Jul 23, 2021
by
sunchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品库查询接口对接
parent
9a6404d4
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
377 additions
and
289 deletions
+377
-289
src/app/my/application-process/employee-salary/employee-salary.component.html
+13
-5
src/app/my/my.service.ts
+14
-0
src/app/my/order-detail/order-detail.component.html
+2
-1
src/app/my/product-data/product-data.component.ts
+13
-2
src/app/my/product/product.component.html
+36
-105
src/app/my/product/product.component.scss
+196
-154
src/app/my/product/product.component.ts
+103
-22
No files found.
src/app/my/application-process/employee-salary/employee-salary.component.html
View file @
8c634c47
...
@@ -10,11 +10,19 @@
...
@@ -10,11 +10,19 @@
</div>
</div>
<img
alt=
"薪资单"
src=
"{{vxUrl}}"
*
ngIf=
"vxUrl"
(
click
)="
selectPic
()"
>
<img
alt=
"薪资单"
src=
"{{vxUrl}}"
*
ngIf=
"vxUrl"
(
click
)="
selectPic
()"
>
<ul
class=
"tips"
>
<ul
class=
"tips"
>
<li>
如果报聘职级位A2(业务经理),保险从业经验1年以上;
</li>
<li>
如果报聘职级为A1(销售助理),可无保险从业经验要求;
</li>
<li>
如果报聘职级为A3(业务总监),在最近三年内,至少一年同业收入达18万;
</li>
<li>
如果报聘职级为A2(销售顾问),必须有保险从业经验;
</li>
<li>
如果报聘职级为S1B(营销高级总监)在最近三年内,至少一年同业收入达48万;
</li>
<li>
如果报聘职级为A3(销售主任),须绩优保险从业人员;
</li>
<li>
如果报聘职级为S1A(业务高级总监)在最近三年内,至少一年同业收入达60万;
</li>
<li>
如果报聘职级为M1(销售经理),须携带2人入职;
</li>
<li>
如果报聘职级为S2(业务合伙人)在最近三年内,至少一年同业收入达100万;
</li>
<li>
如果报聘职级为M2(高级销售经理),须携带3人入职;
</li>
<li>
如果报聘职级为M3(资深销售经理),须携带4人入职;
</li>
<li>
如果报聘职级为M4(销售总监),须携带5人入职;
</li>
<li>
如果报聘职级为M5(销售经理),须携带6人入职;
</li>
<li>
如果报聘职级为M6(资深销售总监),须携带7人入职;
</li>
<li>
如果报聘职级为S1(合伙人),须携带 12 人入职,至少包含1名 M6 职级,并提供过去一年内30万保险销售收入证明;
</li>
<li>
如果报聘职级为S2(高级合伙人),须携带24人入职,至少包含1名 S1 职级,并提供过去一年内50万保险销售收入证明;
</li>
<li>
如果报聘职级为S3(资深合伙人),须携带 75 人入职,至少各含一名S1和S2职级,并提供过去一年内 100 万保险销售收入证明;
</li>
<li>
如果报聘职级为IA(独立经纪人),须要符合经纪人聘用条件的绩优保险从业人员
</li>
</ul>
</ul>
</div>
</div>
<footer
class=
"fixed"
(
click
)="
next
()"
*
ngIf=
"approveStatus==null || approveStatus=='-1'"
>
<footer
class=
"fixed"
(
click
)="
next
()"
*
ngIf=
"approveStatus==null || approveStatus=='-1'"
>
...
...
src/app/my/my.service.ts
View file @
8c634c47
...
@@ -668,4 +668,18 @@ export class MyService {
...
@@ -668,4 +668,18 @@ export class MyService {
return
this
.
http
return
this
.
http
.
post
(
url
,
JSON
.
stringify
(
param
));
.
post
(
url
,
JSON
.
stringify
(
param
));
}
}
//根据标签查询产品库标签
queryProductBox
(
param
){
const
url
=
this
.
API
+
"/erp/queryProductBox"
;
return
this
.
http
.
post
(
url
,
JSON
.
stringify
(
param
));
}
//查询产品对应的文件
queryProductFile
(
param
){
const
url
=
this
.
API
+
"/erp/queryProductFile"
;
return
this
.
http
.
post
(
url
,
JSON
.
stringify
(
param
));
}
}
}
src/app/my/order-detail/order-detail.component.html
View file @
8c634c47
...
@@ -86,7 +86,8 @@
...
@@ -86,7 +86,8 @@
</li>
</li>
<li
class=
"list-group-item"
*
ngIf=
"holderInfo?.idInfo.idNo"
>
<li
class=
"list-group-item"
*
ngIf=
"holderInfo?.idInfo.idNo"
>
<span>
证件号码
</span>
<span>
证件号码
</span>
<span>
{{holderInfo?.idInfo.idNo.substr(0,2) + '******' + holderInfo?.idInfo.idNo.substr(holderInfo?.idInfo.idNo.length-2,2)}}
</span>
<span>
{{holderInfo?.idInfo.idNo}}
</span>
<!-- <span>{{holderInfo?.idInfo.idNo.substr(0,2) + '******' + holderInfo?.idInfo.idNo.substr(holderInfo?.idInfo.idNo.length-2,2)}}</span> -->
</li>
</li>
</ul>
</ul>
<div
class=
"insuredsBox"
*
ngFor=
"let insured of insuredInfos;index as i"
>
<div
class=
"insuredsBox"
*
ngFor=
"let insured of insuredInfos;index as i"
>
...
...
src/app/my/product-data/product-data.component.ts
View file @
8c634c47
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
MyService
}
from
'../my.service'
;
import
{
ActivatedRoute
}
from
"@angular/router"
;
@
Component
({
@
Component
({
selector
:
'ydlife-product-data'
,
selector
:
'ydlife-product-data'
,
...
@@ -7,8 +9,9 @@ import {Component, OnInit} from '@angular/core';
...
@@ -7,8 +9,9 @@ import {Component, OnInit} from '@angular/core';
})
})
export
class
ProductDataComponent
implements
OnInit
{
export
class
ProductDataComponent
implements
OnInit
{
productDataMenuLists
:
Array
<
any
>
;
productDataMenuLists
:
Array
<
any
>
;
productId
:
any
;
constructor
()
{
planId
:
any
;
constructor
(
private
myService
:
MyService
,
private
activatedRoute
:
ActivatedRoute
)
{
// 产品资料菜单
// 产品资料菜单
this
.
productDataMenuLists
=
[
this
.
productDataMenuLists
=
[
{
id
:
1
,
iconPath
:
'comIntro.png'
,
name
:
'保司介绍'
,
active
:
1
},
{
id
:
1
,
iconPath
:
'comIntro.png'
,
name
:
'保司介绍'
,
active
:
1
},
...
@@ -24,6 +27,14 @@ export class ProductDataComponent implements OnInit {
...
@@ -24,6 +27,14 @@ export class ProductDataComponent implements OnInit {
}
}
ngOnInit
()
{
ngOnInit
()
{
this
.
productId
=
this
.
activatedRoute
.
snapshot
.
paramMap
.
get
(
'id'
);
this
.
planId
=
this
.
activatedRoute
.
snapshot
.
queryParams
.
planId
?
this
.
activatedRoute
.
snapshot
.
queryParams
.
planId
:
null
;
this
.
queryProductFile
();
}
}
queryProductFile
(){
this
.
myService
.
queryProductFile
({
productId
:
this
.
productId
,
planId
:
this
.
planId
}).
subscribe
((
res
)
=>
{
console
.
log
(
res
)
})
}
}
}
src/app/my/product/product.component.html
View file @
8c634c47
<div
class=
"scrollContainer"
>
<div
class=
"scrollContainer"
>
<div
class=
"scrollContent"
style=
"height: 100%;"
>
<div
class=
"scrollContent"
>
<div
class=
"issueContainer"
>
<div
class=
"issueContainer"
>
<ul
class=
"left"
>
<ul
class=
"left"
>
<li
(
click
)="
switchCategory
(
null
)"
[
ngClass
]="{'
actived
'
:leftSelectedId=
==null}"
>
全部
</li>
<li
(
click
)="
switchCategory
(
1
,
null
)"
[
ngClass
]="{'
actived
'
:leftSelectedId=
==null}"
>
全部
</li>
<li
*
ngFor=
"let leftItem of leftList"
(
click
)="
switchCategory
(
leftItem
.
id
)"
<li
*
ngFor=
"let leftItem of leftList"
(
click
)="
switchCategory
(
1
,
leftItem
)"
[
ngClass
]="{'
actived
'
:leftSelectedId=
==leftItem.id}"
>
{{leftItem.tagName}}
[
ngClass
]="{'
actived
'
:leftSelectedId=
==leftItem.id}"
>
{{leftItem.tagName}}
</li>
</li>
</ul>
</ul>
...
@@ -16,119 +16,50 @@
...
@@ -16,119 +16,50 @@
<li
(
click
)="
allFilter
()"
>
筛选
<img
src=
"assets/images/product_select.png"
alt=
"筛选"
style=
"width: 16px;height:16px;"
></li>
<li
(
click
)="
allFilter
()"
>
筛选
<img
src=
"assets/images/product_select.png"
alt=
"筛选"
style=
"width: 16px;height:16px;"
></li>
</ul>
</ul>
<div
class=
"mask"
*
ngIf=
"filterSelectedFlag"
(
click
)="
filterSelectedFlag=
false"
></div>
<div
class=
"mask"
*
ngIf=
"filterSelectedFlag"
(
click
)="
filterSelectedFlag=
false"
></div>
<ul
class=
"select_all slowRight"
*
ngIf=
"filterSelectedFlag"
>
<div
class=
"select_all slowRight"
*
ngIf=
"filterSelectedFlag"
>
<li
*
ngFor=
"let rightItem of rightList"
>
<ul>
<h5>
{{rightItem.tagName}}
</h5>
<li
*
ngFor=
"let rightItem of rightList"
>
<div
class=
"optionLists"
>
<h5>
{{rightItem.tagName}}
</h5>
<div
*
ngFor=
"let optItem of rightItem.tagViewQueryInfos"
>
{{optItem.tagName}}
</div>
<div
class=
"optionLists"
>
</div>
<div
*
ngFor=
"let optItem of rightItem.tagViewQueryInfos"
</li>
(
click
)="
switchCategory
(
2
,
optItem
)"
[
ngClass
]="{
selected:optItem
.
selected =
=
true
}"
</ul>
>
{{optItem.tagName}}
</div>
<ul
class=
"productLists"
>
<li>
<div
class=
"productInfoContent"
>
<h3>
京东安联滑雪运动保障计划
</h3>
<div
class=
"featureContent"
>
<div>
续保至99周岁
</div>
<div>
200万保额0免赔
</div>
</div>
<div
class=
"insuranceRulesContent"
>
<p>
投保年龄:20-50周岁
</p>
<p>
投保期限:1年
</p>
</div>
<div
class=
"priceContent"
>
<span>
¥
</span><strong>
48
</strong><span>
元起 | 每人每年
</span>
</div>
</div>
<div
class=
"dataContent"
>
<div
(
click
)="
goData
(
1
)"
>
资料
</div>
<div>
可售
</div>
</div>
</li>
<li>
<div
class=
"productInfoContent"
>
<h3>
京东安联滑雪运动保障计划
</h3>
<div
class=
"featureContent"
>
<div>
续保至99周岁
</div>
<div>
200万保额0免赔
</div>
</div>
<div
class=
"insuranceRulesContent"
>
<p>
投保年龄:20-50周岁
</p>
<p>
投保期限:1年
</p>
</div>
<div
class=
"priceContent"
>
<span>
¥
</span><strong>
48
</strong><span>
元起 | 每人每年
</span>
</div>
</div>
</div>
</li>
<div
class=
"dataContent"
>
</ul>
<div>
资料
</div>
<div
class=
"foot_btn"
>
<div>
可售
</div>
<div
(
click
)="
restart
()"
>
重置
</div>
</div>
<div
(
click
)="
confirm
()"
>
确定
</div>
</li>
</div>
</div>
<li>
<div
class=
"productInfoContent"
>
<ul
class=
"productLists"
>
<h3>
京东安联滑雪运动保障计划
</h3>
<li
*
ngFor=
"let productInfoItem of productInfos"
>
<div
class=
"featureContent"
>
<div
class=
"productInfoContent"
(
click
)="
goProductDetail
(
productInfoItem
)"
>
<div>
续保至99周岁
</div>
<h3>
{{productInfoItem.productName}}
</h3>
<div>
200万保额0免赔
</div>
<div
class=
"featureContent"
*
ngIf=
"productInfoItem['labels']"
>
</div>
<div
*
ngFor=
"let labelItem of productInfoItem['labels']"
>
<div
class=
"insuranceRulesContent"
>
{{labelItem}}
<p>
投保年龄:20-50周岁
</p>
</div>
<p>
投保期限:1年
</p>
</div>
<div
class=
"priceContent"
>
<span>
¥
</span><strong>
48
</strong><span>
元起 | 每人每年
</span>
</div>
</div>
<div
class=
"dataContent"
>
<div>
资料
</div>
<div>
可售
</div>
</div>
</li>
<li>
<div
class=
"productInfoContent"
>
<h3>
京东安联滑雪运动保障计划
</h3>
<div
class=
"featureContent"
>
<div>
续保至99周岁
</div>
<div>
200万保额0免赔
</div>
</div>
</div>
<div
class=
"insuranceRulesContent"
>
<div
class=
"insuranceRulesContent"
*
ngIf=
"productInfoItem['adaptionInfos']"
>
<p>
投保年龄:20-50周岁
</p>
<div
*
ngFor=
"let adaptionItem of productInfoItem['adaptionInfos']"
>
<p>
投保期限:1年
</p>
<span>
{{adaptionItem.name}}:
</span>
<span
[
innerHtml
]="
adaptionItem
.
value
"
></span>
</div>
</div>
</div>
<div
class=
"priceContent"
>
<div
class=
"priceContent"
>
<span>
¥
</span><strong>
48
</strong><span>
元起 | 每人每年
</span>
<span>
¥
</span><strong>
{{productInfoItem.price | number:'1.0-0'}}
</strong><span>
元起 | 每人每年
</span>
</div>
</div>
</div>
</div>
<div
class=
"dataContent"
>
<div
class=
"dataContent"
>
<div>
资料
</div>
<div
(
click
)="
goData
(
productInfoItem
)"
>
资料
</div>
<div>
可售
</div>
<div>
可售
</div>
</div>
</div>
</li>
</li>
<li>
<div
class=
"productInfoContent"
>
<h3>
京东安联滑雪运动保障计划
</h3>
<div
class=
"featureContent"
>
<div>
续保至99周岁
</div>
<div>
200万保额0免赔
</div>
</div>
<div
class=
"insuranceRulesContent"
>
<p>
投保年龄:20-50周岁
</p>
<p>
投保期限:1年
</p>
</div>
<div
class=
"priceContent"
>
<span>
¥
</span><strong>
48
</strong><span>
元起 | 每人每年
</span>
</div>
</div>
<div
class=
"dataContent"
>
<div>
资料
</div>
<div>
可售
</div>
</div>
</li>
</ul>
</ul>
</div>
</div>
</div>
</div>
...
...
src/app/my/product/product.component.scss
View file @
8c634c47
.scrollContainer
{
.scrollContainer
{
position
:
relative
;
position
:
relative
;
height
:
100%
;
height
:
100%
;
.issueContainer
{
.scrollContent
{
display
:
flex
;
height
:
100%
;
height
:
100%
;
.left
{
overflow
:
hidden
;
width
:
90px
;
.issueContainer
{
display
:
flex
;
height
:
100%
;
height
:
100%
;
overflow-x
:
hidden
;
.left
{
overflow-y
:
scroll
;
width
:
90px
;
-webkit-overflow-scrolling
:
touch
;
background
:
#F6F6F6
;
position
:
absolute
;
left
:
0
;
top
:
0
;
li
{
position
:
relative
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
height
:
43px
;
line-height
:
43px
;
text-align
:
center
;
}
li
:before
{
content
:
""
;
display
:
block
;
position
:
absolute
;
left
:
22px
;
top
:
42px
;
width
:
60%
;
// height: 1px;
background
:
rgba
(
220
,
220
,
220
,
0
.4
);
}
li
.actived
{
background-color
:
#fff
;
color
:
#F16A5D
;
}
li
.actived
:after
{
content
:
""
;
position
:
absolute
;
left
:
0
;
top
:
0
;
bottom
:
0
;
right
:
0
;
width
:
4px
;
height
:
50%
;
font-size
:
0
;
background-color
:
#F16A5D
;
margin
:
auto
0
;
}
}
.right
{
width
:
calc
(
100%
-
90px
);
position
:
relative
;
margin-left
:
90px
;
.mask
{
position
:
fixed
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
background
:
rgba
(
0
,
0
,
0
,
0
.3
);
overflow-x
:
hidden
;
}
overflow-y
:
scroll
;
.right_header
{
-webkit-overflow-scrolling
:
touch
;
display
:
flex
;
background
:
#F6F6F6
;
padding
:
0
15px
;
li
{
width
:
100%
;
position
:
relative
;
height
:
44px
;
white-space
:
nowrap
;
justify-content
:
space-between
;
overflow
:
hidden
;
align-items
:
center
;
text-overflow
:
ellipsis
;
color
:
#333
;
height
:
43px
;
border-bottom
:
1px
#f5f5f5
solid
;
line-height
:
43px
;
position
:
absolute
;
text-align
:
center
;
right
:
0
;
}
top
:
0
;
li
:before
{
background
:
#fff
;
content
:
""
;
.iconfont
{
display
:
block
;
color
:
#666
;
position
:
absolute
;
font-size
:
10px
;
left
:
22px
;
top
:
42px
;
width
:
60%
;
// height: 1px;
background
:
rgba
(
220
,
220
,
220
,
0
.4
);
}
li
.actived
{
background-color
:
#fff
;
color
:
#F16A5D
;
}
li
.actived
:after
{
content
:
""
;
position
:
absolute
;
left
:
0
;
top
:
0
;
bottom
:
0
;
right
:
0
;
width
:
4px
;
height
:
50%
;
font-size
:
0
;
background-color
:
#F16A5D
;
margin
:
auto
0
;
}
}
}
}
.select_all
{
.right
{
position
:
absolute
;
width
:
calc
(
100%
-
90px
);
right
:
0
;
position
:
relative
;
top
:
0
;
background-color
:
#fff
;
background
:
#fff
;
.mask
{
width
:
100%
;
position
:
fixed
;
height
:
100%
;
left
:
0
;
padding
:
20px
0
20px
10px
;
top
:
0
;
>
li
{
width
:
100%
;
margin-bottom
:
15px
;
height
:
100%
;
h5
{
background
:
rgba
(
0
,
0
,
0
,
0
.3
);
font-size
:
16px
;
}
font-weight
:
bold
;
.right_header
{
color
:
#333
;
display
:
flex
;
margin-bottom
:
10px
;
padding
:
0
15px
;
width
:
100%
;
height
:
44px
;
justify-content
:
space-between
;
align-items
:
center
;
color
:
#333
;
border-bottom
:
1px
#f5f5f5
solid
;
background-color
:
#fff
;
overflow-x
:
hidden
;
overflow-y
:
scroll
;
-webkit-overflow-scrolling
:
touch
;
.iconfont
{
color
:
#666
;
font-size
:
10px
;
}
}
.optionLists
{
}
.select_all
{
position
:
absolute
;
right
:
0
;
top
:
0
;
background
:
#fff
;
width
:
100%
;
height
:
100%
;
padding
:
20px
0
20px
10px
;
ul
{
>
li
{
margin-bottom
:
15px
;
h5
{
font-size
:
16px
;
font-weight
:
bold
;
color
:
#333
;
margin-bottom
:
10px
;
}
.optionLists
{
display
:
flex
;
width
:
100%
;
flex-wrap
:
wrap
;
>
div
{
margin-right
:
10px
;
flex
:
1
;
background
:
#f6f6f6
;
height
:
38px
;
line-height
:
38px
;
text-align
:
center
;
margin-bottom
:
10px
;
min-width
:
29%
;
max-width
:
30%
;
}
div
.selected
{
color
:
#fff
;
background
:
#F8002E
;
}
}
}
}
.foot_btn
{
display
:
flex
;
display
:
flex
;
width
:
100%
;
width
:
100%
;
flex-wrap
:
wrap
;
justify-content
:
space-around
;
>
div
{
text-align
:
center
;
margin-right
:
10px
;
div
{
flex
:
1
;
width
:
48%
;
background
:
#ececec
;
height
:
40px
;
height
:
38px
;
line-height
:
40px
;
line-height
:
38px
;
border-radius
:
10px
;
text-align
:
center
;
}
margin-bottom
:
10px
;
div
:nth-child
(
1
)
{
min-width
:
29%
;
border
:
2px
#F8002E
solid
;
max-width
:
30%
;
color
:
#F8002E
;
}
div
:nth-child
(
2
)
{
background
:
#F8002E
;
color
:
#fff
;
}
}
}
}
}
}
}
.productLists
{
.productLists
{
background-color
:
#fff
;
margin-top
:
44px
;
-webkit-box-flex
:
1
;
>
li
{
-ms-flex
:
1
;
padding-left
:
16px
;
flex
:
1
;
border-bottom
:
1px
solid
#dcdcdc
;
height
:
100%
;
}
overflow-x
:
hidden
;
.productInfoContent
{
overflow-y
:
scroll
;
h3
{
-webkit-overflow-scrolling
:
touch
;
font-size
:
18
px
;
padding-bottom
:
60
px
;
color
:
#444
;
>
li
{
font-weight
:
bold
;
padding-left
:
16px
;
padding-top
:
14px
;
border-bottom
:
1px
solid
#dcdcdc
;
padding-bottom
:
8
px
;
padding-bottom
:
15
px
;
}
}
.featureContent
{
li
:last-child
{
display
:
flex
;
border-bottom
:
0
;
margin-bottom
:
10px
;
>
div
{
padding
:
6px
;
background
:
#FCF2F1
;
color
:
#F16A5D
;
border-radius
:
3px
;
margin-right
:
6px
;
}
}
}
.insuranceRulesContent
{
.productInfoContent
{
h3
{
font-size
:
18px
;
color
:
#444
;
font-weight
:
bold
;
padding-top
:
14px
;
padding-bottom
:
8px
;
}
.featureContent
{
display
:
flex
;
margin-bottom
:
10px
;
align-items
:
center
;
>
div
{
padding
:
6px
;
background
:
#FCF2F1
;
color
:
#F16A5D
;
border-radius
:
3px
;
margin-right
:
6px
;
}
}
.insuranceRulesContent
{
}
.priceContent
{
strong
{
color
:
#F16A5D
;
font-size
:
20px
;
margin-right
:
3px
;
}
span
{
font-size
:
12px
;
}
}
}
}
.priceContent
{
.dataContent
{
strong
{
display
:
flex
;
justify-content
:
space-between
;
padding-right
:
15px
;
>
div
:first-child
{
width
:
55px
;
height
:
21px
;
text-align
:
center
;
border
:
1px
solid
#F16A5D
;
border-radius
:
10px
;
color
:
#F16A5D
;
color
:
#F16A5D
;
font-size
:
20px
;
font-size
:
13px
;
margin-right
:
3px
;
}
}
span
{
>
div
:last-child
{
background
:
#FDF5F4
;
color
:
#F16A5D
;
font-size
:
12px
;
font-size
:
12px
;
border-radius
:
3px
;
padding
:
5px
6px
;
}
}
}
}
}
}
.dataContent
{
display
:
flex
;
justify-content
:
space-between
;
padding-right
:
15px
;
>
div
:first-child
{
width
:
55px
;
height
:
21px
;
text-align
:
center
;
border
:
1px
solid
#F16A5D
;
border-radius
:
10px
;
color
:
#F16A5D
;
font-size
:
13px
;
}
>
div
:last-child
{
background
:
#FDF5F4
;
color
:
#F16A5D
;
font-size
:
12px
;
border-radius
:
3px
;
padding
:
5px
6px
;
}
}
}
}
}
}
}
}
}
}
.slowRight
{
.slowRight
{
...
...
src/app/my/product/product.component.ts
View file @
8c634c47
...
@@ -2,7 +2,10 @@ import {Component, OnInit} from '@angular/core';
...
@@ -2,7 +2,10 @@ import {Component, OnInit} from '@angular/core';
import
{
LifeCommonService
}
from
'../../common/life-common.service'
;
import
{
LifeCommonService
}
from
'../../common/life-common.service'
;
import
{
MyService
}
from
'../../my/my.service'
;
import
{
MyService
}
from
'../../my/my.service'
;
import
{
Router
}
from
"@angular/router"
;
import
{
Router
}
from
"@angular/router"
;
import
{
ToastService
}
from
'ng-zorro-antd-mobile'
;
import
{
Plans
}
from
'../../domain/plans'
;
import
{
LocalStorage
}
from
'../../domain/local.storage'
;
import
{
User
}
from
'../../domain/user'
;
@
Component
({
@
Component
({
selector
:
'ydlife-product'
,
selector
:
'ydlife-product'
,
templateUrl
:
'./product.component.html'
,
templateUrl
:
'./product.component.html'
,
...
@@ -14,8 +17,15 @@ export class ProductComponent implements OnInit {
...
@@ -14,8 +17,15 @@ export class ProductComponent implements OnInit {
rightList
:
Array
<
any
>
;
rightList
:
Array
<
any
>
;
leftSelectedId
:
number
=
null
;
leftSelectedId
:
number
=
null
;
filterSelectedFlag
:
boolean
=
false
;
filterSelectedFlag
:
boolean
=
false
;
tagIds
:
Array
<
any
>
=
[];
constructor
(
private
myService
:
MyService
,
public
lifeCommonService
:
LifeCommonService
,
private
router
:
Router
)
{
productInfos
:
Array
<
any
>
;
productInfo
:
Plans
;
inquiry
:
User
;
constructor
(
private
myService
:
MyService
,
public
lifeCommonService
:
LifeCommonService
,
private
router
:
Router
,
private
_toast
:
ToastService
,
private
ls
:
LocalStorage
)
{
}
}
ngOnInit
()
{
ngOnInit
()
{
...
@@ -23,24 +33,22 @@ export class ProductComponent implements OnInit {
...
@@ -23,24 +33,22 @@ export class ProductComponent implements OnInit {
this
.
tagViewQuery
(
305
);
this
.
tagViewQuery
(
305
);
this
.
tagViewQuery
(
309
);
this
.
tagViewQuery
(
309
);
this
.
tagViewQuery
(
306
);
this
.
tagViewQuery
(
306
);
// this.leftList = [
// {name:'全部',tagId:null},
// {name:'推荐',tagId:1},
// {name:'新品',tagId:2},
// {name:'意外',tagId:3},
// {name:'医疗',tagId:4},
// {name:'旅游',tagId:5},
// {name:'重疾',tagId:6},
// {name:'年金',tagId:7},
// {name:'定寿',tagId:8},
// {name:'终身寿',tagId:9},
// {name:'留学',tagId:10},
// {name:'高端医疗',tagId:11}
// ]
}
}
switchCategory
(
id
)
{
//type:1表示左侧筛选2表示右侧筛选
this
.
leftSelectedId
=
id
;
switchCategory
(
type
,
item
?:
any
)
{
if
(
type
==
1
){
if
(
item
&&
item
.
tagId
!=
null
){
this
.
leftSelectedId
=
item
.
id
;
this
.
tagIds
=
[
item
.
tagId
]
}
else
{
this
.
leftSelectedId
=
null
;
this
.
tagIds
=
[];
}
this
.
queryProductBox
();
}
else
if
(
type
==
2
){
item
.
selected
=
!
item
.
selected
;
}
}
}
//type:305左侧,309上侧,306筛选
//type:305左侧,309上侧,306筛选
...
@@ -53,6 +61,8 @@ export class ProductComponent implements OnInit {
...
@@ -53,6 +61,8 @@ export class ProductComponent implements OnInit {
if
(
res
[
'success'
])
{
if
(
res
[
'success'
])
{
if
(
type
==
305
)
{
if
(
type
==
305
)
{
this
.
leftList
=
res
[
'data'
][
'tagViewQueryInfos'
];
this
.
leftList
=
res
[
'data'
][
'tagViewQueryInfos'
];
//初始化查推荐产品
this
.
switchCategory
(
1
,
this
.
leftList
[
0
])
}
else
if
(
type
==
309
)
{
}
else
if
(
type
==
309
)
{
this
.
topList
=
res
[
'data'
][
'tagViewQueryInfos'
];
this
.
topList
=
res
[
'data'
][
'tagViewQueryInfos'
];
}
else
{
}
else
{
...
@@ -64,12 +74,83 @@ export class ProductComponent implements OnInit {
...
@@ -64,12 +74,83 @@ export class ProductComponent implements OnInit {
// 筛选
// 筛选
allFilter
()
{
allFilter
()
{
this
.
tagViewQuery
(
306
);
this
.
filterSelectedFlag
=
true
;
this
.
filterSelectedFlag
=
true
;
}
}
// 进入产品资料页面
// 进入产品资料页面
goData
(
e
)
{
goData
(
productInfoItem
)
{
this
.
router
.
navigate
([
'/productData'
,
e
]);
this
.
router
.
navigate
([
'/productData'
,
productInfoItem
.
productId
],{
queryParams
:{
planId
:
productInfoItem
.
planId
}});
}
//根据标签查询产品
queryProductBox
(){
this
.
myService
.
queryProductBox
({
tagIds
:
this
.
tagIds
}).
subscribe
((
res
)
=>
{
if
(
res
[
'success'
]){
this
.
productInfos
=
res
[
'data'
][
'productInfos'
];
//截取两个特色
if
(
this
.
productInfos
&&
this
.
productInfos
.
length
>
0
){
for
(
const
productInfos
of
this
.
productInfos
){
if
(
productInfos
.
labels
){
productInfos
.
labels
.
splice
(
2
);
}
}
}
}
else
{
this
.
productInfos
=
[];
const
toast
=
ToastService
.
show
(
`
${
res
[
'message'
]}
`
,
0
);
setTimeout
(()
=>
{
ToastService
.
hide
();
},
3000
);
}
})
}
//重置
restart
(){
for
(
let
i
=
0
;
i
<
this
.
rightList
.
length
;
i
++
){
for
(
let
j
=
0
;
j
<
this
.
rightList
[
i
][
'tagViewQueryInfos'
].
length
;
j
++
){
this
.
rightList
[
i
][
'tagViewQueryInfos'
][
j
][
'selected'
]
=
false
;
}
}
}
//确定搜索
confirm
(){
for
(
let
i
=
0
;
i
<
this
.
rightList
.
length
;
i
++
){
for
(
let
j
=
0
;
j
<
this
.
rightList
[
i
][
'tagViewQueryInfos'
].
length
;
j
++
){
if
(
this
.
rightList
[
i
][
'tagViewQueryInfos'
][
j
][
'selected'
]
==
true
){
this
.
tagIds
.
push
(
this
.
rightList
[
i
][
'tagViewQueryInfos'
][
j
][
'tagId'
])
}
}
}
this
.
filterSelectedFlag
=
false
;
this
.
queryProductBox
();
}
// 点击产品进入详情页
goProductDetail
(
product
:
Plans
):
void
{
this
.
productInfo
=
product
;
this
.
productInfo
.
type
=
2
;
if
(
this
.
productInfo
.
noPlanProduct
===
true
)
{
window
.
location
.
href
=
`https://
${
window
.
location
.
host
}
/life/
${
this
.
productInfo
.
productId
}
`
}
else
{
if
(
this
.
productInfo
.
productCategoryId
===
1
||
this
.
productInfo
.
productCategoryId
===
4
)
{
window
.
location
.
href
=
`https://
${
window
.
location
.
host
}
/pdetail/
${
this
.
productInfo
.
planId
}
`
}
else
if
(
this
.
productInfo
.
productCategoryId
===
2
)
{
window
.
location
.
href
=
`https://
${
window
.
location
.
host
}
/hProductDetail/
${
this
.
productInfo
.
planId
}
?type=7`
}
else
if
(
this
.
productInfo
.
productCategoryId
===
5
)
{
window
.
location
.
href
=
`https://
${
window
.
location
.
host
}
/hProductDetail/
${
this
.
productInfo
.
planId
}
?type=9`
}
else
{
window
.
location
.
href
=
`https://
${
window
.
location
.
host
}
/life/
${
this
.
productInfo
.
productId
}
`
this
.
router
.
navigate
([
'/pdetail'
,
this
.
productInfo
.
planId
]);
}
}
}
// 根据开始时间设置结束时间,天数应减1,当日~当日是一天
setInitDate
()
{
this
.
productInfo
.
dayCount
=
this
.
lifeCommonService
.
yearDayCount
(
this
.
productInfo
.
dayCount
,
this
.
productInfo
.
insurerId
==
'5'
);
this
.
lifeCommonService
.
setInitDate
(
this
.
productInfo
.
dayCount
);
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment