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
c9f92d2a
Commit
c9f92d2a
authored
Mar 26, 2021
by
zhangyanni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分享朋友圈
parent
58b2cc60
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
80 additions
and
10 deletions
+80
-10
list.vue
src/views/mobile/activityApply/list.vue
+80
-10
No files found.
src/views/mobile/activityApply/list.vue
View file @
c9f92d2a
...
...
@@ -1091,16 +1091,7 @@
//分享
handleShare
(
data
)
{
this
.
currentTopic
=
data
;
let
url
=
document
.
location
.
origin
+
"/topicDetails?id="
+
data
.
topicId
;
this
.
configVal
=
{
title
:
data
.
topicTitle
,
desc
:
data
.
topicDescription
,
img
:
data
.
topicCover
,
link
:
url
+
"&rDeviceId="
+
this
.
publicFun
.
getCookie
(
"getGuid32"
)
+
"&rEmpId="
+
(
this
.
userInfo
?
this
.
userInfo
.
empId
:
undefined
)
+
"&rTargetType="
}
if
(
Object
.
keys
(
this
.
configVal
).
length
!=
0
)
{
this
.
isShare
=
true
;
}
this
.
configFunc
(
data
);
},
showIntegralFunc
(
data
){
...
...
@@ -1177,6 +1168,85 @@
}
},
configFunc
(
data
)
{
let
params
=
{
appUrl
:
window
.
location
.
href
},
that
=
this
;
commonApi
.
getConfigAxios
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
==
0
)
{
wx
.
config
({
debug
:
false
,
// 是否开启调试模式
appId
:
res
.
result
.
appId
,
//appid
timestamp
:
res
.
result
.
timestamp
,
// 时间戳
nonceStr
:
res
.
result
.
nonceStr
,
// 随机字符串
signature
:
res
.
result
.
signature
,
// 签名
jsApiList
:
[
'onMenuShareAppMessage'
,
'onMenuShareTimeline'
]
// 需要使用的JS接口列表
});
let
dataVal
;
let
url
=
document
.
location
.
origin
+
"/topicDetails?id="
+
data
.
topicId
;
if
(
data
)
{
dataVal
=
{
title
:
this
.
currentTopic
.
topicTitle
,
// 分享标题
desc
:
this
.
currentTopic
.
topicDescription
,
// 分享描述
link
:
url
+
"&rDeviceId="
+
that
.
publicFun
.
getCookie
(
"getGuid32"
)
+
"&rEmpId="
+
(
that
.
userInfo
?
that
.
userInfo
.
empId
:
undefined
)
+
"&rTargetType=1"
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl
:
this
.
topicInfo
.
topicCover
,
// 分享图标
trigger
:
function
(){
setTimeout
(
function
(){
that
.
isHasGiveIntegral
(
"ITV004"
)
},
4000
)
},
success
:
function
()
{
// 用户确认分享后执行的回调函数
// _this.$router.push({path:'/me',query:{}})
},
cancel
:
function
()
{
// 用户取消分享后执行的回调函数
// _this.wxShare()
}
};
setTimeout
(
function
()
{
wx
.
ready
(
function
()
{
wx
.
onMenuShareAppMessage
(
dataVal
)
wx
.
onMenuShareTimeline
(
dataVal
)
})
},
1000
)
this
.
configVal
=
{
title
:
data
.
topicTitle
,
desc
:
data
.
topicDescription
,
img
:
data
.
topicCover
,
link
:
url
+
"&rDeviceId="
+
this
.
publicFun
.
getCookie
(
"getGuid32"
)
+
"&rEmpId="
+
(
this
.
userInfo
?
this
.
userInfo
.
empId
:
undefined
)
+
"&rTargetType="
}
if
(
Object
.
keys
(
this
.
configVal
).
length
!=
0
)
{
this
.
isShare
=
true
;
}
}
}
else
{
this
.
$toast
(
res
.
msg
);
}
}).
catch
((
err
)
=>
{
this
.
$toast
(
err
);
})
},
},
mounted
()
{
// ES6 标准
...
...
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