Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
allCampaign
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
Administrator
allCampaign
Commits
df429dad
Commit
df429dad
authored
Mar 04, 2020
by
Sweet Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
没有customerId的普通分享bug修复
parent
b0bac0e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
2 deletions
+39
-2
questionnaire/src/app/app.component.ts
+5
-0
questionnaire/src/app/transit/transit.component.ts
+34
-2
No files found.
questionnaire/src/app/app.component.ts
View file @
df429dad
...
@@ -12,6 +12,11 @@ export class AppComponent implements OnInit {
...
@@ -12,6 +12,11 @@ export class AppComponent implements OnInit {
}
}
ngOnInit
()
{
ngOnInit
()
{
if
(
!
this
.
commonService
.
getQueryString
(
't_reload'
))
{
let
{
search
,
href
}
=
window
.
location
;
href
=
href
.
replace
(
/&
?
t_reload=
(\d
+
)
/g
,
''
);
window
.
location
.
href
=
href
+
(
search
?
'&'
:
'?'
)
+
't_reload='
+
new
Date
().
getTime
();
}
let
customerId
=
this
.
commonService
.
getQueryString
(
'customerId'
);
let
customerId
=
this
.
commonService
.
getQueryString
(
'customerId'
);
const
double12_customerInfo
=
localStorage
.
getItem
(
'double12_customerInfo'
)
?
JSON
.
parse
(
localStorage
.
getItem
(
'double12_customerInfo'
))
:
null
;
const
double12_customerInfo
=
localStorage
.
getItem
(
'double12_customerInfo'
)
?
JSON
.
parse
(
localStorage
.
getItem
(
'double12_customerInfo'
))
:
null
;
if
(
double12_customerInfo
)
{
if
(
double12_customerInfo
)
{
...
...
questionnaire/src/app/transit/transit.component.ts
View file @
df429dad
...
@@ -65,9 +65,9 @@ export class TransitComponent implements OnInit {
...
@@ -65,9 +65,9 @@ export class TransitComponent implements OnInit {
let
_this
=
this
;
let
_this
=
this
;
// 默认的分享信息
// 默认的分享信息
const
shareData
=
{
const
shareData
=
{
title
:
'
分享标题
'
,
title
:
'
AI智能保险顾问
'
,
link
:
`
${
environment
.
hostName
}
/questionnaire/#/index?campaign=AIRobot&task=AItask1`
,
link
:
`
${
environment
.
hostName
}
/questionnaire/#/index?campaign=AIRobot&task=AItask1`
,
desc
:
'
分享描述
'
,
desc
:
'
AI智能家庭风险评测 、实时保障方案推荐。一分钟、搞定家庭保险。
'
,
imgUrl
:
'https://ajb-images.oss-cn-shanghai-finance-1-pub.aliyuncs.com/9/ydshare.jpg'
,
imgUrl
:
'https://ajb-images.oss-cn-shanghai-finance-1-pub.aliyuncs.com/9/ydshare.jpg'
,
success
:
function
()
{
success
:
function
()
{
_this
.
wxShareFlag
=
false
;
_this
.
wxShareFlag
=
false
;
...
@@ -94,6 +94,8 @@ export class TransitComponent implements OnInit {
...
@@ -94,6 +94,8 @@ export class TransitComponent implements OnInit {
});
});
});
});
}
else
{
this
.
defaultWxShare
();
}
}
}
}
...
@@ -114,6 +116,36 @@ export class TransitComponent implements OnInit {
...
@@ -114,6 +116,36 @@ export class TransitComponent implements OnInit {
});
});
}
}
// 分享
defaultWxShare
()
{
const
_this
=
this
;
// 默认的分享信息
const
shareData
=
{
title
:
'AI智能保险顾问'
,
link
:
`
${
environment
.
hostName
}
/questionnaire/#/index?campaign=AIRobot&task=AItask1`
,
desc
:
'AI智能家庭风险评测 、实时保障方案推荐。一分钟、搞定家庭保险。'
,
imgUrl
:
'https://ajb-images.oss-cn-shanghai-finance-1-pub.aliyuncs.com/9/ydshare.jpg'
,
success
:
function
()
{
_this
.
wxShareFlag
=
false
;
_this
.
alertFlag
=
true
;
_this
.
dialogTips
=
'分享成功'
;
setTimeout
(()
=>
{
_this
.
alertFlag
=
false
;
_this
.
changeDetectorRef
.
markForCheck
();
_this
.
changeDetectorRef
.
detectChanges
();
},
500
)
_this
.
changeDetectorRef
.
markForCheck
();
_this
.
changeDetectorRef
.
detectChanges
();
}
};
wx
.
ready
(
function
()
{
wx
.
onMenuShareAppMessage
(
shareData
);
// 分享微信
wx
.
onMenuShareTimeline
(
shareData
);
// 分享到朋友圈
wx
.
onMenuShareQQ
(
shareData
);
// 分享到QQ
wx
.
onMenuShareQZone
(
shareData
);
// 分享到QQ空间
});
}
/**
/**
* 检测操作系统
* 检测操作系统
*/
*/
...
...
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