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
a9f2ea9b
Commit
a9f2ea9b
authored
Jul 28, 2021
by
sunchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品库筛选&资料页跳转
parent
8c634c47
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
365 additions
and
90 deletions
+365
-90
src/app/domain/plans.ts
+1
-0
src/app/my/commission/commission.component.html
+5
-0
src/app/my/commission/commission.component.scss
+4
-0
src/app/my/commission/commission.component.spec.ts
+25
-0
src/app/my/commission/commission.component.ts
+17
-0
src/app/my/file-list/file-list.component.html
+13
-0
src/app/my/file-list/file-list.component.scss
+42
-0
src/app/my/file-list/file-list.component.spec.ts
+25
-0
src/app/my/file-list/file-list.component.ts
+38
-0
src/app/my/mk-material-detail/mk-material-detail.component.ts
+1
-0
src/app/my/my-center-home/my-center-home.component.ts
+6
-5
src/app/my/my-routing.module.ts
+5
-2
src/app/my/my.module.ts
+3
-1
src/app/my/product-data/product-data.component.html
+6
-10
src/app/my/product-data/product-data.component.ts
+37
-15
src/app/my/product/product.component.html
+37
-23
src/app/my/product/product.component.scss
+18
-9
src/app/my/product/product.component.ts
+76
-23
src/index.html
+2
-2
src/styles.scss
+4
-0
No files found.
src/app/domain/plans.ts
View file @
a9f2ea9b
...
...
@@ -35,4 +35,5 @@ export class Plans {
needIdCard
?:
string
;
isActiveForProduct
?:
number
;
isActiveForPlan
?:
number
;
isActive
?:
any
;
}
src/app/my/commission/commission.component.html
0 → 100644
View file @
a9f2ea9b
<div
class=
"rich_media_content"
>
<div
[
innerHTML
]="
commission
|
safeHtml
"
>
</div>
</div>
\ No newline at end of file
src/app/my/commission/commission.component.scss
0 → 100644
View file @
a9f2ea9b
.rich_media_content
{
padding
:
calc
(
20px
+
env
(
safe-area-inset-top
))
calc
(
16px
+
env
(
safe-area-inset-right
))
12px
calc
(
16px
+
env
(
safe-area-inset-left
));
}
\ No newline at end of file
src/app/my/commission/commission.component.spec.ts
0 → 100644
View file @
a9f2ea9b
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
CommissionComponent
}
from
'./commission.component'
;
describe
(
'CommissionComponent'
,
()
=>
{
let
component
:
CommissionComponent
;
let
fixture
:
ComponentFixture
<
CommissionComponent
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
CommissionComponent
]
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
CommissionComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/my/commission/commission.component.ts
0 → 100644
View file @
a9f2ea9b
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'ydlife-commission'
,
templateUrl
:
'./commission.component.html'
,
styleUrls
:
[
'./commission.component.scss'
]
})
export
class
CommissionComponent
implements
OnInit
{
commission
:
any
;
constructor
()
{
}
ngOnInit
()
{
this
.
commission
=
sessionStorage
.
getItem
(
'commission'
)
console
.
log
(
this
,
this
.
commission
)
}
}
src/app/my/file-list/file-list.component.html
0 → 100644
View file @
a9f2ea9b
<div
class=
"fileUploadLists"
>
<div
class=
"contentList"
>
<ul>
<li
*
ngFor=
"let fileItem of fileList"
>
<a
href=
"{{fileItem.ossFilePath}}"
download=
"{{fileItem.displayName}}"
target=
"_blank"
>
<div
title=
"{{fileItem.displayName}}"
>
{{fileItem.displayName}}
</div>
<div
style=
"position: absolute;right: 5px;top: 6px;"
><i
class=
"iconfont icon-xiazai"
></i></div>
</a>
</li>
</ul>
</div>
</div>
\ No newline at end of file
src/app/my/file-list/file-list.component.scss
0 → 100644
View file @
a9f2ea9b
.fileUploadLists
{
height
:
100%
;
background
:
#f5f5f5
;
ul
{
list-style
:
none
;
}
.contentList
{
background-color
:
#fff
;
-webkit-box-flex
:
1
;
-ms-flex
:
1
;
flex
:
1
;
height
:
auto
;
overflow-x
:
hidden
;
overflow-y
:
scroll
;
-webkit-overflow-scrolling
:
touch
;
ul
li
{
border-bottom
:
1px
solid
#dcdcdc
;
padding
:
4px
20px
;
position
:
relative
;
.icon-xiazai
{
font-size
:
22px
;
color
:
#ec2d37
;
font-weight
:
bold
;
}
a
{
display
:
flex
;
align-items
:
center
;
color
:
#000
;
.iconfont
{
color
:
#ec2d37
;
font-size
:
22px
;
margin-right
:
8px
;
}
}
}
ul
li
:last-child
{
border
:
none
;
}
}
}
\ No newline at end of file
src/app/my/file-list/file-list.component.spec.ts
0 → 100644
View file @
a9f2ea9b
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
FileListComponent
}
from
'./file-list.component'
;
describe
(
'FileListComponent'
,
()
=>
{
let
component
:
FileListComponent
;
let
fixture
:
ComponentFixture
<
FileListComponent
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
FileListComponent
]
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
FileListComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/my/file-list/file-list.component.ts
0 → 100644
View file @
a9f2ea9b
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Router
,
ActivatedRoute
}
from
"@angular/router"
;
import
{
MyService
}
from
"../my.service"
;
@
Component
({
selector
:
'ydlife-file-list'
,
templateUrl
:
'./file-list.component.html'
,
styleUrls
:
[
'./file-list.component.scss'
]
})
export
class
FileListComponent
implements
OnInit
{
productDataMenuLists
:
Array
<
any
>
;
productId
:
any
;
planId
:
any
;
categoryId
:
any
;
fileList
:
Array
<
any
>
;
constructor
(
private
router
:
Router
,
private
myService
:
MyService
,
private
activatedRoute
:
ActivatedRoute
,)
{
}
ngOnInit
()
{
// window.location.href = urlItem['fileInfos'][0]['ossFilePath'];
this
.
productId
=
this
.
activatedRoute
.
snapshot
.
queryParams
.
productId
?
this
.
activatedRoute
.
snapshot
.
queryParams
.
productId
:
null
;;
this
.
planId
=
this
.
activatedRoute
.
snapshot
.
queryParams
.
planId
?
this
.
activatedRoute
.
snapshot
.
queryParams
.
planId
:
null
;
this
.
categoryId
=
this
.
activatedRoute
.
snapshot
.
queryParams
.
categoryId
?
this
.
activatedRoute
.
snapshot
.
queryParams
.
categoryId
:
null
;
this
.
queryProductFile
();
}
queryProductFile
(){
this
.
myService
.
queryProductFile
({
productId
:
this
.
productId
,
planId
:
this
.
planId
}).
subscribe
((
res
)
=>
{
if
(
res
[
'success'
]){
this
.
productDataMenuLists
=
res
[
'data'
][
'categoryInfos'
];
for
(
let
i
=
0
;
i
<
this
.
productDataMenuLists
.
length
;
i
++
){
if
(
this
.
categoryId
==
this
.
productDataMenuLists
[
i
][
'categoryId'
]){
this
.
fileList
=
this
.
productDataMenuLists
[
i
][
'fileInfos'
]
}
}
}
})
}
}
src/app/my/mk-material-detail/mk-material-detail.component.ts
View file @
a9f2ea9b
...
...
@@ -234,6 +234,7 @@ export class MkMaterialDetailComponent implements OnInit {
}
// 0是有plan,1是无plan
if
(
posterInfo
.
isPlan
==
'0'
)
{
if
(
posterInfo
.
productCategoryId
==
'2'
)
{
this
.
shareInfo
.
url
=
`
${
environment
.
DOMAINNAME
}
/hProductDetail/
${
this
.
materialItemId
}
?shareCode=
${
shareCodeUuid
}
&type=7`
;
}
else
if
(
posterInfo
.
productCategoryId
==
'5'
)
{
...
...
src/app/my/my-center-home/my-center-home.component.ts
View file @
a9f2ea9b
...
...
@@ -92,7 +92,7 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
{
no
:
4
,
subtitle
:
'线上投保'
,
icon
:
'online'
,
path
:
`https://
${
window
.
location
.
host
}
/index?source=dyd`
,
routerLink
:
''
,
showSubMenu
:
true
},
{
no
:
13
,
subtitle
:
'我的商机'
,
icon
:
'line'
,
path
:
''
,
routerLink
:
'business'
,
showSubMenu
:
true
},
{
no
:
9
,
subtitle
:
'执业证书'
,
icon
:
'card'
,
path
:
`https://
${
window
.
location
.
host
}
/brokerQry/#/brokerDetail/
${
this
.
lifeCustomerInfo
.
practitionerId
}
?source=0`
,
routerLink
:
''
,
showSubMenu
:
true
},
{
no
:
1
0
,
subtitle
:
'职业类别'
,
icon
:
'job'
,
path
:
'https://www.ydinsurance.cn/occupationQry/'
,
routerLink
:
''
,
showSubMenu
:
true
},
{
no
:
1
7
,
subtitle
:
'产品库'
,
icon
:
'product'
,
path
:
''
,
routerLink
:
'product'
,
showSubMenu
:
true
},
{
no
:
7
,
subtitle
:
'文章分享'
,
icon
:
'article'
,
path
:
''
,
routerLink
:
'article/null'
,
showSubMenu
:
true
},
{
no
:
3
,
subtitle
:
'产品海报'
,
icon
:
'poster_p'
,
path
:
'/salesDetail'
,
routerLink
:
'material'
,
showSubMenu
:
true
},
],
...
...
@@ -120,8 +120,9 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
{
no
:
21
,
subtitle
:
'公司制度'
,
icon
:
'management'
,
path
:
''
,
routerLink
:
''
,
showSubMenu
:
true
},
{
no
:
23
,
subtitle
:
'我的报聘'
,
icon
:
'pin'
,
path
:
''
,
routerLink
:
'my_application'
,
showSubMenu
:
true
},
{
no
:
24
,
subtitle
:
'目标设置'
,
icon
:
'set'
,
path
:
''
,
routerLink
:
'target'
,
showSubMenu
:
true
},
{
no
:
11
,
subtitle
:
'文件下载'
,
icon
:
'download'
,
path
:
'https://www.ydinsurance.cn/?page_id=13957'
,
routerLink
:
'fileUpload'
,
showSubMenu
:
true
},
{
no
:
25
,
subtitle
:
''
,
icon
:
'default'
,
path
:
''
,
routerLink
:
''
,
showSubMenu
:
true
},
{
no
:
26
,
subtitle
:
''
,
icon
:
'default'
,
path
:
''
,
routerLink
:
''
,
showSubMenu
:
true
}
//
{ no: 26, subtitle: '', icon: 'default', path: '', routerLink: '' ,showSubMenu:true}
],
isShow
:
true
...
...
@@ -131,9 +132,9 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
content
:
[
{
no
:
5
,
subtitle
:
'保险ABC'
,
icon
:
'abc'
,
path
:
`https://
${
window
.
location
.
host
}
/issue`
,
routerLink
:
''
,
showSubMenu
:
true
},
{
no
:
6
,
subtitle
:
'培训课件'
,
icon
:
'train'
,
path
:
''
,
routerLink
:
'training'
,
showSubMenu
:
true
},
{
no
:
1
1
,
subtitle
:
'文件下载'
,
icon
:
'download'
,
path
:
'https://www.ydinsurance.cn/?page_id=13957'
,
routerLink
:
'fileUpload
'
,
showSubMenu
:
true
},
{
no
:
17
,
subtitle
:
'产品库'
,
icon
:
'product'
,
path
:
''
,
routerLink
:
'product
'
,
showSubMenu
:
true
}
{
no
:
1
0
,
subtitle
:
'职业类别'
,
icon
:
'job'
,
path
:
'https://www.ydinsurance.cn/occupationQry/'
,
routerLink
:
'
'
,
showSubMenu
:
true
},
{
no
:
26
,
subtitle
:
''
,
icon
:
'default'
,
path
:
''
,
routerLink
:
'
'
,
showSubMenu
:
true
}
// { no: 17, subtitle: '产品库', icon: 'product', path: '', routerLink: 'https://www.ydinsurance.cn/?page_id=14331' ,showSubMenu:true}
],
isShow
:
true
}
...
...
src/app/my/my-routing.module.ts
View file @
a9f2ea9b
...
...
@@ -55,8 +55,9 @@ import { ArticleReadComponent } from './article-read/article-read.component';
import
{
SalaryDetailComponent
}
from
'./salary-detail/salary-detail.component'
;
import
{
SalaryFirstYearComponent
}
from
'./salary-first-year/salary-first-year.component'
;
import
{
ProductComponent
}
from
'./product/product.component'
;
import
{
ProductDataComponent
}
from
"./product-data/product-data.component"
;
import
{
ProductDataComponent
}
from
"./product-data/product-data.component"
;
import
{
CommissionComponent
}
from
'./commission/commission.component'
;
import
{
FileListComponent
}
from
'./file-list/file-list.component'
;
const
myRoutes
:
Routes
=
[
{
path
:
''
,
component
:
MyCenterHomeComponent
,
canActivate
:
[
AuthGuard
],
data
:
[{
title
:
'银盾保险经纪 - 工作台'
}]
},
...
...
@@ -120,6 +121,8 @@ const myRoutes: Routes = [
{
path
:
'salary_detail/:id'
,
component
:
SalaryFirstYearComponent
,
canActivate
:[
AuthGuard
]},
{
path
:
'product'
,
component
:
ProductComponent
,
canActivate
:[
AuthGuard
]},
{
path
:
'productData/:id'
,
component
:
ProductDataComponent
,
canActivate
:[
AuthGuard
]},
{
path
:
'commission'
,
component
:
CommissionComponent
,
canActivate
:[
AuthGuard
]},
{
path
:
'filelist'
,
component
:
FileListComponent
,
canActivate
:[
AuthGuard
]}
];
@
NgModule
({
...
...
src/app/my/my.module.ts
View file @
a9f2ea9b
...
...
@@ -69,9 +69,11 @@ import { SalaryFirstYearComponent } from './salary-first-year/salary-first-year.
import
{
DetailModalComponent
}
from
'../common/detail-modal/detail-modal.component'
;
import
{
ProductComponent
}
from
'./product/product.component'
;
import
{
ProductDataComponent
}
from
'./product-data/product-data.component'
;
import
{
CommissionComponent
}
from
'./commission/commission.component'
;
import
{
FileListComponent
}
from
'./file-list/file-list.component'
;
@
NgModule
({
declarations
:
[
MyCenterHomeComponent
,
MkMaterialComponent
,
MkMaterialDetailComponent
,
FileUploadComponent
,
ImportantAnnouncementComponent
,
SalesDetailComponent
,
AnnouncementDetailComponent
,
MyBusinessComponent
,
MyBusinessDetailComponent
,
PickerComponent
,
MyToastComponent
,
SalesRankComponent
,
TeamRankComponent
,
RecruitingComponent
,
RecruitingDetailComponent
,
ThanksComponent
,
MySettingComponent
,
MySettingDetailComponent
,
MyNewsComponent
,
MyTargetComponent
,
TeamPanelComponent
,
SwitchNumberPipe
,
TeamSalesScoreComponent
,
ScoreDetailsComponent
,
BusinessCardComponent
,
OrderDetailComponent
,
SalaryComponent
,
TodoListComponent
,
AddTaskComponent
,
MedicalServiceComponent
,
InvitationComponent
,
RegisterComponent
,
EmployeeInfoComponent
,
EmployeeBasicInfoComponent
,
WorkExperienceComponent
,
PersonalPhotosComponent
,
EmployeeIdCardComponent
,
EmployeeEducationComponent
,
PersonalStatementComponent
,
SignatureComponent
,
EmployeeSubmitComponent
,
BankCardComponent
,
MemberDetailComponent
,
ApprovalListComponent
,
ApprovalCommentsComponent
,
ApprovalResultListComponent
,
MyApplicationComponent
,
SuggestionComponent
,
EmployeeSalaryComponent
,
HistoricalRankComponent
,
TeamAreaPanelComponent
,
ArticleComponent
,
ArticleDetailComponent
,
ArticleReadComponent
,
SalaryDetailComponent
,
SalaryFirstYearComponent
,
DetailModalComponent
,
ProductComponent
,
ProductDataComponent
],
declarations
:
[
MyCenterHomeComponent
,
MkMaterialComponent
,
MkMaterialDetailComponent
,
FileUploadComponent
,
ImportantAnnouncementComponent
,
SalesDetailComponent
,
AnnouncementDetailComponent
,
MyBusinessComponent
,
MyBusinessDetailComponent
,
PickerComponent
,
MyToastComponent
,
SalesRankComponent
,
TeamRankComponent
,
RecruitingComponent
,
RecruitingDetailComponent
,
ThanksComponent
,
MySettingComponent
,
MySettingDetailComponent
,
MyNewsComponent
,
MyTargetComponent
,
TeamPanelComponent
,
SwitchNumberPipe
,
TeamSalesScoreComponent
,
ScoreDetailsComponent
,
BusinessCardComponent
,
OrderDetailComponent
,
SalaryComponent
,
TodoListComponent
,
AddTaskComponent
,
MedicalServiceComponent
,
InvitationComponent
,
RegisterComponent
,
EmployeeInfoComponent
,
EmployeeBasicInfoComponent
,
WorkExperienceComponent
,
PersonalPhotosComponent
,
EmployeeIdCardComponent
,
EmployeeEducationComponent
,
PersonalStatementComponent
,
SignatureComponent
,
EmployeeSubmitComponent
,
BankCardComponent
,
MemberDetailComponent
,
ApprovalListComponent
,
ApprovalCommentsComponent
,
ApprovalResultListComponent
,
MyApplicationComponent
,
SuggestionComponent
,
EmployeeSalaryComponent
,
HistoricalRankComponent
,
TeamAreaPanelComponent
,
ArticleComponent
,
ArticleDetailComponent
,
ArticleReadComponent
,
SalaryDetailComponent
,
SalaryFirstYearComponent
,
DetailModalComponent
,
ProductComponent
,
ProductDataComponent
,
CommissionComponent
,
FileListComponent
],
imports
:
[
CommonModule
,
LifeCommonModule
,
...
...
src/app/my/product-data/product-data.component.html
View file @
a9f2ea9b
...
...
@@ -3,13 +3,9 @@
<h3>
产品海报
</h3>
<div>
<ul>
<li>
<img
src=
"./assets/images/loading_bg.png"
alt=
""
class=
"img-responsive"
>
</li>
<li>
<img
src=
"./assets/images/loading_bg.png"
alt=
""
class=
"img-responsive"
>
</li>
<li>
<img
src=
"./assets/images/loading_bg.png"
alt=
""
class=
"img-responsive"
>
</li>
<li
(
click
)="
jumpToMaterial
()"
>
<img
[
src
]="
posterUrl
"
class=
"img-responsive"
>
</li>
</ul>
</div>
</div>
...
...
@@ -18,11 +14,11 @@
<h3>
产品资料
</h3>
<div>
<ul>
<li
*
ngFor=
"let productDataMenuItem of productDataMenuLists"
>
<li
*
ngFor=
"let productDataMenuItem of productDataMenuLists"
(
click
)="
jumpToDetail
(
productDataMenuItem
)"
>
<div>
<img
src=
"./assets/images/productData/{{productDataMenuItem['
iconPath
']}}"
alt=
""
>
<img
src=
"./assets/images/productData/{{productDataMenuItem['
displayImage
']}}"
alt=
""
>
</div>
<div>
{{productDataMenuItem.
n
ame}}
</div>
<div>
{{productDataMenuItem.
categoryN
ame}}
</div>
</li>
</ul>
</div>
...
...
src/app/my/product-data/product-data.component.ts
View file @
a9f2ea9b
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
MyService
}
from
'../my.service'
;
import
{
ActivatedRoute
}
from
"@angular/router"
;
import
{
Router
,
ActivatedRoute
}
from
"@angular/router"
;
import
{
ToastService
}
from
'ng-zorro-antd-mobile'
;
@
Component
({
selector
:
'ydlife-product-data'
,
...
...
@@ -11,19 +12,9 @@ export class ProductDataComponent implements OnInit {
productDataMenuLists
:
Array
<
any
>
;
productId
:
any
;
planId
:
any
;
constructor
(
private
myService
:
MyService
,
private
activatedRoute
:
ActivatedRoute
)
{
// 产品资料菜单
this
.
productDataMenuLists
=
[
{
id
:
1
,
iconPath
:
'comIntro.png'
,
name
:
'保司介绍'
,
active
:
1
},
{
id
:
2
,
iconPath
:
'feature.png'
,
name
:
'产品特色'
,
active
:
1
},
{
id
:
3
,
iconPath
:
'item.png'
,
name
:
'产品条款'
,
active
:
1
},
{
id
:
4
,
iconPath
:
'priceRate.png'
,
name
:
'费率现价表'
,
active
:
1
},
{
id
:
5
,
iconPath
:
'notice.png'
,
name
:
'投保须知'
,
active
:
1
},
{
id
:
6
,
iconPath
:
'markting.png'
,
name
:
'营销资料'
,
active
:
1
},
{
id
:
7
,
iconPath
:
'e-insure.png'
,
name
:
'微投保资料'
,
active
:
1
},
{
id
:
8
,
iconPath
:
'commission.png'
,
name
:
'公告佣金'
,
active
:
1
},
{
id
:
9
,
iconPath
:
'other.png'
,
name
:
'其它'
,
active
:
1
}
];
posterUrl
:
any
;
posterInfo
:
any
;
constructor
(
private
router
:
Router
,
private
myService
:
MyService
,
private
activatedRoute
:
ActivatedRoute
,
private
_toast
:
ToastService
)
{
}
ngOnInit
()
{
...
...
@@ -34,7 +25,38 @@ export class ProductDataComponent implements OnInit {
queryProductFile
(){
this
.
myService
.
queryProductFile
({
productId
:
this
.
productId
,
planId
:
this
.
planId
}).
subscribe
((
res
)
=>
{
console
.
log
(
res
)
if
(
res
[
'success'
]){
this
.
productDataMenuLists
=
res
[
'data'
][
'categoryInfos'
].
filter
((
item
)
=>
{
return
item
.
categoryId
!=
22
;
});
this
.
posterInfo
=
res
[
'data'
][
'categoryInfos'
].
filter
((
item
)
=>
{
return
item
.
categoryId
==
22
;
});
this
.
posterUrl
=
this
.
posterInfo
[
0
][
'fileInfos'
][
'0'
][
'ossFilePath'
];
}
else
{
const
toast
=
ToastService
.
show
(
`
${
res
[
'message'
]}
`
,
0
);
setTimeout
(()
=>
{
ToastService
.
hide
();
},
3000
);
}
})
}
jumpToDetail
(
urlItem
){
if
(
urlItem
[
'categoryId'
]
!=
35
){
this
.
router
.
navigate
([
'/filelist'
],{
queryParams
:{
planId
:
this
.
planId
,
productId
:
this
.
productId
,
categoryId
:
urlItem
[
'categoryId'
]}})
}
else
{
sessionStorage
.
setItem
(
'commission'
,
urlItem
[
'fileInfos'
][
0
][
'description'
])
this
.
router
.
navigate
([
'/commission'
]);
}
}
jumpToMaterial
(){
this
.
router
.
navigate
([
`/material/
${
this
.
posterInfo
[
0
][
'fileInfos'
][
'0'
][
'itemId'
]}
`
],
{
queryParams
:
{
itemType
:
this
.
posterInfo
[
0
][
'fileInfos'
][
'0'
][
'itemType'
],
posterType
:
this
.
posterInfo
[
0
][
'fileInfos'
][
'0'
][
'id'
]
}
});
}
}
src/app/my/product/product.component.html
View file @
a9f2ea9b
...
...
@@ -9,22 +9,32 @@
</ul>
<div
class=
"right"
>
<ul
class=
"right_header"
>
<li
*
ngFor=
"let topItem of topList"
>
<li
*
ngFor=
"let topItem of topList"
(
click
)="
allFilter
(
2
,
topItem
)"
>
{{topItem.tagName}}
<span
class=
"iconfont icon-xiangxia"
></span>
</li>
<li
(
click
)="
allFilter
()"
>
筛选
<img
src=
"assets/images/product_select.png"
alt=
"筛选"
style=
"width: 16px;height:16px;"
></li>
<li
(
click
)="
allFilter
(
1
)"
>
筛选
<img
src=
"assets/images/product_select.png"
alt=
"筛选"
style=
"width: 16px;height:16px;"
></li>
</ul>
<div
class=
"mask"
*
ngIf=
"filterSelectedFlag"
(
click
)="
filterSelectedFlag=
false"
></div>
<div
class=
"select_all slowRight"
*
ngIf=
"filterSelectedFlag"
>
<ul>
<li
*
ngFor=
"let rightItem of rightList"
>
<h5>
{{rightItem.tagName}}
</h5>
<div
class=
"optionLists"
>
<h5>
<span>
{{rightItem.tagName}}
</span>
<span
class=
"iconfont icon-xiangxia"
[
ngStyle
]="{'
transform
'
:
rightItem
.
showAll
?
'
rotate
(
180deg
)'
:
'
rotate
(
0
)'}"
(
click
)="
showAll
(
rightItem
)"
*
ngIf=
"rightItem.tagViewQueryInfos.length>6"
></span>
</h5>
<div
class=
"optionLists"
*
ngIf=
"rightItem.showAll"
>
<div
*
ngFor=
"let optItem of rightItem.tagViewQueryInfos"
(
click
)="
switchCategory
(
2
,
optItem
)"
[
ngClass
]="{
selected:optItem
.
selected =
=
true
}"
>
{{optItem.tagName}}
</div>
</div>
<div
class=
"optionLists"
*
ngIf=
"!rightItem.showAll"
>
<div
*
ngFor=
"let optItem of rightItem.tagViewQueryInfos.slice(0,6)"
(
click
)="
switchCategory
(
2
,
optItem
)"
[
ngClass
]="{
selected:optItem
.
selected =
=
true
}"
>
{{optItem.tagName}}
</div>
</div>
</li>
</ul>
<div
class=
"foot_btn"
>
...
...
@@ -35,31 +45,35 @@
<ul
class=
"productLists"
>
<li
*
ngFor=
"let productInfoItem of productInfos"
>
<div
class=
"productInfoContent"
(
click
)="
goProductDetail
(
productInfoItem
)"
>
<h3
>
{{productInfoItem.productName}}
</h3
>
<div
class=
"featureContent"
*
ngIf=
"productInfoItem['labels']"
>
<div
*
ngFor=
"let labelItem of productInfoItem['labels']
"
>
{{labelItem}}
<div
class=
"productInfoContent"
>
<h3
(
click
)="
goData
(
productInfoItem
)"
>
<span>
{{productInfoItem.productName}}
</span
>
<div
class=
"dataContent
"
>
<div>
资料
</div>
</div>
</div>
<div
class=
"insuranceRulesContent"
*
ngIf=
"productInfoItem['adaptionInfos']"
>
<div
*
ngFor=
"let adaptionItem of productInfoItem['adaptionInfos']"
>
<span>
{{adaptionItem.name}}:
</span>
<span
[
innerHtml
]="
adaptionItem
.
value
"
></span>
</h3>
<div
(
click
)="
goProductDetail
(
productInfoItem
)"
>
<div
class=
"featureContent"
*
ngIf=
"productInfoItem['labels']"
>
<div
*
ngFor=
"let labelItem of productInfoItem['labels']"
>
{{labelItem}}
</div>
</div>
<div
class=
"insuranceRulesContent"
*
ngIf=
"productInfoItem['adaptionInfos']"
>
<div
*
ngFor=
"let adaptionItem of productInfoItem['adaptionInfos']"
style=
"display: flex;"
>
<span>
{{adaptionItem.name}}:
</span>
<span
[
innerHtml
]="
adaptionItem
.
value
"
></span>
</div>
</div>
<div
class=
"priceContent"
>
<span>
¥
</span><strong>
{{productInfoItem.price | number:'1.0-0'}}
</strong><span>
元起 | 每人每年
</span>
</div>
</div>
<div
class=
"priceContent"
>
<span>
¥
</span><strong>
{{productInfoItem.price | number:'1.0-0'}}
</strong><span>
元起 | 每人每年
</span>
</div>
</div>
<div
class=
"dataContent"
>
<
!-- <
div class="dataContent">
<div (click)="goData(productInfoItem)">资料</div>
<div>
可售
</div>
</div>
</div> -->
</li>
</ul>
</div>
</div>
...
...
src/app/my/product/product.component.scss
View file @
a9f2ea9b
...
...
@@ -90,6 +90,8 @@
width
:
100%
;
height
:
100%
;
padding
:
20px
0
20px
10px
;
z-index
:
1000
;
overflow-y
:
auto
;
ul
{
>
li
{
margin-bottom
:
15px
;
...
...
@@ -98,6 +100,9 @@
font-weight
:
bold
;
color
:
#333
;
margin-bottom
:
10px
;
display
:
flex
;
justify-content
:
space-between
;
padding-right
:
10px
;
}
.optionLists
{
display
:
flex
;
...
...
@@ -168,6 +173,9 @@
font-weight
:
bold
;
padding-top
:
14px
;
padding-bottom
:
8px
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
baseline
;
}
.featureContent
{
display
:
flex
;
...
...
@@ -200,20 +208,21 @@
padding-right
:
15px
;
>
div
:first-child
{
width
:
55px
;
height
:
2
1
px
;
height
:
2
6
px
;
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
;
font-size
:
15px
;
font-weight
:
normal
;
}
// > div:last-child {
// background: #FDF5F4;
// color: #F16A5D;
// font-size: 12px;
// border-radius: 3px;
// padding: 5px 6px;
// }
}
}
}
...
...
src/app/my/product/product.component.ts
View file @
a9f2ea9b
...
...
@@ -13,14 +13,17 @@ import { User } from '../../domain/user';
})
export
class
ProductComponent
implements
OnInit
{
leftList
:
Array
<
any
>
;
topList
:
Array
<
any
>
;
rightList
:
Array
<
any
>
;
topList
:
Array
<
any
>
=
[]
;
rightList
:
Array
<
any
>
=
[]
;
leftSelectedId
:
number
=
null
;
filterSelectedFlag
:
boolean
=
false
;
tagIds
:
Array
<
any
>
=
[];
productInfos
:
Array
<
any
>
;
productInfo
:
Plans
;
inquiry
:
User
;
rightIds
:
Array
<
any
>
=
[];
rightTagIds
:
Array
<
any
>
=
[];
topAndright
:
Array
<
any
>
=
[];
constructor
(
private
myService
:
MyService
,
public
lifeCommonService
:
LifeCommonService
,
private
router
:
Router
,
...
...
@@ -32,7 +35,7 @@ export class ProductComponent implements OnInit {
this
.
lifeCommonService
.
setTitle
(
'产品库'
);
this
.
tagViewQuery
(
305
);
this
.
tagViewQuery
(
309
);
this
.
tagViewQuery
(
306
);
}
//type:1表示左侧筛选2表示右侧筛选
...
...
@@ -48,6 +51,20 @@ export class ProductComponent implements OnInit {
this
.
queryProductBox
();
}
else
if
(
type
==
2
){
item
.
selected
=
!
item
.
selected
;
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
.
rightIds
.
push
(
this
.
rightList
[
i
][
'tagViewQueryInfos'
][
j
][
'id'
])
}
else
{
for
(
let
m
=
0
;
m
<
this
.
rightIds
.
length
;
m
++
){
if
(
this
.
rightIds
[
m
]
==
this
.
rightList
[
i
][
'tagViewQueryInfos'
][
j
][
'id'
]){
this
.
rightIds
.
splice
(
m
,
1
)
}
}
}
}
}
this
.
rightIds
=
Array
.
from
(
new
Set
(
this
.
rightIds
))
}
}
...
...
@@ -67,14 +84,31 @@ export class ProductComponent implements OnInit {
this
.
topList
=
res
[
'data'
][
'tagViewQueryInfos'
];
}
else
{
this
.
rightList
=
res
[
'data'
][
'tagViewQueryInfos'
];
if
(
this
.
rightIds
.
length
>
0
){
for
(
let
i
=
0
;
i
<
this
.
rightList
.
length
;
i
++
){
for
(
let
j
=
0
;
j
<
this
.
rightList
[
i
][
'tagViewQueryInfos'
].
length
;
j
++
){
for
(
let
m
=
0
;
m
<
this
.
rightIds
.
length
;
m
++
){
if
(
this
.
rightIds
[
m
]
==
this
.
rightList
[
i
][
'tagViewQueryInfos'
][
j
][
'id'
]){
this
.
rightList
[
i
][
'tagViewQueryInfos'
][
j
][
'selected'
]
=
true
;
}
}
}
}
}
}
this
.
topAndright
=
this
.
rightList
.
concat
(
this
.
topList
)
}
})
}
// 筛选
allFilter
()
{
allFilter
(
type
,
item
?:
any
)
{
this
.
filterSelectedFlag
=
true
;
if
(
type
==
1
){
this
.
tagViewQuery
(
306
);
}
else
{
this
.
rightList
=
[
item
];
}
}
// 进入产品资料页面
...
...
@@ -84,7 +118,20 @@ export class ProductComponent implements OnInit {
//根据标签查询产品
queryProductBox
(){
this
.
myService
.
queryProductBox
({
tagIds
:
this
.
tagIds
}).
subscribe
((
res
)
=>
{
this
.
rightTagIds
=
[];
if
(
this
.
rightIds
.
length
){
for
(
let
i
=
0
;
i
<
this
.
topAndright
.
length
;
i
++
){
for
(
let
j
=
0
;
j
<
this
.
topAndright
[
i
][
'tagViewQueryInfos'
].
length
;
j
++
){
for
(
let
m
=
0
;
m
<
this
.
rightIds
.
length
;
m
++
){
if
(
this
.
rightIds
[
m
]
==
this
.
topAndright
[
i
][
'tagViewQueryInfos'
][
j
][
'id'
]){
this
.
rightTagIds
.
push
(
this
.
topAndright
[
i
][
'tagViewQueryInfos'
][
j
][
'tagId'
])
}
}
}
}
}
let
tagIds
=
this
.
tagIds
.
concat
(
this
.
rightTagIds
)
this
.
myService
.
queryProductBox
({
tagIds
:
tagIds
}).
subscribe
((
res
)
=>
{
if
(
res
[
'success'
]){
this
.
productInfos
=
res
[
'data'
][
'productInfos'
];
//截取两个特色
...
...
@@ -110,19 +157,17 @@ export class ProductComponent implements OnInit {
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
;
for
(
let
m
=
0
;
m
<
this
.
rightIds
.
length
;
m
++
){
if
(
this
.
rightIds
[
m
]
==
this
.
rightList
[
i
][
'tagViewQueryInfos'
][
j
][
'id'
]){
this
.
rightIds
.
splice
(
m
,
1
)
}
}
}
}
}
//确定搜索
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
();
}
...
...
@@ -132,18 +177,22 @@ export class ProductComponent implements OnInit {
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
{
if
(
this
.
productInfo
.
isActive
==
4
){
this
.
router
.
navigate
([
'/productData'
,
product
.
productId
],{
queryParams
:{
planId
:
product
.
planId
}});
}
else
if
(
this
.
productInfo
.
isActive
!=
4
){
if
(
this
.
productInfo
.
noPlanProduct
===
true
)
{
window
.
location
.
href
=
`https://
${
window
.
location
.
host
}
/life/
${
this
.
productInfo
.
productId
}
`
this
.
router
.
navigate
([
'/pdetail'
,
this
.
productInfo
.
planId
]);
}
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
]);
}
}
}
}
...
...
@@ -153,4 +202,8 @@ export class ProductComponent implements OnInit {
this
.
productInfo
.
dayCount
=
this
.
lifeCommonService
.
yearDayCount
(
this
.
productInfo
.
dayCount
,
this
.
productInfo
.
insurerId
==
'5'
);
this
.
lifeCommonService
.
setInitDate
(
this
.
productInfo
.
dayCount
);
}
showAll
(
item
){
item
.
showAll
=
!
item
.
showAll
;
}
}
src/index.html
View file @
a9f2ea9b
...
...
@@ -122,7 +122,7 @@
}
else
{
initialize
();
}
getknowledgeQry
();
}
else
if
(
window
.
name
==
"isReload"
)
{
let
loading
=
document
.
getElementById
(
"adv"
);
loading
.
style
.
display
=
'none'
;
...
...
@@ -170,7 +170,7 @@
}
})
}
getknowledgeQry();
// (function() {
// if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
...
...
src/styles.scss
View file @
a9f2ea9b
...
...
@@ -279,4 +279,8 @@ footer.fixed{
font-size
:
22px
;
}
.rich_media_content
td
,
.rich_media_content
th
{
padding
:
5px
10px
!
important
;
border
:
1px
solid
#DDD
!
important
;
}
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