收藏
回答

uniapp写的微信小程序,onShareAppMessage分享指定页面不生效?

onShareAppMessage 写的路由没有生效,分享进入的页面还是发出分享的当前页,没有走这个路径,请问这是什么问题?


onShareAppMessage (e) {
      let that = this;
      this.isHide = false
      // #ifdef MP-WEIXIN
        if (e.from === "button") {
          return {
            title: "快来玩天天阿瓦隆,好友送你大礼包!", //弹出框提示标题
            page: `/pages-game/gameB/game?zId=${that.roomId}&gId=${that.gameId}`, //弹出框转发的页面
            imageUrl: "/static/home/awalong.jpg", //设置弹出框显示页面图片(可自定义)
          };
        } else {
          return {
            title: "快来玩天天阿瓦隆,好友送你大礼包!", //弹出框提示标题
            page: `/pages-game/gameB/game?zId=${that.roomId}&gId=${that.gameId}`, //弹出框转发的页面
            imageUrl: "/static/home/awalong.jpg", //设置弹出框显示页面图片(可自定义)
          };
        }
        // #endif
    },


回答关注问题邀请回答
收藏

1 个回答

  • Hlxuan.
    Hlxuan.
    06-06

    转发路径的字段名是 path 。

    06-06
    有用
    回复 1
    • 🧐 🧐
      🧐 🧐
      06-06
      哈哈
      06-06
      回复
登录 后发表内容