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
5bf0dc95
Commit
5bf0dc95
authored
Apr 23, 2021
by
Sweet Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文章分享
parent
e30b0df5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
src/app/my/article-detail/article-detail.component.html
+2
-2
src/app/my/article-detail/article-detail.component.ts
+9
-9
No files found.
src/app/my/article-detail/article-detail.component.html
View file @
5bf0dc95
...
...
@@ -42,8 +42,8 @@
</div>
</div>
</div>
<div
class=
"shareCus"
(
click
)="
share
()"
>
<span>
分享
获客
</span>
<div
class=
"shareCus"
(
click
)="
share
()"
*
ngIf=
"this.lifeCommonService.checkDeviceType() == 3"
>
<span>
分享
</span>
</div>
<!--分享引导页-->
<div
class=
"shareGuidePage"
*
ngIf=
"shareAbled"
(
click
)="
share
()"
>
...
...
src/app/my/article-detail/article-detail.component.ts
View file @
5bf0dc95
...
...
@@ -27,9 +27,9 @@ export class ArticleDetailComponent implements OnInit, OnDestroy {
sharePractitionerInfo
:
any
;
constructor
(
private
myService
:
MyService
,
public
lifeCommonService
:
LifeCommonService
,
public
router
:
Router
,
public
activatedRoute
:
ActivatedRoute
)
{
this
.
subscription
=
lifeCommonService
.
shareStatus$
.
subscribe
(
status
=>
{
this
.
shareAbled
=
!
(
status
==
'0'
);
});
//
this.subscription = lifeCommonService.shareStatus$.subscribe(status => {
//
this.shareAbled = !(status == '0');
//
});
}
ngOnInit
()
{
...
...
@@ -60,7 +60,8 @@ export class ArticleDetailComponent implements OnInit, OnDestroy {
}
ngOnDestroy
()
{
this
.
subscription
.
unsubscribe
();
this
.
articleTrackSave
();
sessionStorage
.
removeItem
(
'articleTrackId'
);
}
// 从后台获取到获取微信code的URL
...
...
@@ -76,8 +77,7 @@ export class ArticleDetailComponent implements OnInit, OnDestroy {
// 点击分享
share
()
{
this
.
shareAbled
=
!
this
.
shareAbled
;
this
.
lifeCommonService
.
wxShare
(
this
.
articleInfo
.
title
,
`来自银盾经纪人
${
this
.
agentInfo
.
agentName
}
的分享`
,
`
${
window
.
location
.
href
}
?shareCode=
${
this
.
shareCode
}
`
,
this
.
articleInfo
.
coverUrl
);
this
.
shareAbled
=
true
;
this
.
articleShareCodeSave
();
setTimeout
(()
=>
{
this
.
shareAbled
=
false
;
...
...
@@ -101,7 +101,6 @@ export class ArticleDetailComponent implements OnInit, OnDestroy {
qrCodePath
:
this
.
sharePractitionerInfo
.
qrCodePath
,
mobileNo
:
this
.
sharePractitionerInfo
.
mobileNo
};
this
.
lifeCommonService
.
wxShare
(
this
.
articleInfo
.
title
,
`来自银盾经纪人
${
this
.
agentInfo
.
agentName
}
的分享`
,
`
${
window
.
location
.
href
}
`
,
this
.
articleInfo
.
coverUrl
);
}
...
...
@@ -119,6 +118,7 @@ export class ArticleDetailComponent implements OnInit, OnDestroy {
channel
:
1
,
url
:
window
.
location
.
href
};
this
.
lifeCommonService
.
wxShare
(
this
.
articleInfo
.
title
,
`来自银盾经纪人
${
this
.
lifeCustomerInfo
.
practitionerBasicInfo
.
name
?
this
.
lifeCustomerInfo
.
practitionerBasicInfo
.
name
:
this
.
sharePractitionerInfo
.
name
}
的分享`
,
`
${
window
.
location
.
origin
}${
window
.
location
.
pathname
}
?shareCode=
${
this
.
articleShareCodeSaveInfo
.
shareCode
}
`
,
this
.
articleInfo
.
coverUrl
);
this
.
myService
.
articleShareCodeSave
(
this
.
articleShareCodeSaveInfo
).
subscribe
(
res
=>
{
// console.log(res);
});
...
...
@@ -128,7 +128,7 @@ export class ArticleDetailComponent implements OnInit, OnDestroy {
// 有id就是出 没id就是进
articleTrackSave
()
{
const
param
=
{
id
:
null
,
id
:
sessionStorage
.
getItem
(
'articleTrackId'
)
?
sessionStorage
.
getItem
(
'articleTrackId'
)
:
null
,
shareCode
:
this
.
shareCode
,
nickname
:
null
,
gender
:
null
,
...
...
@@ -136,7 +136,7 @@ export class ArticleDetailComponent implements OnInit, OnDestroy {
deviceType
:
this
.
lifeCommonService
.
checkDeviceType
()
};
this
.
myService
.
articleTrackSave
(
param
).
subscribe
(
res
=>
{
console
.
log
(
res
);
sessionStorage
.
setItem
(
'articleTrackId'
,
res
[
'data'
][
'id'
]
);
})
}
...
...
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