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
994 B
40 lines
994 B
|
|
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: ""
|
|
}
|
|
},
|
|
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: "",
|
|
mpId: 'wxcb555ab174f22ec9' //此处配置微信小程序的AppId
|
|
}
|
|
}
|
|
}
|