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
e30b0df5
Commit
e30b0df5
authored
Apr 23, 2021
by
Sweet Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分享
parent
4dd0cf5b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
21 deletions
+24
-21
src/app/common/life-common.service.ts
+0
-1
src/app/my/article-detail/article-detail.component.html
+1
-1
src/app/my/article-detail/article-detail.component.ts
+23
-19
No files found.
src/app/common/life-common.service.ts
View file @
e30b0df5
...
...
@@ -119,7 +119,6 @@ export class LifeCommonService {
link
:
link
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl
:
imgUrl
,
// 分享图标
success
:
()
=>
{
alert
(
111
)
_this
.
shareStatusPublish
(
0
);
}
};
...
...
src/app/my/article-detail/article-detail.component.html
View file @
e30b0df5
<button
(
click
)="
getWxUserInfo
()"
>
getWxUserInfo
</button>
<div
id=
"js_article"
class=
"rich_media"
>
<div
class=
"rich_media_inner"
>
<div
id=
"page-content"
class=
"rich_media_area_primary"
>
<div
class=
"rich_media_area_primary_inner"
>
<div
id=
"img-content"
class=
"rich_media_wrp"
>
<button
(
click
)="
getWxUserInfo
()"
>
getWxUserInfo
</button>
<h2
class=
"rich_media_title"
id=
"activity-name"
>
{{articleInfo?.title}}
</h2>
...
...
src/app/my/article-detail/article-detail.component.ts
View file @
e30b0df5
...
...
@@ -34,27 +34,26 @@ export class ArticleDetailComponent implements OnInit, OnDestroy {
ngOnInit
()
{
this
.
articleId
=
this
.
activatedRoute
.
snapshot
.
params
[
'id'
];
this
.
shareCode
=
this
.
activatedRoute
.
snapshot
.
queryParams
[
'shareCode'
]
?
this
.
activatedRoute
.
snapshot
.
queryParams
[
'shareCode'
]
:
uuid
.
v4
()
;
this
.
shareCode
=
this
.
activatedRoute
.
snapshot
.
queryParams
[
'shareCode'
];
if
(
this
.
activatedRoute
.
snapshot
.
queryParams
[
'shareCode'
])
{
this
.
practitionerFileSharingList
(
null
,
this
.
shareCode
);
this
.
articleTrackSave
();
}
else
{
this
.
practitionerFileSharingList
(
this
.
articleId
,
null
);
}
this
.
lifeCustomerInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))
?
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))
:
null
;
if
(
this
.
lifeCustomerInfo
)
{
this
.
customerId
=
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))[
'customerId'
]
this
.
customerId
=
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))[
'customerId'
];
this
.
agentInfo
=
{
headImagePath
:
this
.
lifeCustomerInfo
.
practitionerBasicInfo
.
headImagePath
,
agentName
:
this
.
lifeCustomerInfo
.
practitionerBasicInfo
.
name
,
insurerBranchName
:
this
.
lifeCustomerInfo
.
practitionerBasicInfo
.
insurerBranchName
,
qrCodePath
:
this
.
lifeCustomerInfo
.
practitionerBasicInfo
.
qrCodePath
,
mobileNo
:
this
.
lifeCustomerInfo
.
mobileNo
};
}
else
{
this
.
customerId
=
null
;
}
this
.
agentInfo
=
{
headImagePath
:
this
.
lifeCustomerInfo
.
practitionerBasicInfo
.
headImagePath
,
agentName
:
this
.
lifeCustomerInfo
.
practitionerBasicInfo
.
name
,
insurerBranchName
:
this
.
lifeCustomerInfo
.
practitionerBasicInfo
.
insurerBranchName
,
qrCodePath
:
this
.
lifeCustomerInfo
.
practitionerBasicInfo
.
qrCodePath
,
mobileNo
:
this
.
lifeCustomerInfo
.
mobileNo
};
if
(
this
.
lifeCommonService
.
checkDeviceType
()
==
'3'
&&
!
this
.
customerId
)
{
this
.
getWxUserInfo
();
}
...
...
@@ -74,6 +73,7 @@ export class ArticleDetailComponent implements OnInit, OnDestroy {
})
}
// 点击分享
share
()
{
this
.
shareAbled
=
!
this
.
shareAbled
;
...
...
@@ -93,14 +93,18 @@ export class ArticleDetailComponent implements OnInit, OnDestroy {
}).
subscribe
(
res
=>
{
this
.
articleInfo
=
res
[
'data'
].
practitionerFileShares
.
list
[
'0'
];
this
.
sharePractitionerInfo
=
res
[
'data'
].
sharePractitionerInfo
;
this
.
agentInfo
=
{
headImagePath
:
this
.
sharePractitionerInfo
.
headImagePath
,
agentName
:
this
.
sharePractitionerInfo
.
name
,
insurerBranchName
:
this
.
sharePractitionerInfo
.
insurerBranchName
,
qrCodePath
:
this
.
sharePractitionerInfo
.
qrCodePath
,
mobileNo
:
this
.
sharePractitionerInfo
.
mobileNo
};
this
.
lifeCommonService
.
wxShare
(
this
.
articleInfo
.
title
,
`来自银盾经纪人
${
this
.
agentInfo
.
agentName
}
的分享`
,
`
${
window
.
location
.
href
}
`
,
this
.
articleInfo
.
coverUrl
);
if
(
this
.
sharePractitionerInfo
)
{
this
.
agentInfo
=
{
headImagePath
:
this
.
sharePractitionerInfo
.
headImagePath
,
agentName
:
this
.
sharePractitionerInfo
.
name
,
insurerBranchName
:
this
.
sharePractitionerInfo
.
insurerBranchName
,
qrCodePath
:
this
.
sharePractitionerInfo
.
qrCodePath
,
mobileNo
:
this
.
sharePractitionerInfo
.
mobileNo
};
this
.
lifeCommonService
.
wxShare
(
this
.
articleInfo
.
title
,
`来自银盾经纪人
${
this
.
agentInfo
.
agentName
}
的分享`
,
`
${
window
.
location
.
href
}
`
,
this
.
articleInfo
.
coverUrl
);
}
});
}
...
...
@@ -108,7 +112,7 @@ export class ArticleDetailComponent implements OnInit, OnDestroy {
articleShareCodeSave
()
{
this
.
articleShareCodeSaveInfo
=
{
itemId
:
this
.
articleId
,
shareCode
:
this
.
shareCode
,
shareCode
:
uuid
.
v4
()
,
practitionerId
:
this
.
lifeCustomerInfo
.
practitionerId
?
this
.
lifeCustomerInfo
.
practitionerId
:
this
.
sharePractitionerInfo
.
practitionerId
,
customerId
:
this
.
lifeCustomerInfo
.
customerId
?
this
.
lifeCustomerInfo
.
customerId
:
this
.
sharePractitionerInfo
.
customerId
,
os
:
this
.
lifeCommonService
.
checkOs
(),
...
...
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