onShareAppMessage传值只能写死的吗?

小程序 文章 2021-04-02 15:22 391 0 全屏看文

AI助手支持GPT4.0

onShareAppMessage传值只能写死的吗?Can the onShareAppMessage pass value only be hard-coded?

onShareAppMessage传值只能写死的吗?

onShareAppMessage传值只能写死的吗

Can onshareappmessage only be written dead

回答:

相濡以沫:

这样获取不到shareId

shareId写死 比如 shareId = 1就可以获取到

yy:这个api里面没有this,所有把你要传的参数提前赋值一个全局变量或者用缓存也可以了。
yy:

用全局变量和缓存。

相濡以沫:不行  都试过了
Brother斌🎈:

可以动态啊 onShareAppMessage里的return之前配置就行

-EOF-

AI助手支持GPT4.0