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
f0a27950
Commit
f0a27950
authored
Mar 05, 2020
by
zhangyanni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ceshi
parent
ab90494d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
97 deletions
+5
-97
detail.vue
src/views/mobile/activityApply/detail.vue
+5
-97
No files found.
src/views/mobile/activityApply/detail.vue
View file @
f0a27950
...
...
@@ -53,12 +53,7 @@
<qrCmpt
:url=
"url"
@
sendVisible=
"isVueQrVisible"
></qrCmpt>
</div>
<div
class=
"wechatShare"
v-if=
"popupVisible"
>
<mt-popup
v-model=
"popupVisible"
position=
"bottom"
>
<el-button
@
click=
"handleShareFriend"
>
分享给好友
</el-button>
<el-button
@
click=
"handleShareFriendSquare"
>
分享到朋友圈
</el-button>
</mt-popup>
<shareCmpt
:detailInfo=
"detailInfo"
></shareCmpt>
</div>
</div>
</
template
>
...
...
@@ -68,6 +63,7 @@
import
breadTop
from
'../../../components/mobile/breadTop'
;
import
qrCmpt
from
'../../../components/common/qrcodeCmpt'
;
import
publicFunc
from
'../../../common/public'
;
import
shareCmpt
from
'../../../components/shareCmpt'
;
// import wx from 'weixin-jsapi';
import
api
from
'./api'
;
import
{
Toast
,
Popup
}
from
'mint-ui'
;
...
...
@@ -77,7 +73,8 @@
breadTop
,
applyCmpt
,
applyProCmpt
,
qrCmpt
qrCmpt
,
shareCmpt
},
data
(){
return
{
...
...
@@ -200,9 +197,7 @@
//分享
handleOpreation
(){
this
.
shareFunc
();
// this.popupVisible = true;
this
.
popupVisible
=
true
;
// this.vueQrVisible = true;
// api.selectBasicParams().then(response => {
// if(response.code == 0) {
...
...
@@ -301,97 +296,10 @@
this
.
getDetailInfo
();
},
shareFunc
(){
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
:[
'onMenuShareAppMessage'
,
'onMenuShareTimeline'
]
// 需要使用的JS接口列表
});
wx
.
ready
(()
=>
{
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() //这是用户撤销后重新执行第一步验证签名的方法名 根据自己的命名写
}
})
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()
}
})
})
}
else
{
this
.
$toast
(
res
.
msg
);
}
}).
catch
((
err
)
=>
{
this
.
$toast
(
err
);
})
}
},
mounted
(){
this
.
getDetailInfo
();
// this.shareFunc();
}
}
</
script
>
...
...
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