uniapp onShareAppMessage里面请求后调分享(微信小程序)

  onShareAppMessage() {
    const promise = new Promise(resolve => {
      request({
        api: '请求名',
        method: 'POST',
        data: {
          "data": {}
        }
      }).then(res => {
        resolve({
          title: '你要的标题',
          path: '/页面?code=' + res.code
        })
      })
    })
    return {promise}
  }

 

posted @ 2023-05-31 14:58  zhang_you_wu  阅读(831)  评论(0)    收藏  举报