Merge branch 'main' of http://123.207.203.228:3000/hejiale/flyx
This commit is contained in:
commit
c47bdf8d8b
|
|
@ -463,27 +463,30 @@ export default {
|
|||
if (res.status == 1) {
|
||||
let _data = res.data;
|
||||
wx.config({
|
||||
debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
|
||||
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
|
||||
appId: _data.appId,
|
||||
timestamp: _data.timestamp,
|
||||
nonceStr: _data.noncestr,
|
||||
signature: _data.signature,
|
||||
jsApiList: [
|
||||
'checkJsApi',
|
||||
'showMenuItems',
|
||||
'updateAppMessageShareData',
|
||||
'onMenuShareTimeline',
|
||||
]
|
||||
});
|
||||
wx.ready(function() {
|
||||
wx.checkJsApi({
|
||||
jsApiList: [
|
||||
'openAddress',
|
||||
'onMenuShareTimeline',
|
||||
],
|
||||
success: function(res) {
|
||||
if (link.indexOf('http:') < 0 && link.indexOf(
|
||||
'https:') < 0) {
|
||||
link = location.href.split('#')[0] + link;
|
||||
if (link.indexOf('http:') < 0 &&
|
||||
link.indexOf('https:') < 0) {
|
||||
link = location.href.split('#')[0] + "#" + link;
|
||||
}
|
||||
|
||||
// alert('a')
|
||||
wx.updateAppMessageShareData({
|
||||
title: title, // 分享标题
|
||||
desc: desc, // 分享描述
|
||||
|
|
@ -493,6 +496,27 @@ export default {
|
|||
// 设置成功
|
||||
}
|
||||
})
|
||||
uni.setClipboardData({
|
||||
data: `${link}`
|
||||
})
|
||||
// alert('a1')
|
||||
// wx.showMenuItems({
|
||||
// menuList: [
|
||||
// "menuItem:share:appMessage",
|
||||
// "menuItem:share:timeline",
|
||||
// "menuItem:share:qq",
|
||||
// ] // 要显示的菜单项,所有menu项见附录3
|
||||
// });
|
||||
// alert('a3')
|
||||
// wx.onMenuShareTimeline({
|
||||
// title: title, // 分享标题
|
||||
// link: link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
||||
// imgUrl: image, // 分享图标
|
||||
// success: function() {
|
||||
// // 用户点击了分享后执行的回调函数
|
||||
// alert('用户点击了分享后执行的回调函数')
|
||||
// }
|
||||
// })
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user