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
04b79b16
Commit
04b79b16
authored
Apr 22, 2020
by
Chao Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传生活照bug
parent
529fa0cb
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
550 additions
and
20 deletions
+550
-20
src/app/domain/settinginfo.ts
+12
-0
src/app/domain/wxconfig.ts
+7
-0
src/app/my/mk-material-detail/mk-material-detail.component.ts
+1
-1
src/app/my/my-center-home/my-center-home.component.html
+4
-4
src/app/my/my-center-home/my-center-home.component.scss
+6
-6
src/app/my/my-routing.module.ts
+7
-1
src/app/my/my-setting-detail/my-setting-detail.component.html
+55
-0
src/app/my/my-setting-detail/my-setting-detail.component.scss
+29
-0
src/app/my/my-setting-detail/my-setting-detail.component.spec.ts
+25
-0
src/app/my/my-setting-detail/my-setting-detail.component.ts
+206
-0
src/app/my/my-setting/my-setting.component.html
+35
-0
src/app/my/my-setting/my-setting.component.scss
+64
-0
src/app/my/my-setting/my-setting.component.spec.ts
+25
-0
src/app/my/my-setting/my-setting.component.ts
+29
-0
src/app/my/my.module.ts
+3
-1
src/app/my/my.service.ts
+23
-0
src/app/my/sales-rank/sales-rank.component.html
+2
-2
src/app/my/team-rank/team-rank.component.html
+5
-4
src/app/my/team-rank/team-rank.component.scss
+12
-1
No files found.
src/app/domain/settinginfo.ts
0 → 100644
View file @
04b79b16
export
class
SettingInfo
{
constructor
(
public
bioIntro
?:
any
,
public
headImgUrl
?:
any
,
public
lifeImgUrls
?:
any
,
public
practitionerId
?:
any
,
public
wxQRImgUrl
?:
any
,
public
isMobileShow
?:
any
,
public
isNameShow
?:
any
)
{
}
}
src/app/domain/wxconfig.ts
0 → 100644
View file @
04b79b16
export
class
WxConfig
{
appId
:
string
;
timestamp
:
string
;
nonceStr
:
string
;
signature
:
string
;
jsApiList
:
any
;
}
src/app/my/mk-material-detail/mk-material-detail.component.ts
View file @
04b79b16
...
@@ -3,7 +3,7 @@ import { ActivatedRoute } from '@angular/router';
...
@@ -3,7 +3,7 @@ import { ActivatedRoute } from '@angular/router';
import
{
environment
}
from
'../../../environments/environment'
;
import
{
environment
}
from
'../../../environments/environment'
;
import
{
LifeCommonService
}
from
'../../common/life-common.service'
;
import
{
LifeCommonService
}
from
'../../common/life-common.service'
;
import
{
MyService
}
from
'../my.service'
;
import
{
MyService
}
from
'../my.service'
;
import
{
Buffer
}
from
'buffer'
;
declare
var
QRCode
:
any
;
declare
var
QRCode
:
any
;
import
*
as
uuid
from
'uuid'
;
import
*
as
uuid
from
'uuid'
;
...
...
src/app/my/my-center-home/my-center-home.component.html
View file @
04b79b16
<div
class=
"weui-panel"
>
<div
class=
"weui-panel"
>
<div
class=
"weui-panel__hd header"
>
<div
class=
"weui-panel__hd header"
>
<!--头部经纪人信息START-->
<!--头部经纪人信息START-->
<div
class=
"avatar"
>
<div
class=
"avatar"
routerLink=
"setting"
>
<img
<img
src=
"{{lifeCustomerInfo?.practitionerBasicInfo?.headImagePath ? lifeCustomerInfo?.practitionerBasicInfo?.headImagePath : './assets/images/icons/meng.png'}}"
src=
"{{lifeCustomerInfo?.practitionerBasicInfo?.headImagePath ? lifeCustomerInfo?.practitionerBasicInfo?.headImagePath : './assets/images/icons/meng.png'}}"
alt=
"头像"
>
alt=
"头像"
>
...
@@ -47,9 +47,9 @@
...
@@ -47,9 +47,9 @@
<div>
<div>
<ul
class=
"performance_list title"
>
<ul
class=
"performance_list title"
>
<li></li>
<li></li>
<li>
FYP
<span
class=
"iconfont icon-xiangxia"
style=
"font-size: 10px;margin-left: 3px;"
<li>
保费
<span
class=
"iconfont icon-xiangxia"
style=
"font-size: 10px;margin-left: 3px;"
(
click
)="
selectRang
(
performanceSelectedFlag
,'
fyp
')"
></span></li>
(
click
)="
selectRang
(
performanceSelectedFlag
,'
fyp
')"
></span></li>
<li>
FYC
<span
class=
"iconfont icon-xiangxia"
style=
"font-size: 10px;margin-left: 3px;"
<li>
佣金
<span
class=
"iconfont icon-xiangxia"
style=
"font-size: 10px;margin-left: 3px;"
(
click
)="
selectRang
(
performanceSelectedFlag
,'
fyc
')"
></span></li>
(
click
)="
selectRang
(
performanceSelectedFlag
,'
fyc
')"
></span></li>
<li>
件数
<span
class=
"iconfont icon-xiangxia"
style=
"font-size: 10px;margin-left: 3px;"
<li>
件数
<span
class=
"iconfont icon-xiangxia"
style=
"font-size: 10px;margin-left: 3px;"
(
click
)="
selectRang
(
performanceSelectedFlag
,'
count
')"
></span></li>
(
click
)="
selectRang
(
performanceSelectedFlag
,'
count
')"
></span></li>
...
@@ -92,7 +92,7 @@
...
@@ -92,7 +92,7 @@
<div
class=
"content_item"
*
ngFor=
"let menuItemContent of menuItem['content']"
href=
"javascript:;"
<div
class=
"content_item"
*
ngFor=
"let menuItemContent of menuItem['content']"
href=
"javascript:;"
(
click
)="
menuNavigation
(
menuItemContent
)"
>
(
click
)="
menuNavigation
(
menuItemContent
)"
>
<span
class=
"iconfont"
[
ngClass
]="
menuItemContent
.
icon
"
></span>
<span
class=
"iconfont"
[
ngClass
]="
menuItemContent
.
icon
"
></span>
<div
style=
"font-size: 1
2
px;"
>
{{menuItemContent.subtitle}}
</div>
<div
style=
"font-size: 1
3
px;"
>
{{menuItemContent.subtitle}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/app/my/my-center-home/my-center-home.component.scss
View file @
04b79b16
...
@@ -99,7 +99,7 @@
...
@@ -99,7 +99,7 @@
border-radius
:
6px
;
border-radius
:
6px
;
// margin: 5px auto 8px auto;
// margin: 5px auto 8px auto;
margin
:
0
auto
8px
auto
;
margin
:
0
auto
8px
auto
;
box-shadow
:
0
0px
2
.5px
#
969696
;
box-shadow
:
0
0px
2
.5px
#
eceaea
;
position
:
relative
;
position
:
relative
;
// background: url('../../../assets/images/top_bg.png') no-repeat ;
// background: url('../../../assets/images/top_bg.png') no-repeat ;
background
:
url('../../../assets/images/bg_02.jpg')
no-repeat
;
background
:
url('../../../assets/images/bg_02.jpg')
no-repeat
;
...
@@ -213,14 +213,14 @@
...
@@ -213,14 +213,14 @@
flex-direction
:
column
;
flex-direction
:
column
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
background
:
#fff
;
background
:
#fff
;
box-shadow
:
0
0px
2
.5px
#969696
;
box-shadow
:
0
0px
2
.5px
#eceaea
;
border-radius
:
6px
;
border-radius
:
6px
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
padding
:
7px
0px
0px
10px
;
padding
:
7px
0px
0px
10px
;
h3
{
h3
{
font-weight
:
normal
;
font-size
:
16px
;
font-size
:
16px
;
margin-bottom
:
8
px
;
margin-bottom
:
10
px
;
}
}
.tool_content
{
.tool_content
{
display
:
flex
;
display
:
flex
;
...
@@ -246,7 +246,7 @@
...
@@ -246,7 +246,7 @@
.hotProduct
{
.hotProduct
{
margin
:
10px
auto
;
margin
:
10px
auto
;
background
:
#fff
;
background
:
#fff
;
box-shadow
:
0
0px
2
.5px
#
969696
;
box-shadow
:
0
0px
2
.5px
#
eceaea
;
border-radius
:
6px
;
border-radius
:
6px
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
padding
:
7px
10px
0px
10px
;
padding
:
7px
10px
0px
10px
;
...
@@ -326,7 +326,7 @@
...
@@ -326,7 +326,7 @@
.health_wrapper
{
.health_wrapper
{
background
:
#fff
;
background
:
#fff
;
box-shadow
:
0
0px
2
.5px
#
969696
;
box-shadow
:
0
0px
2
.5px
#
eceaea
;
border-radius
:
6px
;
border-radius
:
6px
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
padding
:
7px
10px
10px
10px
;
padding
:
7px
10px
10px
10px
;
...
...
src/app/my/my-routing.module.ts
View file @
04b79b16
...
@@ -15,6 +15,9 @@ import { TeamRankComponent } from './team-rank/team-rank.component';
...
@@ -15,6 +15,9 @@ import { TeamRankComponent } from './team-rank/team-rank.component';
import
{
RecruitingComponent
}
from
'./recruiting/recruiting.component'
;
import
{
RecruitingComponent
}
from
'./recruiting/recruiting.component'
;
import
{
RecruitingDetailComponent
}
from
'./recruiting-detail/recruiting-detail.component'
;
import
{
RecruitingDetailComponent
}
from
'./recruiting-detail/recruiting-detail.component'
;
import
{
ThanksComponent
}
from
'./thanks/thanks.component'
;
import
{
ThanksComponent
}
from
'./thanks/thanks.component'
;
import
{
MySettingComponent
}
from
'./my-setting/my-setting.component'
;
import
{
MySettingDetailComponent
}
from
'./my-setting-detail/my-setting-detail.component'
;
const
myRoutes
:
Routes
=
[
const
myRoutes
:
Routes
=
[
{
path
:
''
,
component
:
MyCenterHomeComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
''
,
component
:
MyCenterHomeComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'material'
,
component
:
MkMaterialComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'material'
,
component
:
MkMaterialComponent
,
canActivate
:
[
AuthGuard
]
},
...
@@ -30,7 +33,10 @@ const myRoutes: Routes = [
...
@@ -30,7 +33,10 @@ const myRoutes: Routes = [
{
path
:
'teamRank'
,
component
:
TeamRankComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'teamRank'
,
component
:
TeamRankComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'recruiting'
,
component
:
RecruitingComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'recruiting'
,
component
:
RecruitingComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'recruiting/:id'
,
component
:
RecruitingDetailComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'recruiting/:id'
,
component
:
RecruitingDetailComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'thanks'
,
component
:
ThanksComponent
,
canActivate
:
[
AuthGuard
]
}
{
path
:
'thanks'
,
component
:
ThanksComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'setting'
,
component
:
MySettingComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'setting/:uploadType'
,
component
:
MySettingDetailComponent
,
canActivate
:
[
AuthGuard
]
},
];
];
@
NgModule
({
@
NgModule
({
...
...
src/app/my/my-setting-detail/my-setting-detail.component.html
0 → 100644
View file @
04b79b16
<div
class=
"wrapper_pic"
>
<div
style=
"color:#ff3500;"
*
ngIf=
"this.uploadType =='headUrl'"
>
上传头像时图片比例必须1:1
</div>
<div
style=
"color:#ff3500;"
*
ngIf=
"this.uploadType =='wxUrl'"
>
上传微信二维码时图片比例必须1:1
</div>
<div
style=
"color:#ff3500;"
*
ngIf=
"this.uploadType =='lifeUrl'"
>
上传生活照时图片比例必须4:3
</div>
<div
class=
"headPic"
*
ngIf=
"this.uploadType =='headUrl'"
>
<div
class=
"pic"
>
<img
*
ngIf=
"settingInfo.headImgUrl"
src=
"{{settingInfo.headImgUrl}}"
/>
</div>
<div
*
ngIf=
"settingInfo.headImgUrl"
(
click
)="
chooseImg
('
headImgUrl
')"
>
点此重新选择头像
</div>
<div
*
ngIf=
"!settingInfo.headImgUrl"
(
click
)="
chooseImg
('
headImgUrl
')"
>
点此选择头像
</div>
</div>
<div
class=
"wxPic"
*
ngIf=
"this.uploadType =='wxUrl'"
>
<div
class=
"pic"
>
<img
*
ngIf=
"settingInfo.wxQRImgUrl"
src=
"{{settingInfo.wxQRImgUrl}}"
alt=
""
/>
</div>
<div
*
ngIf=
"settingInfo.wxQRImgUrl"
(
click
)="
chooseImg
('
wxQRImgUrl
')"
>
点此重新选择微信二维码
</div>
<div
*
ngIf=
"!settingInfo.wxQRImgUrl"
(
click
)="
chooseImg
('
wxQRImgUrl
')"
>
点此选择微信二维码
</div>
</div>
<div
class=
"lifePic"
*
ngIf=
"this.uploadType =='lifeUrl'"
>
<div
class=
"lifePicItem"
*
ngFor=
"let lifeImgUrlItem of settingInfo.lifeImgUrls"
>
<div
class=
"pic"
>
<img
src=
"{{lifeImgUrlItem.lifeImgUrl}}"
/>
</div>
<div
*
ngIf=
"lifeImgUrlItem.lifeImgUrl"
(
click
)="
chooseImg
('
lifeImgUrl
','
rechose
',
lifeImgUrlItem
.
id
)"
>
点此重新选择生活照
</div>
</div>
</div>
<div
*
ngIf=
"this.uploadType =='lifeUrl'"
(
click
)="
chooseImg
('
lifeImgUrl
')"
>
点此添加生活照
</div>
<div
class=
"saveBtn"
*
ngIf=
"uploadType=='lifeUrl' || uploadType=='wxUrl' || uploadType=='headUrl'"
(
click
)="
mySettingSave
()"
>
确定上传
</div>
<div
class=
"introduction"
*
ngIf=
"this.uploadType=='introduction'"
>
<div
style=
"height: 30px;font-size: 20px;margin-bottom: 20px;"
>
自我介绍
</div>
<textarea
class=
"form-control"
rows=
"10"
[(
ngModel
)]="
settingInfo
.
bioIntro
"
></textarea>
<div
class=
"saveBtn"
(
click
)="
mySettingSave
()"
>
保存
</div>
</div>
<div
class=
"switch"
*
ngIf=
"this.uploadType =='switch'"
>
<div>
<span>
显示手机号
</span>
<span
class=
"iconfont icon-ar-r"
></span>
</div>
<div>
<span>
显示手机号
</span>
<span
class=
"iconfont icon-ar-r"
></span>
</div>
</div>
</div>
<ydlife-alert
*
ngIf=
"isNeedAlert"
[
dialogInfo
]="
dialogInfo
"
(
popInfo
)="
getPopInfo
()"
></ydlife-alert>
<ydlife-toast
*
ngIf=
"toastDialog"
[
toastInfo
]="
toastInfo
"
></ydlife-toast>
\ No newline at end of file
src/app/my/my-setting-detail/my-setting-detail.component.scss
0 → 100644
View file @
04b79b16
.wrapper_pic
{
width
:
100%
;
padding
:
20px
5px
;
text-align
:
center
;
.pic
{
width
:
100%
;
margin
:
10px
auto
;
img
{
width
:
90%
;
margin
:
0
auto
;
max-width
:
90%
;
}
}
.lifePicItem
{
margin
:
8px
auto
;
}
.saveBtn
{
padding
:
8px
10px
;
background
:
#ff002a
;
color
:
#fff
;
width
:
50%
;
border-radius
:
10px
;
text-align
:
center
;
margin
:
20px
auto
;
}
}
\ No newline at end of file
src/app/my/my-setting-detail/my-setting-detail.component.spec.ts
0 → 100644
View file @
04b79b16
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
MySettingDetailComponent
}
from
'./my-setting-detail.component'
;
describe
(
'MySettingDetailComponent'
,
()
=>
{
let
component
:
MySettingDetailComponent
;
let
fixture
:
ComponentFixture
<
MySettingDetailComponent
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
MySettingDetailComponent
]
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
MySettingDetailComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/my/my-setting-detail/my-setting-detail.component.ts
0 → 100644
View file @
04b79b16
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
MyService
}
from
'../my.service'
;
import
{
ChangeDetectorRef
}
from
'@angular/core'
;
import
{
ActivatedRoute
}
from
'@angular/router'
;
import
{
SettingInfo
}
from
'../../domain/settinginfo'
;
import
{
promise
}
from
'protractor'
;
declare
const
wx
:
any
;
@
Component
({
selector
:
'ydlife-my-setting-detail'
,
templateUrl
:
'./my-setting-detail.component.html'
,
styleUrls
:
[
'./my-setting-detail.component.scss'
]
})
export
class
MySettingDetailComponent
implements
OnInit
{
settingInfo
:
SettingInfo
=
new
SettingInfo
();
serverId
:
any
;
thumbnailPath
:
any
;
isNeedAlert
:
boolean
;
dialogInfo
:
any
;
uploadType
:
any
;
//控制上传数量
uploadNumber
:
number
;
lifeUrlLen
:
number
;
//控制弹框
toastDialog
:
boolean
;
toastInfo
:
any
;
constructor
(
private
activateRoute
:
ActivatedRoute
,
private
myService
:
MyService
,
private
changeDetectorRef
:
ChangeDetectorRef
)
{
}
ngOnInit
()
{
this
.
uploadType
=
this
.
activateRoute
.
snapshot
.
paramMap
.
get
(
'uploadType'
);
this
.
mySettingQuery
();
}
//查询详情
mySettingQuery
()
{
const
practitionerId
=
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))[
'practitionerId'
];
this
.
myService
.
mySettingQuery
({
practitionerId
:
practitionerId
}).
subscribe
((
res
)
=>
{
if
(
res
[
'success'
])
{
this
.
settingInfo
=
res
[
'data'
];
}
})
}
// 上传图片
chooseImg
(
picType
,
rechose
?:
any
,
picId
?:
any
)
{
// 5.1 拍照、本地选图
const
t
=
this
;
wx
.
chooseImage
({
count
:
1
,
// 默认9
sizeType
:
[
'original'
,
'compressed'
],
// 可以指定是原图还是压缩图,默认二者都有
sourceType
:
[
'album'
,
'camera'
],
// 可以指定来源是相册还是相机,默认二者都有
success
:
function
(
res
)
{
this
.
localId
=
res
.
localIds
[
0
];
// 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
const
THIS
=
t
;
wx
.
uploadImage
({
localId
:
this
.
localId
,
// 需要上传的图片的本地ID,由chooseImage接口获得
isShowProgressTips
:
1
,
// 默认为1,显示进度提示
success
:
function
(
response
)
{
console
.
log
(
response
)
THIS
.
serverId
=
response
.
serverId
;
// 返回图片的服务器端ID
const
m
=
{
mediaId
:
response
.
serverId
};
THIS
.
myService
.
mediaGet
(
m
).
subscribe
(
async
e
=>
{
if
(
e
[
'success'
])
{
if
(
picType
==
'headImgUrl'
)
{
THIS
.
settingInfo
.
headImgUrl
=
e
[
'data'
][
'imgUrl'
];
}
if
(
picType
==
'wxQRImgUrl'
)
{
THIS
.
settingInfo
.
wxQRImgUrl
=
e
[
'data'
][
'imgUrl'
];
}
if
(
picType
==
'lifeImgUrl'
)
{
//rechose判断是重新上传
if
(
rechose
)
{
//传了生活照id就是通过接口删除否则就是自己删除
if
(
picId
)
{
THIS
.
myImgDelete
(
picId
);
}
else
{
}
}
else
{
THIS
.
settingInfo
.
lifeImgUrls
.
push
({
id
:
undefined
,
lifeImgUrl
:
e
[
'data'
][
'imgUrl'
],
selfAdd
:
THIS
.
settingInfo
.
lifeImgUrls
.
length
})
}
}
THIS
.
changeDetectorRef
.
markForCheck
();
THIS
.
changeDetectorRef
.
detectChanges
();
}
else
{
THIS
.
isNeedAlert
=
true
;
THIS
.
dialogInfo
=
{
title
:
null
,
content
:
{
value
:
e
[
'message'
],
align
:
'center'
},
footer
:
[{
value
:
'我知道了'
,
routerLink
:
''
,
className
:
'weui-dialog__btn_primary'
}],
};
}
});
}
});
}
});
}
// 关闭弹窗
getPopInfo
()
{
this
.
isNeedAlert
=
false
;
}
//删除生活照
myImgDelete
(
picId
)
{
if
(
picId
)
{
const
param
=
{
practitionerId
:
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))[
'practitionerId'
],
fileId
:
picId
}
// return new Promise((resolve, reject) => {
this
.
myService
.
myImgDelete
(
param
).
subscribe
((
res
)
=>
{
if
(
!
res
[
'success'
])
{
this
.
isNeedAlert
=
true
;
this
.
dialogInfo
=
{
title
:
null
,
content
:
{
value
:
res
[
'message'
],
align
:
'center'
},
footer
:
[{
value
:
'我知道了'
,
routerLink
:
''
,
className
:
'weui-dialog__btn_primary'
}],
};
}
else
{
// resolve(this.mySettingQuery())
this
.
mySettingQuery
()
}
})
// })
}
}
mySettingSave
()
{
let
param
;
if
(
this
.
uploadType
==
'headUrl'
)
{
param
=
{
settingSave
:
'img'
,
headImgUrl
:
this
.
settingInfo
.
headImgUrl
,
practitionerId
:
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))[
'practitionerId'
],
}
}
if
(
this
.
uploadType
==
'wxUrl'
)
{
param
=
{
settingSave
:
'img'
,
wxQRImgUrl
:
this
.
settingInfo
.
wxQRImgUrl
,
practitionerId
:
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))[
'practitionerId'
],
}
}
if
(
this
.
uploadType
==
'lifeUrl'
)
{
let
lifeImgUrlsParam
=
[];
for
(
let
i
=
0
;
i
<
this
.
settingInfo
.
lifeImgUrls
.
length
;
i
++
)
{
lifeImgUrlsParam
.
push
(
this
.
settingInfo
.
lifeImgUrls
[
i
][
'lifeImgUrl'
])
}
param
=
{
settingSave
:
'img'
,
lifeImgUrls
:
lifeImgUrlsParam
,
practitionerId
:
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))[
'practitionerId'
],
}
}
if
(
this
.
uploadType
==
'introduction'
)
{
param
=
{
settingSave
:
'intro'
,
practitionerId
:
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))[
'practitionerId'
],
bioIntro
:
this
.
settingInfo
.
bioIntro
}
}
if
(
this
.
uploadType
==
'switch'
)
{
param
=
{
settingSave
:
'isShow '
,
isNameShow
:
this
.
settingInfo
.
isNameShow
,
isMobileShow
:
this
.
settingInfo
.
isMobileShow
,
practitionerId
:
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))[
'practitionerId'
],
}
}
alert
(
JSON
.
stringify
(
param
))
this
.
myService
.
mySettingSave
(
param
).
subscribe
((
res
)
=>
{
if
(
res
[
'data'
])
{
this
.
toastDialog
=
true
;
this
.
toastInfo
=
{
status
:
1
,
msg
:
'保存成功'
,
timeout
:
3000
,
align
:
'center'
};
this
.
mySettingQuery
();
}
else
{
// this.isNeedAlert = true;
// this.dialogInfo = {
// title: null,
// content: { value: res['message'], align: 'center' },
// footer: [{ value: '我知道了', routerLink: '', className: 'weui-dialog__btn_primary' }],
// };
this
.
toastDialog
=
true
;
this
.
toastInfo
=
{
status
:
1
,
msg
:
res
[
'message'
],
timeout
:
3000
,
align
:
'center'
};
}
})
}
}
src/app/my/my-setting/my-setting.component.html
0 → 100644
View file @
04b79b16
<div
class=
"wrapper"
>
<div
class=
"item"
[
routerLink
]="['/
setting
','
headUrl
']"
>
<span>
头像
</span>
<div
class=
"content"
>
<img
style=
"border-radius: 50%;"
*
ngIf=
"settingInfo.headImgUrl"
src=
"{{settingInfo.headImgUrl}}"
>
<span
class=
"iconfont icon-ar-r"
></span>
</div>
</div>
<div
class=
"item"
[
routerLink
]="['/
setting
','
wxUrl
']"
>
<span>
微信二维码
</span>
<div
class=
"content"
>
<img
*
ngIf=
"settingInfo.wxQRImgUrl"
src=
"{{settingInfo.wxQRImgUrl}}"
>
<span
class=
"iconfont icon-ar-r"
></span>
</div>
</div>
<div
class=
"item"
[
routerLink
]="['/
setting
','
lifeUrl
']"
>
<span>
生活照
</span>
<div
class=
"content"
>
<span
class=
"iconfont icon-ar-r"
></span>
</div>
</div>
<div
class=
"item"
[
routerLink
]="['/
setting
','
introduction
']"
>
<span>
自我介绍
</span>
<div
class=
"content"
>
<span
class=
"iconfont icon-ar-r"
></span>
</div>
</div>
<div
class=
"item"
>
<span>
个性设置
</span>
<div
class=
"content"
>
<span
class=
"iconfont icon-ar-r"
[
routerLink
]="['/
setting
','
switch
']"
></span>
</div>
</div>
</div>
\ No newline at end of file
src/app/my/my-setting/my-setting.component.scss
0 → 100644
View file @
04b79b16
.wrapper
{
position
:
relative
;
width
:
100%
;
height
:
100%
;
padding
:
10px
5px
;
background
:
#efefef
;
.item
{
height
:
60px
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
padding
:
10px
;
width
:
95%
;
margin
:
10px
auto
;
background
:
#fff
;
box-shadow
:
0
0px
3
.5px
#eceaea
;
border-radius
:
6px
;
.switch
{
.iconfont
{
color
:
#ff002a
;
font-size
:
18px
;
}
}
img
{
width
:
35px
;
height
:
35px
;
margin-right
:
10px
;
}
}
.lifeList
{
display
:
flex
;
>
div
{
width
:
50%
;
background-color
:
#ddd
;
flex
:
1
;
border-right
:
3px
solid
#fff
;
img
{
display
:
block
;
max-width
:
100%
;
height
:
auto
;
}
}
>
div
:last-child
{
border
:
none
;
}
}
.toast_bg
{
position
:
absolute
;
left
:
0
;
top
:
0
;
right
:
0
;
bottom
:
0
;
margin
:
0
auto
;
background
:
rgba
(
0
,
0
,
0
,
0
.6
);
height
:
100%
;
text-align
:
center
;
img
{
width
:
80%
;
margin-top
:
45%
;
}
}
}
\ No newline at end of file
src/app/my/my-setting/my-setting.component.spec.ts
0 → 100644
View file @
04b79b16
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
MySettingComponent
}
from
'./my-setting.component'
;
describe
(
'MySettingComponent'
,
()
=>
{
let
component
:
MySettingComponent
;
let
fixture
:
ComponentFixture
<
MySettingComponent
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
MySettingComponent
]
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
MySettingComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/my/my-setting/my-setting.component.ts
0 → 100644
View file @
04b79b16
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
MyService
}
from
'../my.service'
;
import
{
SettingInfo
}
from
'../../domain/settinginfo'
;
@
Component
({
selector
:
'ydlife-my-setting'
,
templateUrl
:
'./my-setting.component.html'
,
styleUrls
:
[
'./my-setting.component.scss'
]
})
export
class
MySettingComponent
implements
OnInit
{
settingInfo
:
SettingInfo
=
new
SettingInfo
();
constructor
(
private
myService
:
MyService
)
{
}
ngOnInit
()
{
this
.
mySettingQuery
();
}
mySettingQuery
()
{
const
practitionerId
=
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))[
'practitionerId'
];
this
.
myService
.
mySettingQuery
({
practitionerId
:
practitionerId
}).
subscribe
((
res
)
=>
{
if
(
res
[
'success'
])
{
this
.
settingInfo
=
res
[
'data'
];
}
})
}
}
src/app/my/my.module.ts
View file @
04b79b16
...
@@ -19,10 +19,12 @@ import { TeamRankComponent } from './team-rank/team-rank.component';
...
@@ -19,10 +19,12 @@ import { TeamRankComponent } from './team-rank/team-rank.component';
import
{
RecruitingComponent
}
from
'./recruiting/recruiting.component'
;
import
{
RecruitingComponent
}
from
'./recruiting/recruiting.component'
;
import
{
RecruitingDetailComponent
}
from
'./recruiting-detail/recruiting-detail.component'
;
import
{
RecruitingDetailComponent
}
from
'./recruiting-detail/recruiting-detail.component'
;
import
{
ThanksComponent
}
from
'./thanks/thanks.component'
;
import
{
ThanksComponent
}
from
'./thanks/thanks.component'
;
import
{
MySettingComponent
}
from
'./my-setting/my-setting.component'
;
import
{
MySettingDetailComponent
}
from
'./my-setting-detail/my-setting-detail.component'
;
@
NgModule
({
@
NgModule
({
declarations
:
[
MyCenterHomeComponent
,
MkMaterialComponent
,
MkMaterialDetailComponent
,
FileUploadComponent
,
ImportantAnnouncementComponent
,
SalesDetailComponent
,
AnnouncementDetailComponent
,
MyBusinessComponent
,
MyBusinessDetailComponent
,
PickerComponent
,
ToastComponent
,
SalesRankComponent
,
TeamRankComponent
,
RecruitingComponent
,
RecruitingDetailComponent
,
ThanksComponent
],
declarations
:
[
MyCenterHomeComponent
,
MkMaterialComponent
,
MkMaterialDetailComponent
,
FileUploadComponent
,
ImportantAnnouncementComponent
,
SalesDetailComponent
,
AnnouncementDetailComponent
,
MyBusinessComponent
,
MyBusinessDetailComponent
,
PickerComponent
,
ToastComponent
,
SalesRankComponent
,
TeamRankComponent
,
RecruitingComponent
,
RecruitingDetailComponent
,
ThanksComponent
,
MySettingComponent
,
MySettingDetailComponent
],
imports
:
[
imports
:
[
CommonModule
,
CommonModule
,
LifeCommonModule
,
LifeCommonModule
,
...
...
src/app/my/my.service.ts
View file @
04b79b16
...
@@ -140,4 +140,27 @@ export class MyService {
...
@@ -140,4 +140,27 @@ export class MyService {
.
post
(
url
,
JSON
.
stringify
(
practitionerId
));
.
post
(
url
,
JSON
.
stringify
(
practitionerId
));
}
}
//下载多媒体文件接口
mediaGet
(
mediaId
)
{
const
url
=
this
.
API
+
'/mediaGet'
;
return
this
.
http
.
post
(
url
,
JSON
.
stringify
(
mediaId
));
}
//设置查询
mySettingQuery
(
practitionerId
)
{
const
url
=
this
.
API
+
'/practitioner/mySettingQuery'
;
return
this
.
http
.
post
(
url
,
JSON
.
stringify
(
practitionerId
));
}
//我的设置保存
mySettingSave
(
param
)
{
const
url
=
this
.
API
+
'/practitioner/mySettingSave'
;
return
this
.
http
.
post
(
url
,
JSON
.
stringify
(
param
));
}
//删除生活照
myImgDelete
(
param
)
{
const
url
=
this
.
API
+
'/practitioner/myImgDelete'
;
return
this
.
http
.
post
(
url
,
JSON
.
stringify
(
param
));
}
}
}
src/app/my/sales-rank/sales-rank.component.html
View file @
04b79b16
...
@@ -28,8 +28,8 @@
...
@@ -28,8 +28,8 @@
<li>
排名
</li>
<li>
排名
</li>
<li>
姓名
</li>
<li>
姓名
</li>
<li>
团队
</li>
<li>
团队
</li>
<li
*
ngIf=
"rankType=='fyp'"
>
FYP
</li>
<li
*
ngIf=
"rankType=='fyp'"
>
保费
</li>
<li
*
ngIf=
"rankType=='fyc'"
>
FYC
</li>
<li
*
ngIf=
"rankType=='fyc'"
>
佣金
</li>
<li
*
ngIf=
"rankType=='count'"
>
件数
</li>
<li
*
ngIf=
"rankType=='count'"
>
件数
</li>
</ul>
</ul>
<div
style=
"width: 100%;text-align: center;float: left;"
*
ngIf=
"performanceListShow?.length <=0"
>
暂无数据
</div>
<div
style=
"width: 100%;text-align: center;float: left;"
*
ngIf=
"performanceListShow?.length <=0"
>
暂无数据
</div>
...
...
src/app/my/team-rank/team-rank.component.html
View file @
04b79b16
...
@@ -4,9 +4,9 @@
...
@@ -4,9 +4,9 @@
{{subordinateSystemName}}战队
{{subordinateSystemName}}战队
</div>
</div>
<div
class=
"totalSales"
>
<div
class=
"totalSales"
>
<div><span>
FYP:
</span><span>
{{statisticInfo?.fyp | number: "1.2-2"}}
</span
></div>
<div><span>
{{statisticInfo?.fyp | number: "1.2-2"}}
</span><i
class=
"text"
>
保费
</i
></div>
<div><span>
FYC:
</span><span>
{{statisticInfo?.fyc | number: "1.2-2"}}
</span
></div>
<div><span>
{{statisticInfo?.fyc | number: "1.2-2"}}
</span><i
class=
"text"
>
佣金
</i
></div>
<div><span>
件数:
</span><span>
{{statisticInfo?.count | number: "1.2-2"}}
</span
></div>
<div><span>
{{statisticInfo?.count | number: "1.2-2"}}
</span><i
class=
"text"
>
件数
</i
></div>
</div>
</div>
</div>
</div>
<div
class=
"rankInfoWrapper"
>
<div
class=
"rankInfoWrapper"
>
...
@@ -19,7 +19,8 @@
...
@@ -19,7 +19,8 @@
</ul>
</ul>
<!-- <ul class="tab">
<!-- <ul class="tab">
<li *ngFor="let listItem of list" (click)="subordinateSystemMemberQuery(time, listItem.type)"
<li *ngFor="let listItem of list" (click)="subordinateSystemMemberQuery(time, listItem.type)"
[ngClass]="{selected:lineType==listItem.type}">
[ngClass]="{selected:lineType==lis
tItem.type}">
{{listItem.name}}
{{listItem.name}}
</li>
</li>
</ul> -->
</ul> -->
...
...
src/app/my/team-rank/team-rank.component.scss
View file @
04b79b16
...
@@ -35,7 +35,18 @@
...
@@ -35,7 +35,18 @@
div
.totalSales
{
div
.totalSales
{
font-size
:
16px
;
font-size
:
16px
;
font-weight
:
bold
;
font-weight
:
bold
;
div
{
span
{
font-size
:
18px
;
margin-right
:
5px
;
}
i
.text
{
font-size
:
10px
;
font-style
:
normal
;
margin-top
:
2px
;
}
}
}
}
}
}
.rankInfoWrapper
{
.rankInfoWrapper
{
...
...
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