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
35b8fd8b
Commit
35b8fd8b
authored
Mar 04, 2020
by
zhangyanni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ceshi
parent
4207440b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
89 deletions
+52
-89
detail.vue
src/views/mobile/activityApply/detail.vue
+52
-89
No files found.
src/views/mobile/activityApply/detail.vue
View file @
35b8fd8b
...
...
@@ -201,6 +201,23 @@
//分享
handleOpreation
(){
this
.
popupVisible
=
true
;
// this.vueQrVisible = true;
// api.selectBasicParams().then(response => {
// if(response.code == 0) {
// this.url = response.result.websitePrefix +"#/activitydetail?id="+this.$route.query.id;
// } else {
// this.$toast(response.msgCode);
// }
// }).catch(error => {
// console.log("提交出错");
// return false;
// });
},
//分享给好友
handleShareFriendSquare
(){
var
that
=
this
;
let
params
=
{
appUrl
:
window
.
location
.
href
//document.location.href.split("#")[0]+"/?#"+document.location.href.split("#")[1]
...
...
@@ -214,14 +231,11 @@
nonceStr
:
res
.
result
.
nonceStr
,
// 随机字符串
signature
:
res
.
result
.
signature
,
// 签名
jsApiList
:[
'onMenuShareTimeline'
,
'onMenuShareAppMessage'
]
// 需要使用的JS接口列表
});
this
.
popupVisible
=
true
;
wx
.
ready
(()
=>
{
...
...
@@ -263,6 +277,41 @@
//分享到朋友圈
})
}
else
{
this
.
$toast
(
res
.
msg
);
}
}).
catch
((
err
)
=>
{
this
.
$toast
(
err
);
})
},
//分享到朋友圈
handleShareFriend
(){
var
that
=
this
;
let
params
=
{
appUrl
:
window
.
location
.
href
//document.location.href.split("#")[0]+"/?#"+document.location.href.split("#")[1]
};
api
.
getConfigAxios
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
==
0
){
wx
.
config
({
debug
:
true
,
// 是否开启调试模式
appId
:
res
.
result
.
appId
,
//appid
timestamp
:
res
.
result
.
timestamp
,
// 时间戳
nonceStr
:
res
.
result
.
nonceStr
,
// 随机字符串
signature
:
res
.
result
.
signature
,
// 签名
jsApiList
:[
'onMenuShareTimeline'
]
// 需要使用的JS接口列表
});
wx
.
ready
(()
=>
{
//分享到朋友圈
wx
.
onMenuShareTimeline
({
title
:
'您的好友邀请您参加'
+
that
.
detailInfo
.
channelTitle
,
// 分享标题
...
...
@@ -296,92 +345,6 @@
}).
catch
((
err
)
=>
{
this
.
$toast
(
err
);
})
// this.vueQrVisible = true;
// api.selectBasicParams().then(response => {
// if(response.code == 0) {
// this.url = response.result.websitePrefix +"#/activitydetail?id="+this.$route.query.id;
// } else {
// this.$toast(response.msgCode);
// }
// }).catch(error => {
// console.log("提交出错");
// return false;
// });
},
//分享给好友
handleShareFriendSquare
(){
var
that
=
this
;
wx
.
onMenuShareAppMessage
({
title
:
'您的好友邀请您参加'
+
that
.
detailInfo
.
channelTitle
,
// 分享标题
desc
:
that
.
detailInfo
.
channelTitle
,
// 分享描述
link
:
document
.
location
.
href
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl
:
require
(
"../../../assets/img/bigBusinessLogo@2x.png"
),
// 分享图标
type
:
''
,
// 分享类型,music、video或link,不填默认为link
dataUrl
:
''
,
// 如果type是music或video,则要提供数据链接,默认为空
success
:
function
()
{
// // 用户确认分享后执行的回调函数
//
// _this.$router.push({path:'/me',query:{}})
},
cancel
:
function
()
{
// 用户取消分享后执行的回调函数
// alert('cancel')
// _this.wxShare() //这是用户撤销后重新执行第一步验证签名的方法名 根据自己的命名写
}
})
},
//分享到朋友圈
handleShareFriend
(){
var
that
=
this
;
wx
.
ready
(()
=>
{
//分享到朋友圈
wx
.
onMenuShareTimeline
({
title
:
'您的好友邀请您参加'
+
that
.
detailInfo
.
channelTitle
,
// 分享标题
link
:
document
.
location
.
href
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl
:
require
(
"../../../assets/img/bigBusinessLogo@2x.png"
),
// 分享图标
success
:
function
()
{
// 用户确认分享后执行的回调函数
// _this.$router.push({path:'/me',query:{}})
},
cancel
:
function
()
{
// 用户取消分享后执行的回调函数
// _this.wxShare()
}
})
})
},
//二维码
...
...
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