Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
techbook
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
front-end-dev
techbook
Commits
a2ead162
Commit
a2ead162
authored
Jan 12, 2021
by
zhangyanni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分享
parent
11593e8c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
shareIndustryCmpt.vue
src/components/shareIndustryCmpt.vue
+2
-3
list.vue
src/views/mobile/industryReport/list.vue
+8
-7
No files found.
src/components/shareIndustryCmpt.vue
View file @
a2ead162
...
...
@@ -253,10 +253,9 @@
});
let
dataVal
,
hrefUrl
=
(
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#/industryReportDetail"
)
+
"?id="
+
this
.
detailInfo
.
reportId
+
"&lang="
+
this
.
lang
;
let
dataVal
,
hrefUrl
=
(
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#/industryReportDetail"
)
+
"?id="
+
this
.
detailInfo
.
reportId
+
"&lang="
+
this
.
lang
;
// hrefUrl = this.isIndex?(document.location.href.split("#/")[0]+"#/industryReportDetail"+"?id="+this.detailInfo.reportId):document.location.href;
console
.
log
(
hrefUrl
)
if
(
this
.
detailInfo
){
if
(
this
.
pageType
==
1
){
dataVal
=
{
...
...
src/views/mobile/industryReport/list.vue
View file @
a2ead162
...
...
@@ -184,7 +184,7 @@
//
var
userAgent
=
navigator
.
userAgent
,
shareUrl
;
var
isMini
=
/miniProgram/i
.
test
(
userAgent
);
var
urlData
=
document
.
location
.
href
+
"?lang="
+
this
.
lang
;
var
urlData
=
(
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#/industryReportDetail"
)
+
"?id="
+
this
.
currentData
.
reportId
+
"?lang="
+
this
.
lang
;
if
(
isMini
)
{
if
(
data
==
2
)
{
shareUrl
=
'/pages/industryReport/industryReport?isShareIndustryReport=true&url='
+
JSON
.
stringify
(
query
);
...
...
@@ -229,7 +229,7 @@
call
(
data
,
command
)
{
this
.
currentData
=
data
;
let
query
=
this
.
$route
.
query
;
let
query
=
this
.
$route
.
query
,
hrefUrl
=
(
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#/industryReportDetail"
)
+
"?id="
+
this
.
currentData
.
reportId
+
"&lang="
+
this
.
lang
;
query
.
title
=
data
.
reportTitle
;
query
.
lang
=
this
.
lang
;
query
.
rDeviceId
=
this
.
publicFun
.
getCookie
(
"getGuid32"
);
...
...
@@ -249,7 +249,7 @@
title
:
data
.
reportTitle
,
desc
:
this
.
$t
(
"shareInfo.industryReportZy"
),
// 如果是微信该link的域名必须要在微信后台配置的安全域名之内的。
link
:
document
.
location
.
href
+
"&rDeviceId="
+
this
.
publicFun
.
getCookie
(
"getGuid32"
)
+
"&rEmpId="
+
(
this
.
userInfo
?
this
.
userInfo
.
empId
:
undefined
)
+
"&rTargetType="
+
query
.
rTargetType
,
link
:
hrefUrl
+
"&rDeviceId="
+
this
.
publicFun
.
getCookie
(
"getGuid32"
)
+
"&rEmpId="
+
(
this
.
userInfo
?
this
.
userInfo
.
empId
:
undefined
)
+
"&rTargetType="
+
query
.
rTargetType
,
// icon: this.config.url,
// 不要过于依赖以下两个回调,很多浏览器是不支持的
success
:
function
()
{
...
...
@@ -263,7 +263,7 @@
title
:
data
.
reportTitle
,
desc
:
this
.
$t
(
"shareInfo.industryReportZy"
),
// 如果是微信该link的域名必须要在微信后台配置的安全域名之内的。
link
:
document
.
location
.
href
+
"&rDeviceId="
+
this
.
publicFun
.
getCookie
(
"getGuid32"
)
+
"&rEmpId="
+
(
this
.
userInfo
?
this
.
userInfo
.
empId
:
undefined
)
+
"&rTargetType="
+
query
.
rTargetType
,
link
:
hrefUrl
+
"&rDeviceId="
+
this
.
publicFun
.
getCookie
(
"getGuid32"
)
+
"&rEmpId="
+
(
this
.
userInfo
?
this
.
userInfo
.
empId
:
undefined
)
+
"&rTargetType="
+
query
.
rTargetType
,
imgUrl
:
this
.
lang
==
1
?
(
this
.
frontImgUrl
+
"/public/industryReportShareZh.jpg"
)
:
(
this
.
frontImgUrl
+
"/public/industryReportShareEn.jpg"
),
// 图片, 默认取网页中第一个img标签
fnDoShare
(
type
)
{
setTimeout
(
function
()
{
...
...
@@ -384,7 +384,7 @@
title
:
data
.
reportTitle
,
desc
:
this
.
$t
(
"shareInfo.industryReportZy"
),
img
:
this
.
lang
==
1
?
(
this
.
frontImgUrl
+
"/public/industryReportShareZh.jpg"
)
:
(
this
.
frontImgUrl
+
"/public/industryReportShareEn.jpg"
),
link
:
document
.
location
.
href
+
"&rDeviceId="
+
this
.
publicFun
.
getCookie
(
"getGuid32"
)
+
"&rEmpId="
+
(
this
.
userInfo
?
this
.
userInfo
.
empId
:
undefined
)
+
"&rTargetType="
link
:
(
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#/industryReportDetail"
)
+
"?id="
+
this
.
currentData
.
reportId
+
"&rDeviceId="
+
this
.
publicFun
.
getCookie
(
"getGuid32"
)
+
"&rEmpId="
+
(
this
.
userInfo
?
this
.
userInfo
.
empId
:
undefined
)
+
"&rTargetType="
}
if
(
Object
.
keys
(
this
.
configVal
).
length
!=
0
)
{
this
.
isShare
=
true
;
...
...
@@ -393,7 +393,7 @@
}
var
that
=
this
;
if
(
this
.
currentData
)
{
var
url
=
document
.
location
.
href
;
var
url
=
(
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#/industryReportDetail"
)
+
"?id="
+
this
.
currentData
.
reportId
;
let
dataValObj
=
{
title
:
this
.
currentData
.
reportTitle
,
// 分享标题 that.detailInfo.projectName
...
...
@@ -581,13 +581,14 @@
});
if
(
this
.
currentData
)
{
var
hrefUrl
=
(
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#/industryReportDetail"
)
+
"?id="
+
this
.
currentData
.
reportId
+
"&lang="
+
this
.
lang
;
let
dataVal
=
{
title
:
that
.
currentData
.
reportTitle
,
// 分享标题
desc
:
this
.
$t
(
"shareInfo.industryReportZy"
),
// 分享描述
link
:
document
.
location
.
href
+
"&rDeviceId="
+
that
.
publicFun
.
getCookie
(
"getGuid32"
)
+
"&rEmpId="
+
(
that
.
userInfo
?
that
.
userInfo
.
empId
:
undefined
)
+
"&rTargetType=1"
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
link
:
hrefUrl
+
"&rDeviceId="
+
that
.
publicFun
.
getCookie
(
"getGuid32"
)
+
"&rEmpId="
+
(
that
.
userInfo
?
that
.
userInfo
.
empId
:
undefined
)
+
"&rTargetType=1"
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl
:
this
.
lang
==
1
?
(
this
.
frontImgUrl
+
"/public/industryReportShareZh.jpg"
)
:
(
this
.
frontImgUrl
+
"/public/industryReportShareEn.jpg"
),
// 分享图标
...
...
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