|
|
@ -25,18 +25,21 @@ export const myMixins ={ |
|
|
|
const pages = getCurrentPages(); // 获取加载的页面
|
|
|
|
const view = pages[pages.length - 1]; // 获取当前页面的对象
|
|
|
|
let url = ''; |
|
|
|
if (view.options.url) { |
|
|
|
url = view.options.url; |
|
|
|
let shareParam = {} |
|
|
|
if (view.$page.fullPath) { |
|
|
|
url = view.options.fullPath; |
|
|
|
} else { |
|
|
|
url = uni.getStorageSync('webUrl'); |
|
|
|
} |
|
|
|
|
|
|
|
console.log(111,url,`${view.route}?url=${url}`) |
|
|
|
if (view.data && view.data.shareParam) { |
|
|
|
shareParam = view.data.shareParam |
|
|
|
} |
|
|
|
return { |
|
|
|
title: 'CGC-ICH', // 分享的名称
|
|
|
|
path: `${view.route}?url=${url}`, // 将 url 作为参数传递
|
|
|
|
path: `${view.$page.fullPath}`, // 将 url 作为参数传递
|
|
|
|
imageUrl: "https://cgc.js-dyyj.com/uploads/20250619/172a730c88bd8894dee1e64c703795eb.jpg", |
|
|
|
mpId: 'wx9d68934300b1fe90' // 此处配置微信小程序的 AppId
|
|
|
|
mpId: 'wx9d68934300b1fe90', // 此处配置微信小程序的 AppId
|
|
|
|
...shareParam |
|
|
|
}; |
|
|
|
} |
|
|
|
} |