let shareName = {
'0': '微信',
'1': '朋友圈',
'2': '新浪微博',
'3': ' QQ',
'4': 'QQ空间'
};

render(){
//分享
YztApp.configureShare({
"title": encodeURIComponent(this.props.title),
"content": encodeURIComponent(
`${this.props.text && this.props.text.replace(/<[^>]+>/g, "").substring(0, 40)}...`),
"href": window.location.href,
"imgUrl": ''
}, true,
function (data) {
App.call(['getPeasForSharing'], null, null, {'activeId': 'ACT16062414010469018'});
YztApp.ubt('财经快讯', '选择分享渠道_点击_渠道', {'渠道': shareName[data.type], '分享结果': '成功'});
}, function (data) {
data = JSON.parse(data);
YztApp.ubt('财经快讯', '选择分享渠道_点击_渠道', {'渠道': shareName[data.type], '分享结果': '失败'});
});
}
<InputBox
onPressShare={() => {YztApp.callShareAllFunc();}}
/>
 

相关文章:

  • 2021-06-08
  • 2021-08-29
  • 2022-12-23
  • 2021-08-03
  • 2021-07-14
猜你喜欢
  • 2022-12-23
  • 2021-05-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-20
  • 2021-06-24
相关资源
相似解决方案