Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onShareAppMessage 无效 #7936

Closed
wreido opened this issue Oct 30, 2020 · 1 comment
Closed

onShareAppMessage 无效 #7936

wreido opened this issue Oct 30, 2020 · 1 comment
Labels
duplicate This issue or pull request already exists F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@wreido
Copy link

wreido commented Oct 30, 2020

相关平台

微信小程序

复现仓库

https://github.com/wreido/seft/tree/master/yxgj-miniprogram-template-3.0.5
小程序基础库: 2.13.2
使用框架: React

复现步骤

onShareAppMessage() {
return {
title: '享受会员福利,解锁品质生活',
path: /pages/index/index,
imageUrl: 'https://yrymall-static.oss-cn-shenzhen.aliyuncs.com/yxgj-miniprogram/share/shareImage.jpg'
}
}

期望结果

右上角出现转发按钮,标题对应,路径对应,图片对应

实际结果

右上角没有转发按钮,调用Taro.showShareMenu()转发按钮可以出来,但是标题、路径、图片都不对。

环境信息

Taro CLI 3.0.15 environment info:
    System:
      OS: macOS 10.14.6
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.16.0 - /usr/local/bin/node
      Yarn: 1.9.4 - /usr/local/bin/yarn
      npm: 6.14.5 - /usr/local/bin/npm
    npmPackages:
      @tarojs/components: 3.0.15 => 3.0.15 
      @tarojs/mini-runner: 3.0.15 => 3.0.15 
      @tarojs/react: 3.0.15 => 3.0.15 
      @tarojs/runtime: 3.0.15 => 3.0.15 
      @tarojs/taro: 3.0.15 => 3.0.15 
      @tarojs/webpack-runner: 3.0.15 => 3.0.15 
      babel-preset-taro: 3.0.15 => 3.0.15 
      eslint-config-taro: 3.0.15 => 3.0.15 
      react: ^16.10.0 => 16.13.1 
      taro-ui: ^2.3.4 => 2.3.4 
    npmGlobalPackages:
      typescript: 3.6.3
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Oct 30, 2020
@Chen-jj Chen-jj added the duplicate This issue or pull request already exists label Oct 30, 2020
@wreido wreido closed this as completed Oct 30, 2020
@Chen-jj
Copy link
Contributor

Chen-jj commented Oct 30, 2020

Duplicate of #7232

3.1 改进,但最稳还是加配置:

// page.config.js
{
  // ...
  enableShareAppMessage: true
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

2 participants