Commit 6b992d90 authored by spc's avatar spc

p

parent b932ec09
...@@ -43,9 +43,7 @@ import { onLoad, onShareAppMessage, onShareTimeline, onPageScroll } from "@dclou ...@@ -43,9 +43,7 @@ import { onLoad, onShareAppMessage, onShareTimeline, onPageScroll } from "@dclou
// 响应式数据 // 响应式数据
const statusBarHeight = ref(0) const statusBarHeight = ref(0)
const webviewUrl = ref('') const webviewUrl = ref('')
const pageTitle = ref('加载中...')
const share = ref(null) // 分享数据 const share = ref(null) // 分享数据
const pageOptions = ref({}) // 页面参数
// 获取用户store // 获取用户store
const userStore = useUserStore() const userStore = useUserStore()
...@@ -82,8 +80,10 @@ const getMessage = (e) => { ...@@ -82,8 +80,10 @@ const getMessage = (e) => {
} }
// 页面加载 // 页面参数接收
onMounted(async () => { onLoad(async (options) => {
console.log('页面参数:', options)
wx.showShareMenu({ wx.showShareMenu({
withShareTicket: true, withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline']// shareAppMessage表示“发送给朋友”按钮,shareTimeline表示“分享到朋友圈”按钮 menus: ['shareAppMessage', 'shareTimeline']// shareAppMessage表示“发送给朋友”按钮,shareTimeline表示“分享到朋友圈”按钮
...@@ -113,7 +113,7 @@ onMounted(async () => { ...@@ -113,7 +113,7 @@ onMounted(async () => {
const unionId = globalStore.unionId const unionId = globalStore.unionId
// 将 options 的所有参数原样作为查询参数传给 H5,并补齐 cuk // 将 options 的所有参数原样作为查询参数传给 H5,并补齐 cuk
const params = { ...(pageOptions.value || {}) } const params = { ...(options || {}) }
if (cuk && !params.cuk) params.cuk = cuk if (cuk && !params.cuk) params.cuk = cuk
// 添加用户信息参数 // 添加用户信息参数
if (openId && !params.openId) params.openId = openId if (openId && !params.openId) params.openId = openId
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment