小程序分享到朋友圈onShareTimeline如何指定转发路径?

小程序 文章 2020-08-28 19:01 2337 0 全屏看文

AI助手支持GPT4.0

小程序分享到朋友圈onShareTimeline如何指定转发路径?How to specify the forwarding path for sharing the Mini Program to Moments onShareTimeline?

小程序分享到朋友圈onShareTimeline如何指定转发路径?

使用了下面的代码段分享到朋友圈的小程序,从朋友圈点击了以后并没有跳转到/page/user页面,而是到了分享的页面,这样写有没有问题?不知道该怎么解决了

onShareTimeline: function (res) {    if (res.from === 'menu') {      // 来自页面内转发按钮      console.log(res.target)    }    return {      title: '自定义转发标题',      path: '/page/user?id=123'    }  }使用

The following code snippet is used to share the app with the circle of friends. After clicking from the circle of friends, it does not jump to the / page / user page, but to the shared page. Is there any problem with this? I don't know how to solve the problem. Onshare timeline: function (RES) {if( res.from ==='Menu ') {/ / from on page forward button console.log ( res.target )Use '{user ID'} to forward

回答:

Admin²⁰²⁰:

目前不支持自定义页面转发

path参数没有,有用的是query参数

min:那query上可以指定转发路径吗
Admin²⁰²⁰:query只能指定参数如do=ok¶m=1111,不能指定页面。
生活教会我长大:

path不可以指定路径,你应该试过了,指定不了路径,只能带参数

path,相当于query

拾忆:

不支持path

min:那么query上可以指定转发路径吗
拾忆:不可以的,因为打开的单页模式是不允许有交互的。

-EOF-

AI助手支持GPT4.0