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
2806e4ad
Commit
2806e4ad
authored
Mar 05, 2020
by
zhangyanni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ceshi
parent
100abb00
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
53 deletions
+53
-53
.eslintrc.js
.eslintrc.js
+2
-2
detail.vue
src/views/mobile/activityApply/detail.vue
+51
-51
No files found.
.eslintrc.js
View file @
2806e4ad
globals
:
{
wx
:
true
},
globals
:
{
wx
:
true
}
\ No newline at end of file
\ No newline at end of file
src/views/mobile/activityApply/detail.vue
View file @
2806e4ad
...
@@ -236,90 +236,90 @@
...
@@ -236,90 +236,90 @@
this
.
detailInfo
.
shareTitle
=
this
.
detailInfo
.
channelTitle
;
this
.
detailInfo
.
shareTitle
=
this
.
detailInfo
.
channelTitle
;
this
.
detailInfo
.
url
=
document
.
location
.
href
;
this
.
detailInfo
.
url
=
document
.
location
.
href
;
this
.
config
=
res
.
result
;
this
.
config
=
res
.
result
;
wx
.
config
({
wx
.
miniProgram
.
getEnv
(
function
(
res
)
{
debug
:
true
,
// 是否开启调试模式
appId
:
res
.
result
.
appId
,
//appid
timestamp
:
res
.
result
.
timestamp
,
// 时间戳
nonceStr
:
res
.
result
.
nonceStr
,
// 随机字符串
signature
:
res
.
result
.
signature
,
// 签名
jsApiList
:[
'onMenuShareAppMessage'
,
'onMenuShareTimeline'
]
// 需要使用的JS接口列表
if
(
res
.
miniprogram
){
wx
.
miniProgram
.
postMessage
({
data
:
that
.
detailInfo
})
});
// true代表在小程序里
wx
.
ready
(
function
(){
wx
.
onMenuShareAppMessage
({
title
:
'您的好友邀请您参加'
+
that
.
detailInfo
.
channelTitle
,
// 分享标题
}
else
{
wx
.
config
({
debug
:
true
,
// 是否开启调试模式
appId
:
res
.
result
.
appId
,
//appid
timestamp
:
res
.
result
.
timestamp
,
// 时间戳
nonceStr
:
res
.
result
.
nonceStr
,
// 随机字符串
signature
:
res
.
result
.
signature
,
// 签名
jsApiList
:[
'onMenuShareAppMessage'
,
'onMenuShareTimeline'
]
// 需要使用的JS接口列表
desc
:
that
.
detailInfo
.
channelTitle
,
// 分享描述
link
:
document
.
location
.
href
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
});
wx
.
ready
(
function
(){
wx
.
onMenuShareAppMessage
({
imgUrl
:
require
(
"../../../assets/img/bigBusinessLogo@2x.png"
),
// 分享图标
title
:
'您的好友邀请您参加'
+
that
.
detailInfo
.
channelTitle
,
// 分享标题
type
:
''
,
// 分享类型,music、video或link,不填默认为link
desc
:
that
.
detailInfo
.
channelTitle
,
// 分享描述
dataUrl
:
''
,
// 如果type是music或video,则要提供数据链接,默认为空
link
:
document
.
location
.
href
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
success
:
function
()
{
imgUrl
:
require
(
"../../../assets/img/bigBusinessLogo@2x.png"
),
// 分享图标
// // 用户确认分享后执行的回调函数
type
:
''
,
// 分享类型,music、video或link,不填默认为link
//
// _this.$router.push({path:'/me',query:{}})
},
dataUrl
:
''
,
// 如果type是music或video,则要提供数据链接,默认为空
cancel
:
function
()
{
success
:
function
()
{
// 用户取消分享后执行的回调函数
// // 用户确认分享后执行的回调函数
//
// _this.$router.push({path:'/me',query:{}})
// alert('cancel')
},
// _this.wxShare() //这是用户撤销后重新执行第一步验证签名的方法名 根据自己的命名写
cancel
:
function
()
{
}
// 用户取消分享后执行的回调函数
}
)
// alert('cancel'
)
wx
.
onMenuShareTimeline
({
// _this.wxShare() //这是用户撤销后重新执行第一步验证签名的方法名 根据自己的命名写
title
:
'您的好友邀请您参加'
+
that
.
detailInfo
.
channelTitle
,
// 分享标题
}
link
:
document
.
location
.
href
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
})
imgUrl
:
require
(
"../../../assets/img/bigBusinessLogo@2x.png"
),
// 分享图标
wx
.
onMenuShareTimeline
({
success
:
function
()
{
title
:
'您的好友邀请您参加'
+
that
.
detailInfo
.
channelTitle
,
// 分享标题
// 用户确认分享后执行的回调函数
link
:
document
.
location
.
href
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
// _this.$router.push({path:'/me',query:{}})
imgUrl
:
require
(
"../../../assets/img/bigBusinessLogo@2x.png"
),
// 分享图标
},
success
:
function
()
{
cancel
:
function
()
{
// 用户确认分享后执行的回调函数
// 用户取消分享后执行的回调函数
// _this.$router.push({path:'/me',query:{}})
// _this.wxShare()
},
}
cancel
:
function
()
{
})
// 用户取消分享后执行的回调函数
});
wx
.
miniProgram
.
getEnv
(
function
(
res
)
{
if
(
res
.
miniprogram
){
// _this.wxShare()
wx
.
miniProgram
.
postMessage
({
data
:
that
.
detailInfo
})
// true代表在小程序里
}
}
else
{
})
});
that
.
dialogVisible
=
true
;
that
.
dialogVisible
=
true
;
that
.
popupVisible
=
false
;
that
.
popupVisible
=
false
;
//false代表在公众号里
//false代表在公众号里
...
...
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