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
3509b8f2
Commit
3509b8f2
authored
May 08, 2020
by
Chao Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增员海报&登录接口openId&季度业绩
parent
dc4c40c0
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
74 additions
and
39 deletions
+74
-39
src/app/auth/login/login.component.ts
+26
-16
src/app/my/mk-material/mk-material.component.html
+6
-4
src/app/my/mk-material/mk-material.component.ts
+12
-4
src/app/my/my-center-home/my-center-home.component.ts
+13
-7
src/app/my/sales-rank/sales-rank.component.html
+12
-5
src/app/my/sales-rank/sales-rank.component.scss
+3
-2
src/app/my/sales-rank/sales-rank.component.ts
+2
-1
No files found.
src/app/auth/login/login.component.ts
View file @
3509b8f2
...
...
@@ -52,24 +52,34 @@ export class LoginComponent implements OnInit, OnDestroy {
const
lifeCustomerInfo
=
{
...
response
.
data
,
mobileNo
:
this
.
userInfo
.
mobileNo
,
commonResult
:
null
};
if
(
lifeCustomerInfo
[
'customerId'
]
&&
lifeCustomerInfo
[
'practitionerId'
])
{
localStorage
.
setItem
(
'lifeCustomerInfo'
,
JSON
.
stringify
(
lifeCustomerInfo
));
if
(
response
[
'data'
][
'loginTimes'
]
>
0
)
{
this
.
redirect
=
this
.
authService
.
redirectUrl
?
this
.
router
.
parseUrl
(
this
.
authService
.
redirectUrl
)
:
'/my'
;
this
.
router
.
navigateByUrl
(
this
.
redirect
);
// if (response['data']['getOpenIdUrl']) {
// window.location.href = response['data']['getOpenIdUrl'];
// } else {
// this.redirect = this.authService.redirectUrl ? this.router.parseUrl(this.authService.redirectUrl) : '/my';
// this.router.navigateByUrl(this.redirect);
// }
//如果有openId跳页由后端判断,没有的话根据登录次数前端判断跳页
if
(
response
[
'data'
][
'getOpenIdUrl'
])
{
window
.
location
.
href
=
response
[
'data'
][
'getOpenIdUrl'
];
}
else
{
this
.
router
.
navigateByUrl
(
'/thanks'
)
// if (response['data']['getOpenIdUrl']) {
// window.location.href = response['data']['getOpenIdUrl'];
// } else {
// this.router.navigateByUrl('/thanks')
// }
if
(
response
[
'data'
][
'loginTimes'
]
>
0
)
{
this
.
redirect
=
this
.
authService
.
redirectUrl
?
this
.
router
.
parseUrl
(
this
.
authService
.
redirectUrl
)
:
'/my'
;
}
else
{
this
.
redirect
=
this
.
authService
.
redirectUrl
?
this
.
router
.
parseUrl
(
this
.
authService
.
redirectUrl
)
:
'/thanks'
;
}
this
.
router
.
navigateByUrl
(
this
.
redirect
);
}
// if (response['data']['loginTimes'] > 0) {
// this.redirect = this.authService.redirectUrl ? this.router.parseUrl(this.authService.redirectUrl) : '/my';
// this.router.navigateByUrl(this.redirect);
// // if (response['data']['getOpenIdUrl']) {
// // window.location.href = response['data']['getOpenIdUrl'];
// // } else {
// // this.redirect = this.authService.redirectUrl ? this.router.parseUrl(this.authService.redirectUrl) : '/my';
// // this.router.navigateByUrl(this.redirect);
// // }
// } else {
// this.router.navigateByUrl('/thanks')
// // if (response['data']['getOpenIdUrl']) {
// // window.location.href = response['data']['getOpenIdUrl'];
// // } else {
// // this.router.navigateByUrl('/thanks')
// // }
// }
}
else
{
this
.
openPopInfo
(
'暂无查询资格'
);
}
...
...
src/app/my/mk-material/mk-material.component.html
View file @
3509b8f2
<div
class=
'nav'
>
<ul
class=
"left"
>
<li
*
ngFor=
"let categoryItem of categoryList"
(
click
)="
switchCategory
(
categoryItem
.
id
)"
[
ngClass
]="{'
actived
'
:selectedCategoryId=
==categoryItem.id}"
>
{{categoryItem.dropOptionName}}
</li>
<ng-container>
<li
*
ngFor=
"let categoryItem of categoryList"
(
click
)="
switchCategory
(
categoryItem
.
id
)"
[
ngClass
]="{'
actived
'
:selectedCategoryId=
==categoryItem.id}"
>
{{categoryItem.dropOptionName}}
</li>
</ng-container>
</ul>
</div>
...
...
src/app/my/mk-material/mk-material.component.ts
View file @
3509b8f2
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Router
}
from
"@angular/router"
;
import
{
MyService
}
from
"../my.service"
;
import
{
ActivatedRoute
}
from
"@angular/router"
;
@
Component
({
selector
:
'ydlife-mk-material'
,
templateUrl
:
'./mk-material.component.html'
,
...
...
@@ -11,11 +11,12 @@ export class MkMaterialComponent implements OnInit {
posterInfos
:
Array
<
any
>
;
categoryList
:
Array
<
any
>
;
selectedCategoryId
:
number
;
constructor
(
private
router
:
Router
,
private
myService
:
MyService
)
{
recruit
:
any
;
constructor
(
private
activatedRoute
:
ActivatedRoute
,
private
router
:
Router
,
private
myService
:
MyService
)
{
}
ngOnInit
()
{
this
.
recruit
=
this
.
activatedRoute
.
snapshot
.
queryParams
.
recruit
?
this
.
activatedRoute
.
snapshot
.
queryParams
.
recruit
:
null
;
this
.
dropOptionsQuery
();
}
...
...
@@ -38,7 +39,14 @@ export class MkMaterialComponent implements OnInit {
if
(
res
[
'success'
])
{
this
.
categoryList
=
res
[
'data'
][
'dropMasterInfoList'
][
0
][
'dropOptionsInfoList'
];
if
(
this
.
categoryList
.
length
>
0
)
{
this
.
selectedCategoryId
=
this
.
categoryList
[
0
].
id
;
if
(
this
.
recruit
==
'recruit'
)
{
this
.
selectedCategoryId
=
78
;
this
.
categoryList
=
this
.
categoryList
.
filter
((
item
)
=>
{
return
item
.
id
==
78
;
})
}
else
{
this
.
selectedCategoryId
=
this
.
categoryList
[
0
].
id
;
}
this
.
posterQuery
();
}
}
else
{
...
...
src/app/my/my-center-home/my-center-home.component.ts
View file @
3509b8f2
...
...
@@ -66,9 +66,9 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
title
:
'我的团队'
,
content
:
[
{
no
:
15
,
subtitle
:
'我的团队'
,
icon
:
'icon-tuandui'
,
path
:
''
,
routerLink
:
'teamRank'
},
//
{ no: 16, subtitle: '团队增员', icon: 'icon-tuanduiguanlisvg', path: '', routerLink: '' },
{
no
:
16
,
subtitle
:
'团队增员'
,
icon
:
'icon-tuanduiguanlisvg'
,
path
:
''
,
routerLink
:
'recruiting'
},
{
no
:
''
,
subtitle
:
''
,
icon
:
'
'
,
path
:
''
,
routerLink
:
''
},
{
no
:
16
,
subtitle
:
'团队增员'
,
icon
:
'icon-tuanduiguanlisvg'
,
path
:
''
,
routerLink
:
''
},
//
{ no: 16, subtitle: '团队增员', icon: 'icon-tuanduiguanlisvg', path: '', routerLink: 'recruiting' },
{
no
:
18
,
subtitle
:
'招募海报'
,
icon
:
'icon-haibao-1
'
,
path
:
''
,
routerLink
:
''
},
{
no
:
''
,
subtitle
:
''
,
icon
:
''
,
path
:
''
,
routerLink
:
''
}
],
isShow
:
this
.
isShow
...
...
@@ -97,8 +97,10 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
},
300
)
this
.
performanceList
=
[
{
type
:
'month'
,
name
:
'本月'
,
time
:
1
},
{
type
:
'year'
,
name
:
'本年度'
,
time
:
2
}
{
name
:
'本月'
,
time
:
1
},
{
name
:
'季度'
,
time
:
3
},
{
name
:
'本年度'
,
time
:
2
}
]
//初始化调本月线上 保费+ 本月线下保费
...
...
@@ -130,6 +132,8 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
this
.
router
.
navigate
([
'/salesDetail'
],
{
queryParams
:
{
searchType
:
this
.
performanceSelectedFlag
,
showType
:
'sales'
}
});
}
else
if
(
!
item
.
subtitle
)
{
return
;
}
else
if
(
item
.
no
===
18
)
{
this
.
router
.
navigate
([
'/material'
],
{
queryParams
:
{
recruit
:
'recruit'
}
});
}
else
{
this
.
isNeedAlert
=
true
;
this
.
dialogInfo
=
{
...
...
@@ -171,7 +175,7 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
}
/**
* time 1-month,2-year
* time 1-month,2-year
,3-季度
* type 1-保费,2-佣金 3-件数
* platform //1-online,2-offline
*/
...
...
@@ -185,8 +189,10 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
}
if
(
time
==
1
)
{
this
.
leftWidth
=
'15%'
;
}
else
{
}
else
if
(
time
==
2
)
{
this
.
leftWidth
=
'30%'
;
}
else
{
this
.
leftWidth
=
'17%'
;
}
this
.
myService
.
rank
(
param
).
subscribe
((
res
)
=>
{
if
(
res
[
'success'
])
{
...
...
src/app/my/sales-rank/sales-rank.component.html
View file @
3509b8f2
...
...
@@ -16,21 +16,28 @@
{{listItem.name}}
</li>
</ul>
<ul
class=
"tab"
>
<
!-- <
ul class="tab">
<li *ngFor="let searchListItem of searchList" (click)="rank(timeType,isOnlineType,searchListItem.type)"
[ngClass]="{selected:searchType==searchListItem.type}">
{{searchListItem.name}}
</li>
</ul>
</ul>
-->
</div>
<div
class=
"rankContent"
>
<ul>
<li>
排名
</li>
<li>
姓名
</li>
<li>
团队
</li>
<li
*
ngIf=
"searchType=='1'"
style=
"color: #333;font-weight: normal;"
>
首年保费
</li>
<li
*
ngIf=
"searchType=='2'"
style=
"color: #333;font-weight: normal;"
>
首年佣金
</li>
<li
*
ngIf=
"searchType=='3'"
style=
"color: #333;font-weight: normal;margin-right: 0;"
>
件数
</li>
<li
*
ngIf=
"searchType=='1'"
style=
"color: #333;font-weight: normal;"
(
click
)="
rank
(
timeType
,
isOnlineType
,
2
)"
>
首年保费
<span
class=
"iconfont icon-xiangxia"
></span>
</li>
<li
*
ngIf=
"searchType=='2'"
style=
"color: #333;font-weight: normal;"
(
click
)="
rank
(
timeType
,
isOnlineType
,
3
)"
>
首年佣金
<span
class=
"iconfont icon-xiangxia"
></span>
</li>
<li
*
ngIf=
"searchType=='3'"
style=
"color: #333;font-weight: normal;margin-right: 0;"
(
click
)="
rank
(
timeType
,
isOnlineType
,
1
)"
>
件数
<span
class=
"iconfont icon-xiangxia"
></span>
</li>
</ul>
<div
style=
"width: 100%;text-align: center;float: left;"
*
ngIf=
"rankList?.length <=0"
>
暂无数据
</div>
<ul
*
ngFor=
"let rankItem of rankList;index as i;"
>
...
...
src/app/my/sales-rank/sales-rank.component.scss
View file @
3509b8f2
...
...
@@ -13,8 +13,9 @@
padding
:
10px
0
;
ul
.tab
{
float
:
left
;
width
:
21%
;
margin-right
:
1%
;
// width: 21%;
width
:
30%
;
margin-right
:
5%
;
li
{
float
:
left
;
margin-right
:
5px
;
...
...
src/app/my/sales-rank/sales-rank.component.ts
View file @
3509b8f2
...
...
@@ -19,6 +19,7 @@ export class SalesRankComponent implements OnInit {
constructor
(
private
activatedRoute
:
ActivatedRoute
,
private
myService
:
MyService
)
{
this
.
performanceList
=
[
{
type
:
1
,
name
:
'本月'
},
{
type
:
3
,
name
:
'季度'
},
{
type
:
2
,
name
:
'本年'
}
]
this
.
typelist
=
[
...
...
@@ -39,7 +40,7 @@ export class SalesRankComponent implements OnInit {
}
/**
* time 1-month,2-year
* time 1-month,2-year
,3-季度
* type 1-fyc,2-fyp 3-件数
* platform //1-online,2-offline
*/
...
...
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