onShareAppMessage分享页面获取不到参数?

小程序 文章 2021-03-17 11:41 751 0 全屏看文

AI助手支持GPT4.0

onShareAppMessage分享页面获取不到参数?Can't get the parameters on the onShareAppMessage sharing page?

onShareAppMessage分享页面获取不到参数?
onShareAppMessage(res) {			return {				title:'查看举报信息',				path:'/pages/search/share?id='+this.optionId+'&type=1',			}

}

onLoad(options)里面拿不到参数怎么解决

Onshare appmessage (RES) {return {Title: 'view report information', path: '/ pages / search / share? Id ='+ this.optionId +'& type = 1',}} how to solve the problem that there is no parameter in onload (options)

回答:

Samuel.Schnappi:

打印onload的options没有的话,看看app.js 的onshow里能取到么

后天会更好:

是什么都没有呢? 还是id 拿不到

🇱:options是
🇱:undefined
Brother斌🎈:

实测拿得到 你有幻觉

🇱:第一次打开分享都没有,再打开一次就有了,一直有这个问题
Brother斌🎈:你代码写了别的东西影响到了吧,刚才拿你上面发的那段试是正常的,要不你就弄个可复现的代码片段类看看

-EOF-

AI助手支持GPT4.0