import Taro, { Component } from '@tarojs/taro';
import { View, Button } from '@tarojs/components';

class Index extends Component {
  componentDidMount() {
  }
  // 分享当前页面
  onShareAppMessage() {
    return {
      title: '分享标题',
      path: '/pages/index', // 路由路径
      imageUrl: '分享图片链接' // 可选,分享的图片
    };
  }
    //分享到朋友圈
  onShareTimeline() {
    return {
      title: '分享标题',
      query: 'from=shareTimeline' // 可选的查询参数
    };
  }

  render() {
    return (
      <View className='index'>
      </View>
    );
  }
}

export default Index;

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐