You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

40 lines
1.1 KiB

export const myMixins ={
onLoad(option) {
console.log('option',option)
if(option && option.wechat_qrcode){
uni.setStorageSync('wechat_qrcode',option.wechat_qrcode)
}
// 分享
uni.showShareMenu({
withShareTicket: true,
//设置下方的Menus菜单,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
menus: ["shareAppMessage", "shareTimeline"]
})
},
// 分享到朋友圈
onShareTimeline() {
return {
title: '吴优游',
type: 0,
summary: "edewdewdewf",
imageUrl: "https://static.ticket.sz-trip.com/dongtai/images/index/share.jpg"
}
},
onShareAppMessage() {
let app = getApp();
const pages = getCurrentPages() //获取加载的页面
const view = pages[pages.length - 1] //获取当前页面的对象
console.log(view, 'view')
if (res.from === 'button') { // 来自页面内分享按钮
}
return {
title: '吴优游', //分享的名称
path: `${view.route}`,
imageUrl: "https://static.ticket.sz-trip.com/dongtai/images/index/share.jpg",
mpId: 'wx9e7d5346a3b09f56' //此处配置微信小程序的AppId
}
}
}