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
1446374f
Commit
1446374f
authored
Mar 05, 2020
by
Chao Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
海报详情跳转bug修复
parent
5af53ab5
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
270 additions
and
183 deletions
+270
-183
src/app/app.component.html
+2
-0
src/app/app.component.ts
+45
-4
src/app/auth/auth.guard.ts
+3
-4
src/app/auth/auth.service.ts
+15
-10
src/app/common/alert/alert.component.html
+7
-5
src/app/my/announcement-detail/announcement-detail.component.html
+2
-1
src/app/my/file-upload/file-upload.component.html
+8
-6
src/app/my/file-upload/file-upload.component.scss
+32
-39
src/app/my/file-upload/file-upload.component.ts
+22
-22
src/app/my/important-announcement/important-announcement.component.html
+8
-6
src/app/my/important-announcement/important-announcement.component.scss
+33
-20
src/app/my/mk-material-detail/mk-material-detail.component.ts
+21
-14
src/app/my/mk-material/mk-material.component.html
+11
-7
src/app/my/mk-material/mk-material.component.scss
+32
-20
src/app/my/mk-material/mk-material.component.ts
+15
-15
src/app/my/my-center-home/my-center-home.component.scss
+2
-2
src/app/my/my-center-home/my-center-home.component.ts
+10
-7
src/app/my/sales-detail/sales-detail.component.html
+1
-1
src/assets/images/online.jpg
+0
-0
src/assets/images/online_chat.jpg
+0
-0
src/styles.scss
+1
-0
No files found.
src/app/app.component.html
View file @
1446374f
<!--The content below is only a placeholder and can be replaced.-->
<router-outlet></router-outlet>
<ydlife-guide-page
*
ngIf=
"shareGuidePageEnable"
></ydlife-guide-page>
<ydlife-alert
*
ngIf=
"isNeedAlert"
[
dialogInfo
]="
dialogInfo
"
(
popInfo
)="
getPopInfo
()"
></ydlife-alert>
\ No newline at end of file
src/app/app.component.ts
View file @
1446374f
import
{
Component
,
OnDestroy
,
OnInit
}
from
'@angular/core'
;
import
{
AuthService
}
from
"./auth/auth.service"
;
import
{
LifeCommonService
}
from
"./common/life-common.service"
;
import
{
Subscription
}
from
"rxjs/index"
;
import
{
Component
,
OnDestroy
,
OnInit
}
from
'@angular/core'
;
import
{
AuthService
}
from
"./auth/auth.service"
;
import
{
LifeCommonService
}
from
"./common/life-common.service"
;
import
{
Subscription
}
from
"rxjs/index"
;
declare
var
wx
:
any
;
@
Component
({
selector
:
'app-root'
,
...
...
@@ -11,6 +11,9 @@ declare var wx: any;
export
class
AppComponent
implements
OnInit
,
OnDestroy
{
shareGuidePageEnable
:
boolean
;
subscription
:
Subscription
;
currentVersion
:
any
;
isNeedAlert
:
boolean
;
dialogInfo
:
any
;
constructor
(
private
authService
:
AuthService
,
private
lifeCommonService
:
LifeCommonService
)
{
this
.
subscription
=
lifeCommonService
.
shareStatus$
.
subscribe
(
status
=>
{
...
...
@@ -25,6 +28,8 @@ export class AppComponent implements OnInit, OnDestroy {
this
.
getWxConfig
();
}
});
this
.
getVersion
();
}
ngOnDestroy
()
{
...
...
@@ -48,4 +53,40 @@ export class AppComponent implements OnInit, OnDestroy {
});
}
// 关闭弹窗
getPopInfo
()
{
this
.
isNeedAlert
=
false
;
let
{
search
,
href
}
=
window
.
location
;
href
=
href
.
replace
(
/&
?
t_reload=
(\d
+
)
/g
,
''
);
window
.
location
.
href
=
href
+
(
search
?
'&'
:
'?'
)
+
't_reload='
+
new
Date
().
getTime
();
localStorage
.
setItem
(
'Version'
,
this
.
currentVersion
)
}
getVersion
()
{
this
.
authService
.
currentVersionQuery
().
subscribe
((
res
)
=>
{
if
(
res
[
'data'
][
'currentVersion'
])
{
this
.
currentVersion
=
res
[
'data'
][
'currentVersion'
];
}
//如果本地没有版本号刷新并设置缓存
if
(
!
localStorage
.
getItem
(
'Version'
))
{
this
.
isNeedAlert
=
true
;
this
.
dialogInfo
=
{
title
:
null
,
content
:
{
value
:
'检测到新版本'
,
align
:
'center'
},
footer
:
[{
value
:
'更新'
,
routerLink
:
''
,
className
:
'weui-dialog__btn_primary'
}],
};
}
else
{
const
Version
=
localStorage
.
getItem
(
'Version'
);
//如果缓存有版本号对比本地和接口版本
if
(
Version
!=
this
.
currentVersion
)
{
this
.
isNeedAlert
=
true
;
this
.
dialogInfo
=
{
title
:
null
,
content
:
{
value
:
'检测到新版本'
,
align
:
'center'
},
footer
:
[{
value
:
'更新'
,
routerLink
:
''
,
className
:
'weui-dialog__btn_primary'
}],
};
}
}
})
}
}
src/app/auth/auth.guard.ts
View file @
1446374f
import
{
Injectable
}
from
'@angular/core'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
CanActivate
,
Router
,
ActivatedRouteSnapshot
,
...
...
@@ -7,7 +7,7 @@ import {
NavigationExtras
,
CanLoad
,
Route
}
from
'@angular/router'
;
import
{
AuthService
}
from
'./auth.service'
;
import
{
AuthService
}
from
'./auth.service'
;
@
Injectable
({
providedIn
:
'root'
,
...
...
@@ -18,7 +18,6 @@ export class AuthGuard implements CanActivate, CanActivateChild, CanLoad {
canActivate
(
route
:
ActivatedRouteSnapshot
,
state
:
RouterStateSnapshot
):
boolean
{
let
url
:
string
=
state
.
url
;
return
this
.
checkLogin
(
url
);
}
...
...
@@ -28,7 +27,6 @@ export class AuthGuard implements CanActivate, CanActivateChild, CanLoad {
canLoad
(
route
:
Route
):
boolean
{
let
url
=
`/
${
route
.
path
}
`
;
return
this
.
checkLogin
(
url
);
}
...
...
@@ -43,4 +41,5 @@ export class AuthGuard implements CanActivate, CanActivateChild, CanLoad {
this
.
router
.
navigate
([
'/login'
]);
return
false
;
}
}
src/app/auth/auth.service.ts
View file @
1446374f
import
{
Injectable
}
from
'@angular/core'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
Observable
,
of
,
throwError
}
from
'rxjs'
;
import
{
environment
}
from
'../../environments/environment'
;
import
{
HttpClient
,
HttpErrorResponse
}
from
'@angular/common/http'
;
import
{
catchError
}
from
'rxjs/internal/operators'
;
import
{
Observable
,
of
,
throwError
}
from
'rxjs'
;
import
{
environment
}
from
'../../environments/environment'
;
import
{
HttpClient
,
HttpErrorResponse
}
from
'@angular/common/http'
;
import
{
catchError
}
from
'rxjs/internal/operators'
;
@
Injectable
({
providedIn
:
'root'
,
...
...
@@ -14,22 +14,22 @@ export class AuthService {
private
API
=
environment
.
BACKEND_URL_CONFIG_VALUE
;
isLoggedIn
=
false
;
// store the URL so we can redirect after logging in
// store the URL so we can redirect after logging in
redirectUrl
:
string
;
// 经纪人登陆
// 经纪人登陆
login
(
loginInfo
):
Observable
<
any
>
{
const
api
=
this
.
API
+
'/practitioner/practitionerLogin'
;
return
this
.
http
.
post
(
api
,
JSON
.
stringify
(
loginInfo
));
}
// 发送验证码
// 发送验证码
verificationCode
(
verticalCode
)
{
const
url
=
this
.
API
+
'/verificationCode'
;
return
this
.
http
.
post
(
url
,
JSON
.
stringify
(
verticalCode
));
}
// 校验验证码
// 校验验证码
compare
(
compareCode
)
{
const
url
=
this
.
API
+
'/checkVerificationCode'
;
return
this
.
http
...
...
@@ -58,7 +58,7 @@ export class AuthService {
return
this
.
http
.
post
(
url
,
JSON
.
stringify
(
postUrl
));
}
// 获取错误详情
// 获取错误详情
private
handleError
(
error
:
HttpErrorResponse
)
{
if
(
error
.
error
instanceof
ErrorEvent
)
{
console
.
error
(
'An error occurred:'
,
error
.
error
.
message
);
...
...
@@ -70,4 +70,9 @@ export class AuthService {
return
throwError
(
'Something bad happened; please try again later.'
);
}
currentVersionQuery
()
{
const
url
=
this
.
API
+
'/metadata/currentVersionQuery'
;
return
this
.
http
.
get
(
url
);
}
}
src/app/common/alert/alert.component.html
View file @
1446374f
...
...
@@ -2,16 +2,17 @@
<!--BEGIN dialog1-->
<div
class=
"js_dialog"
id=
"iosDialog1"
>
<div
class=
"weui-mask"
></div>
<div
class=
"weui-dialog"
>
<div
class=
"weui-dialog"
style=
"width: 70%;"
>
<div
class=
"weui-dialog__hd"
*
ngIf=
"dialogInfo.title"
><strong
class=
"weui-dialog__title"
>
{{dialogInfo.title}}
</strong></div>
class=
"weui-dialog__title"
>
{{dialogInfo.title}}
</strong></div>
<div
class=
"weui-dialog__bd"
[
ngStyle
]="{'
text-align
'
:dialogInfo
.
content
.
align
}"
>
{{dialogInfo.content.value}}
</div>
<div
class=
"weui-dialog__ft"
>
<div
class=
"weui-dialog__ft"
style=
"line-height: normal;min-height: auto;width: 30%;margin: 0 auto 10px auto;"
>
<a
href=
"javascript:;"
class=
"weui-dialog__btn"
[
ngClass
]="
footer
.
className
"
*
ngFor=
"let footer of dialogInfo.footer"
(
click
)="
sendInfo
()"
>
{{footer.value}}
</a>
style=
"width: 75%;background: red;color: #fff;border-radius: 10px;padding:5px 10px;font-weight: normal;"
*
ngFor=
"let footer of dialogInfo.footer"
(
click
)="
sendInfo
()"
>
{{footer.value}}
</a>
</div>
</div>
</div>
<!--END dialog1-->
</div>
</div>
\ No newline at end of file
src/app/my/announcement-detail/announcement-detail.component.html
View file @
1446374f
...
...
@@ -13,6 +13,6 @@
class=
"announcement_type"
>
【{{announcementLists?.announcementTypeName}}】
</span><span
[
innerHtml
]="
announcementLists
?.
title
|
safeHtml
"
></span></div>
<div
[
innerHtml
]="
announcementLists
?.
content
|
safeHtml
"
class=
"announcement_content"
></div>
<
div
class=
"announcement_at"
>
上海银盾保险经纪有限公司
{{announcementLists?.announcementAt}}
</div
>
<
!-- <div class="announcement_at">上海银盾保险经纪有限公司 {{announcementLists?.announcementAt}}</div> --
>
</div>
</div>
\ No newline at end of file
src/app/my/file-upload/file-upload.component.html
View file @
1446374f
<div
class=
"fileUploadLists"
>
<ul
class=
"left"
>
<li
*
ngFor=
"let categoryItem of categoryList"
(
click
)="
switchCategory
(
categoryItem
.
dropOptionOrder
)"
[
ngClass
]="{'
actived
'
:selectedCategoryId=
==categoryItem.dropOptionOrder}"
>
{{categoryItem.dropOptionName}}
</li>
</ul>
<div
class=
"nav"
>
<ul
class=
"left"
>
<li
*
ngFor=
"let categoryItem of categoryList"
(
click
)="
switchCategory
(
categoryItem
.
id
)"
[
ngClass
]="{'
actived
'
:selectedCategoryId=
==categoryItem.id}"
>
{{categoryItem.dropOptionName}}
</li>
</ul>
</div>
<div
class=
"contentList"
>
<ul>
<li
*
ngFor=
"let fileUploadItem of fileUploadItemList"
>
...
...
src/app/my/file-upload/file-upload.component.scss
View file @
1446374f
...
...
@@ -3,48 +3,41 @@
ul
{
list-style
:
none
;
}
.left
{
display
:
flex
;
padding
:
10px
2px
;
// border-bottom: 3px #3784ca solid;
background
:
#f0f0f0
;
margin-bottom
:
10px
;
li
{
width
:
19%
;
border
:
1px
#a9aabb
solid
;
text-align
:
center
;
font-size
:
14px
;
.nav
{
overflow
:
hidden
;
width
:
100%
;
overflow-x
:
auto
;
.left
{
padding
:
10px
2px
;
background
:
#f0f0f0
;
margin-bottom
:
10px
;
float
:
left
;
width
:
120%
;
height
:
30px
;
line-height
:
30px
;
border-radius
:
20px
;
margin
:
0px
2px
;
}
li
.actived
{
background-color
:
#ff5a32
;
color
:
#fff
;
border
:
1px
#f0f0f0
solid
;
overflow
:
hidden
;
overflow-x
:
auto
;
list-style
:
none
;
li
{
border
:
1px
#a9aabb
solid
;
text-align
:
center
;
font-size
:
14px
;
height
:
30px
;
line-height
:
30px
;
border-radius
:
20px
;
margin
:
0px
2px
;
float
:
left
;
width
:
15
.2%
;
}
li
.actived
{
background-color
:
#ff5a32
;
color
:
#fff
;
border
:
1px
#f0f0f0
solid
;
}
}
// li:before {
// content: "";
// display: block;
// position: absolute;
// left: 22px;
// top: 42px;
// width: 60%;
// height: 1px;
// background: hsla(0,0%,86%,.4);
// }
// li.actived:after {
// content: "";
// position: absolute;
// left: 0;
// top: 0;
// width: 6px;
// height: 100%;
// font-size: 0;
// background-color: #ec2d37;
// }
}
.
nav
:
:-
webkit-scrollbar
{
opacity
:
0
;
}
.contentList
{
background-color
:
#fff
;
-webkit-box-flex
:
1
;
...
...
src/app/my/file-upload/file-upload.component.ts
View file @
1446374f
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
LifeCommonService
}
from
"../../common/life-common.service"
;
import
{
MyService
}
from
"../my.service"
;
import
{
ActivatedRoute
}
from
"@angular/router"
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
LifeCommonService
}
from
"../../common/life-common.service"
;
import
{
MyService
}
from
"../my.service"
;
import
{
ActivatedRoute
}
from
"@angular/router"
;
@
Component
({
selector
:
'ydlife-file-upload'
,
...
...
@@ -12,8 +12,8 @@ export class FileUploadComponent implements OnInit {
fileUploadItemList
:
Array
<
any
>
;
// 判断是文件下载还是教育培训
type
:
string
;
categoryList
:
Array
<
any
>
;
selectedCategoryId
:
number
;
categoryList
:
Array
<
any
>
;
selectedCategoryId
:
number
;
constructor
(
private
myService
:
MyService
,
private
activatedRoute
:
ActivatedRoute
)
{
}
...
...
@@ -21,16 +21,16 @@ export class FileUploadComponent implements OnInit {
this
.
type
=
this
.
activatedRoute
.
snapshot
.
data
[
0
][
'type'
];
this
.
dropOptionsQuery
();
if
(
this
.
type
===
'fileUpload'
)
{
this
.
fileUpload
(
3
,
0
,
19
,
'yd_download_file_type'
,
this
.
selectedCategoryId
);
this
.
fileUpload
(
3
,
0
,
19
,
'yd_download_file_type'
,
this
.
selectedCategoryId
);
}
else
if
(
this
.
type
===
'training'
)
{
this
.
fileUpload
(
3
,
0
,
23
,
'yd_trainning_file_type'
,
this
.
selectedCategoryId
);
this
.
fileUpload
(
3
,
0
,
23
,
'yd_trainning_file_type'
,
this
.
selectedCategoryId
);
}
}
// 文件下载
fileUpload
(
itemType
,
itemId
,
fileCategory
,
code
,
mdDropOptionId
)
{
this
.
myService
.
filePath
(
itemType
,
itemId
,
fileCategory
,
code
,
mdDropOptionId
).
subscribe
(
res
=>
{
// 文件下载
fileUpload
(
itemType
,
itemId
,
fileCategory
,
code
,
mdDropOptionId
)
{
this
.
myService
.
filePath
(
itemType
,
itemId
,
fileCategory
,
code
,
mdDropOptionId
).
subscribe
(
res
=>
{
if
(
res
[
'success'
])
{
this
.
fileUploadItemList
=
res
[
'data'
][
'fileUploadItemList'
];
}
...
...
@@ -39,26 +39,26 @@ export class FileUploadComponent implements OnInit {
//培训资料分类
dropOptionsQuery
()
{
const
code
=
this
.
type
===
'fileUpload'
?
'yd_download_file_type'
:
'yd_trainning_file_type'
const
code
=
this
.
type
===
'fileUpload'
?
'yd_download_file_type'
:
'yd_trainning_file_type'
this
.
myService
.
dropOptionsQuery
({
code
:
code
}).
subscribe
(
res
=>
{
if
(
res
[
'success'
])
{
this
.
categoryList
=
res
[
'data'
][
'dropMasterInfoList'
][
0
][
'dropOptionsInfoList'
];
if
(
this
.
categoryList
.
length
>
0
)
{
this
.
selectedCategoryId
=
this
.
categoryList
[
0
].
dropOptionOrder
;
this
.
switchCategory
(
this
.
selectedCategoryId
)
}
}
else
{
this
.
categoryList
=
res
[
'data'
][
'dropMasterInfoList'
][
0
][
'dropOptionsInfoList'
];
if
(
this
.
categoryList
.
length
>
0
)
{
this
.
selectedCategoryId
=
this
.
categoryList
[
0
].
id
;
this
.
switchCategory
(
this
.
selectedCategoryId
)
}
}
else
{
this
.
categoryList
=
[];
}
})
}
switchCategory
(
e
){
switchCategory
(
e
)
{
this
.
selectedCategoryId
=
e
;
if
(
this
.
type
===
'fileUpload'
)
{
this
.
fileUpload
(
3
,
0
,
19
,
'yd_download_file_type'
,
this
.
selectedCategoryId
);
this
.
fileUpload
(
3
,
0
,
19
,
'yd_download_file_type'
,
this
.
selectedCategoryId
);
}
else
if
(
this
.
type
===
'training'
)
{
this
.
fileUpload
(
3
,
0
,
23
,
'yd_trainning_file_type'
,
this
.
selectedCategoryId
);
this
.
fileUpload
(
3
,
0
,
23
,
'yd_trainning_file_type'
,
this
.
selectedCategoryId
);
}
}
}
src/app/my/important-announcement/important-announcement.component.html
View file @
1446374f
<ul
class=
"left"
>
<li
*
ngFor=
"let categoryItem of importantAnnouncementLists"
(
click
)="
switchCategory
(
categoryItem
.
id
)"
[
ngClass
]="{'
actived
'
:selectedCategoryId=
==categoryItem.id}"
>
{{categoryItem.dropOptionName}}
</li>
</ul>
<div
class=
"nav"
>
<ul
class=
"left"
>
<li
*
ngFor=
"let categoryItem of importantAnnouncementLists"
(
click
)="
switchCategory
(
categoryItem
.
id
)"
[
ngClass
]="{'
actived
'
:selectedCategoryId=
==categoryItem.id}"
>
{{categoryItem.dropOptionName}}
</li>
</ul>
</div>
<div
#
hide
class=
"materialContainer"
>
<div
class=
"materialItem"
*
ngFor=
"let announcementInfo of announcementLists;index as i"
[
routerLink
]="['/
importantAnnouncement
',
announcementInfo
.
id
]"
>
...
...
src/app/my/important-announcement/important-announcement.component.scss
View file @
1446374f
.left
{
display
:
flex
;
padding
:
10px
2px
;
// border-bottom: 3px #3784ca solid;
background
:
#f0f0f0
;
margin-bottom
:
10px
;
list-style
:
none
;
li
{
width
:
19%
;
border
:
1px
#a9aabb
solid
;
text-align
:
center
;
font-size
:
14px
;
.nav
{
overflow
:
hidden
;
width
:
100%
;
overflow-x
:
auto
;
.left
{
padding
:
10px
2px
;
background
:
#f0f0f0
;
margin-bottom
:
10px
;
float
:
left
;
width
:
120%
;
height
:
30px
;
line-height
:
30px
;
border-radius
:
20px
;
margin
:
0px
2px
;
}
li
.actived
{
background-color
:
#ff5a32
;
color
:
#fff
;
border
:
1px
#f0f0f0
solid
;
overflow
:
hidden
;
overflow-x
:
auto
;
list-style
:
none
;
li
{
border
:
1px
#a9aabb
solid
;
text-align
:
center
;
font-size
:
14px
;
height
:
30px
;
line-height
:
30px
;
border-radius
:
20px
;
margin
:
0px
2px
;
float
:
left
;
width
:
15
.2%
;
}
li
.actived
{
background-color
:
#ff5a32
;
color
:
#fff
;
border
:
1px
#f0f0f0
solid
;
}
}
}
.
nav
:
:-
webkit-scrollbar
{
opacity
:
0
;
}
.materialContainer
{
.materialItem
{
padding
:
5px
10px
;
...
...
src/app/my/mk-material-detail/mk-material-detail.component.ts
View file @
1446374f
import
{
Component
,
ElementRef
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
ActivatedRoute
}
from
'@angular/router'
;
import
{
environment
}
from
'../../../environments/environment'
;
import
{
LifeCommonService
}
from
'../../common/life-common.service'
;
import
{
MyService
}
from
'../my.service'
;
import
{
Buffer
}
from
'buffer'
;
import
{
Component
,
ElementRef
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
ActivatedRoute
}
from
'@angular/router'
;
import
{
environment
}
from
'../../../environments/environment'
;
import
{
LifeCommonService
}
from
'../../common/life-common.service'
;
import
{
MyService
}
from
'../my.service'
;
import
{
Buffer
}
from
'buffer'
;
declare
var
QRCode
:
any
;
import
*
as
uuid
from
'uuid'
;
...
...
@@ -30,17 +30,18 @@ export class MkMaterialDetailComponent implements OnInit {
qrcodePadding
=
5
;
rightWidth
=
5
;
bottomHeight
=
5
;
posterType
:
number
;
constructor
(
private
activateRoute
:
ActivatedRoute
,
private
lifeCommonService
:
LifeCommonService
,
private
myService
:
MyService
)
{
private
lifeCommonService
:
LifeCommonService
,
private
myService
:
MyService
)
{
}
ngOnInit
()
{
this
.
materialItemId
=
this
.
activateRoute
.
snapshot
.
paramMap
.
get
(
'itemId'
);
this
.
materialItemType
=
this
.
activateRoute
.
snapshot
.
queryParams
[
'itemType'
];
this
.
lifeCustomerInfo
=
localStorage
.
getItem
(
'lifeCustomerInfo'
)
?
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))
:
null
;
this
.
posterQuery
(
this
.
materialItemId
,
this
.
materialItemType
);
this
.
posterType
=
this
.
activateRoute
.
snapshot
.
queryParams
[
'posterType'
];
this
.
posterQuery
(
this
.
posterType
,
this
.
materialItemType
);
}
async
canvasPic
()
{
...
...
@@ -66,7 +67,7 @@ export class MkMaterialDetailComponent implements OnInit {
if
(
this
.
lifeCustomerInfo
.
practitionerBasicInfo
.
headImagePath
)
{
avatarImg
.
src
=
this
.
lifeCustomerInfo
.
practitionerBasicInfo
.
headImagePath
+
'?v='
+
new
Date
().
getTime
();
}
else
{
avatarImg
.
src
=
`
${
environment
.
ORIGINNAME
}
/assets/img
/meng.png?v=
${
new
Date
().
getTime
()}
`
;
avatarImg
.
src
=
`
assets/images
/meng.png?v=
${
new
Date
().
getTime
()}
`
;
}
// 这里的第一张图片就是可以是你们的海报 这里注意绘制的顺序 我们要手动控制
img
.
src
=
this
.
productPosterPath
;
...
...
@@ -86,7 +87,12 @@ export class MkMaterialDetailComponent implements OnInit {
// 这里的image只能在onload里面绘制 在外面就会被覆盖了 因为优先加载完毕就会优先绘制 然后就被之后绘制的海报背景遮挡了
const
shareQr
=
new
Image
();
// 设置base64编码格式值
shareQr
.
src
=
qrcodeUrl
;
if
(
this
.
materialItemType
==
'5'
)
{
shareQr
.
src
=
`assets/images/online.jpg`
}
else
{
shareQr
.
src
=
qrcodeUrl
;
}
shareQr
.
onload
=
()
=>
{
const
qrcodeBgX
=
document
.
body
.
clientWidth
-
(
this
.
rightWidth
+
this
.
qrcodeBgWidth
);
const
qrcodeBgY
=
document
.
body
.
clientHeight
-
(
this
.
bottomHeight
+
this
.
qrcodeBgWidth
);
...
...
@@ -187,16 +193,17 @@ export class MkMaterialDetailComponent implements OnInit {
});
}
// 获取大图
// 获取大图
posterQuery
(
itemId
,
itemType
)
{
this
.
myService
.
posterQuery
({
id
:
this
.
posterType
,
paginationInfo
:
{
noLimitFlag
:
'CONFIRM'
}
}).
subscribe
(
res
=>
{
if
(
res
[
'success'
])
{
const
posterInfos
=
res
[
'data'
][
'posterInfos'
];
const
posterInfo
=
posterInfos
.
filter
(
item
=>
item
.
i
temI
d
==
itemId
&&
item
.
itemType
==
itemType
).
pop
();
const
posterInfo
=
posterInfos
.
filter
(
item
=>
item
.
id
==
itemId
&&
item
.
itemType
==
itemType
).
pop
();
this
.
productPosterPath
=
posterInfo
.
productPosterPath
+
'?v='
+
new
Date
().
getTime
();
// 分享信息
const
shareCodeUuid
=
uuid
.
v4
();
...
...
src/app/my/mk-material/mk-material.component.html
View file @
1446374f
<ul
class=
"left"
>
<li
*
ngFor=
"let categoryItem of categoryList"
(
click
)="
switchCategory
(
categoryItem
.
dropOptionOrder
)"
[
ngClass
]="{'
actived
'
:selectedCategoryId=
==categoryItem.dropOptionOrder}"
>
{{categoryItem.dropOptionName}}
</li>
</ul>
<div
class=
'nav'
>
<ul
class=
"left"
>
<li
*
ngFor=
"let categoryItem of categoryList"
(
click
)="
switchCategory
(
categoryItem
.
id
)"
[
ngClass
]="{'
actived
'
:selectedCategoryId=
==categoryItem.id}"
>
{{categoryItem.dropOptionName}}
</li>
</ul>
</div>
<div
class=
"materialContainer"
>
<div
class=
"materialItem"
*
ngFor=
"let posterInfo of posterInfos;index as i"
[
routerLink
]="['/
material
',
posterInfo
.
itemId
]"
[
queryParams
]="{
itemType:posterInfo
.
itemType
}"
>
[
routerLink
]="['/
material
',
posterInfo
.
itemId
]"
[
queryParams
]="{
itemType:posterInfo
.
itemType
,
posterType:posterInfo
.
id
}"
>
<div>
<img
src=
"{{posterInfo.productPosterPath}}"
alt=
""
class=
"img-responsive"
>
</div>
...
...
src/app/my/mk-material/mk-material.component.scss
View file @
1446374f
.left
{
display
:
flex
;
padding
:
10px
2px
;
// border-bottom: 3px #3784ca solid;
background
:
#f0f0f0
;
margin-bottom
:
10px
;
list-style
:
none
;
li
{
width
:
19%
;
border
:
1px
#a9aabb
solid
;
text-align
:
center
;
font-size
:
14px
;
.nav
{
overflow
:
hidden
;
width
:
100%
;
overflow-x
:
auto
;
.left
{
padding
:
10px
2px
;
background
:
#f0f0f0
;
margin-bottom
:
10px
;
float
:
left
;
width
:
120%
;
height
:
30px
;
line-height
:
30px
;
border-radius
:
20px
;
margin
:
0px
2px
;
}
li
.actived
{
background-color
:
#ff5a32
;
color
:
#fff
;
border
:
1px
#f0f0f0
solid
;
overflow
:
hidden
;
overflow-x
:
auto
;
list-style
:
none
;
li
{
border
:
1px
#a9aabb
solid
;
text-align
:
center
;
font-size
:
14px
;
height
:
30px
;
line-height
:
30px
;
border-radius
:
20px
;
margin
:
0px
2px
;
float
:
left
;
width
:
15
.2%
;
}
li
.actived
{
background-color
:
#ff5a32
;
color
:
#fff
;
border
:
1px
#f0f0f0
solid
;
}
}
}
.
nav
:
:-
webkit-scrollbar
{
opacity
:
0
;
}
.materialContainer
{
display
:
grid
;
grid-template-columns
:
repeat
(
3
,
1fr
);
...
...
src/app/my/mk-material/mk-material.component.ts
View file @
1446374f
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Router
}
from
"@angular/router"
;
import
{
MyService
}
from
"../my.service"
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Router
}
from
"@angular/router"
;
import
{
MyService
}
from
"../my.service"
;
@
Component
({
selector
:
'ydlife-mk-material'
,
...
...
@@ -9,8 +9,8 @@ import {MyService} from "../my.service";
})
export
class
MkMaterialComponent
implements
OnInit
{
posterInfos
:
Array
<
any
>
;
categoryList
:
Array
<
any
>
;
selectedCategoryId
:
number
;
categoryList
:
Array
<
any
>
;
selectedCategoryId
:
number
;
constructor
(
private
router
:
Router
,
private
myService
:
MyService
)
{
}
...
...
@@ -21,8 +21,8 @@ export class MkMaterialComponent implements OnInit {
posterQuery
()
{
const
param
=
{
mdDropOptionId
:
this
.
selectedCategoryId
,
paginationInfo
:
{
noLimitFlag
:
'CONFIRM'
}
mdDropOptionId
:
this
.
selectedCategoryId
,
paginationInfo
:
{
noLimitFlag
:
'CONFIRM'
}
}
this
.
myService
.
posterQuery
(
param
).
subscribe
(
res
=>
{
if
(
res
[
'success'
])
{
...
...
@@ -33,20 +33,20 @@ export class MkMaterialComponent implements OnInit {
//海报分类
dropOptionsQuery
()
{
this
.
myService
.
dropOptionsQuery
({
code
:
'yd_productbill_file_type'
}).
subscribe
(
res
=>
{
this
.
myService
.
dropOptionsQuery
({
code
:
'yd_productbill_file_type'
}).
subscribe
(
res
=>
{
if
(
res
[
'success'
])
{
this
.
categoryList
=
res
[
'data'
][
'dropMasterInfoList'
][
0
][
'dropOptionsInfoList'
];
if
(
this
.
categoryList
.
length
>
0
)
{
this
.
selectedCategoryId
=
this
.
categoryList
[
0
].
dropOptionOrder
;
this
.
posterQuery
();
}
}
else
{
this
.
categoryList
=
res
[
'data'
][
'dropMasterInfoList'
][
0
][
'dropOptionsInfoList'
];
if
(
this
.
categoryList
.
length
>
0
)
{
this
.
selectedCategoryId
=
this
.
categoryList
[
0
].
id
;
this
.
posterQuery
();
}
}
else
{
this
.
categoryList
=
[];
}
})
}
switchCategory
(
e
){
switchCategory
(
e
)
{
this
.
selectedCategoryId
=
e
;
this
.
posterQuery
();
}
...
...
src/app/my/my-center-home/my-center-home.component.scss
View file @
1446374f
...
...
@@ -18,7 +18,7 @@
display
:
flex
;
-webkit-box-align
:
center
;
align-items
:
center
;
padding
:
1
5px
0
15
px
21px
;
padding
:
1
0px
0
10
px
21px
;
width
:
100%
;
color
:
#fff
;
background
:
linear-gradient
(
90deg
,
#494949
,
#393939
);
...
...
@@ -55,7 +55,7 @@
border-radius
:
6px
;
}
.brokerTag
{
margin-top
:
10px
;
//
margin-top: 10px;
display
:
flex
;
font-weight
:
normal
;
font-size
:
14px
;
...
...
src/app/my/my-center-home/my-center-home.component.ts
View file @
1446374f
...
...
@@ -47,17 +47,17 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
{
title
:
'营销工具'
,
content
:
[
{
no
:
2
,
subtitle
:
'AI
咨询'
,
icon
:
'icon-ai'
,
path
:
`https://
${
window
.
location
.
host
}
/questionnaire/#/index?campaign=AIRobot&task=AItask1
`
,
routerLink
:
''
},
{
no
:
1
,
subtitle
:
'獴哥
咨询
'
,
icon
:
'icon-btnconsult'
,
path
:
`https://
${
window
.
location
.
host
}
/consulting`
,
routerLink
:
''
},
{
no
:
3
,
subtitle
:
'产品海报'
,
icon
:
'icon-wenjian'
,
path
:
''
,
routerLink
:
'material
'
},
{
no
:
4
,
subtitle
:
'银盾在线'
,
icon
:
'icon-zaixian'
,
path
:
`https://
${
window
.
location
.
host
}
/index`
,
routerLink
:
''
}
{
no
:
2
,
subtitle
:
'AI
保险医生'
,
icon
:
'icon-ai'
,
path
:
`https://
${
window
.
location
.
host
}
/questionnaire/#/index?campaign=AIRobot&task=AItask1&customerId=
${
this
.
lifeCustomerInfo
.
customerId
}
`
,
routerLink
:
''
},
{
no
:
1
,
subtitle
:
'獴哥
保险诊所
'
,
icon
:
'icon-btnconsult'
,
path
:
`https://
${
window
.
location
.
host
}
/consulting`
,
routerLink
:
''
},
{
no
:
4
,
subtitle
:
'银盾在线'
,
icon
:
'icon-zaixian'
,
path
:
`https://
${
window
.
location
.
host
}
/index`
,
routerLink
:
'
'
},
{
no
:
12
,
subtitle
:
'我的保单'
,
icon
:
'icon-dailishangshenqing'
,
path
:
''
,
routerLink
:
''
}
]
},
{
title
:
'教育培训'
,
content
:
[
{
no
:
5
,
subtitle
:
'保险ABC'
,
icon
:
'icon-xueshimao'
,
path
:
`https://
${
window
.
location
.
host
}
/issue`
,
routerLink
:
''
},
{
no
:
6
,
subtitle
:
'培训课件'
,
icon
:
'icon-jiaoyu'
,
path
:
''
,
routerLink
:
'training'
},
{
no
:
7
,
subtitle
:
'文章分享'
,
icon
:
'icon-zhuanfaxian'
,
path
:
`https://
${
window
.
location
.
host
}
/discovery`
,
routerLink
:
'
'
},
{
no
:
11
,
subtitle
:
'文件下载'
,
icon
:
'icon-xiazai1'
,
path
:
'https://www.ydinsurance.cn/?page_id=13957'
,
routerLink
:
'fileUpload
'
},
{
no
:
8
,
subtitle
:
''
,
icon
:
''
,
path
:
''
,
routerLink
:
''
}
]
...
...
@@ -66,8 +66,8 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
content
:
[
{
no
:
9
,
subtitle
:
'执业分享'
,
icon
:
'icon-shenfenzheng'
,
path
:
`https://
${
window
.
location
.
host
}
/brokerQry/#/brokerDetail/
${
this
.
lifeCustomerInfo
.
practitionerId
}
`
,
routerLink
:
''
},
{
no
:
10
,
subtitle
:
'职业类别'
,
icon
:
'icon-zhiyeleibie'
,
path
:
'https://www.ydinsurance.cn/occupationQry/'
,
routerLink
:
''
},
{
no
:
11
,
subtitle
:
'文件下载'
,
icon
:
'icon-xiazai1'
,
path
:
'https://www.ydinsurance.cn/?page_id=13957'
,
routerLink
:
'fileUpload
'
},
{
no
:
12
,
subtitle
:
''
,
icon
:
''
,
path
:
''
,
routerLink
:
''
}
{
no
:
7
,
subtitle
:
'文章分享'
,
icon
:
'icon-zhuanfaxian'
,
path
:
`https://
${
window
.
location
.
host
}
/discovery`
,
routerLink
:
'
'
},
{
no
:
3
,
subtitle
:
'产品海报'
,
icon
:
'icon-wenjian'
,
path
:
'/salesDetail'
,
routerLink
:
'material'
},
]
}
...
...
@@ -96,6 +96,9 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
// else if (item.no === 9) {
// this.shareIdCard();
// }
else
if
(
item
.
no
===
12
)
{
this
.
router
.
navigate
([
'/salesDetail'
],
{
queryParams
:
{
type
:
this
.
performanceSelectedFlag
}
});
}
else
{
this
.
isNeedAlert
=
true
;
this
.
dialogInfo
=
{
...
...
src/app/my/sales-detail/sales-detail.component.html
View file @
1446374f
...
...
@@ -18,7 +18,7 @@
<div>
投保人:{{salesDetailItem.holderName}}
</div>
<div
class=
"price"
>
¥{{salesDetailItem.referralAmount | number: "1.2-2"}}
</div>
</div>
<div
class=
"line long_line"
>
产品名称:
{{salesDetailItem.productName}}
</div>
<div
class=
"line long_line"
>
{{salesDetailItem.productName}}
</div>
<div
class=
"line long_line"
>
<div>
保单号:{{salesDetailItem.policyNo}}
</div>
<div>
{{(salesDetailItem.orderDate).substr(0,10)}}
</div>
...
...
src/assets/images/online.jpg
0 → 100644
View file @
1446374f
304 KB
src/assets/images/online_chat.jpg
0 → 100644
View file @
1446374f
304 KB
src/styles.scss
View file @
1446374f
...
...
@@ -13,6 +13,7 @@ html, body {
overflow-x
:
hidden
;
overflow-y
:
scroll
;
-webkit-overflow-scrolling
:
touch
;
}
.img-responsive
{
...
...
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