cgc非遗
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.
 
 
 
 

42 lines
1.2 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: 'CGC-ICH',
type: 0,
summary: "edewdewdewf",
imageUrl: "https://static.ticket.sz-trip.com/uploads/20250612/e022a1b7c8df621cb15082d0b0f5bba3.jpg"
}
},
onShareAppMessage() {
const pages = getCurrentPages(); // 获取加载的页面
const view = pages[pages.length - 1]; // 获取当前页面的对象
let url = '';
if (view.options.url) {
url = view.options.url;
} else {
url = uni.getStorageSync('webUrl');
}
console.log(111,url,`${view.route}?url=${url}`)
return {
title: 'CGC-ICH', // 分享的名称
path: `${view.route}?url=${url}`, // 将 url 作为参数传递
imageUrl: "https://static.ticket.sz-trip.com/uploads/20250612/e022a1b7c8df621cb15082d0b0f5bba3.jpg",
mpId: 'wx9d68934300b1fe90' // 此处配置微信小程序的 AppId
};
}
}