求教大佬,通过plus方法做分享功能,在Hbuild测试还有ios上都能检测到QQ,也可以成功分享,但是安卓打完包就不行,获取不到QQ对象。怎么解决
// 更新分享列表
var ss = this.shares['weixin'];
ss && ss.nativeClient && (
this.shareBts.push({
title: '微信好友',
s: ss,
x: 'WXSceneSession',
name: 'wx_friend'
}),
this.shareBts.push({
title: '微信朋友圈',
s: ss,
x: 'WXSceneTimeline',
name: 'wx_pyq'
}));
ss = this.shares['qq'];
ss && ss.nativeClient && this.shareBts.push({
title: 'QQ',
s: ss,
name: 'qq'
});
ss = this.shares['sinaweibo'];
ss && ss.nativeClient && this.shareBts.push({
title: '新浪微博',
s: ss,
name: 'weibo'
});
莫逖
- 发布:2020-04-10 17:09
- 更新:2021-01-03 11:40
- 阅读:664
通过plus.share在安卓上无法获取到QQ
分类:HTML5+
2 个回复
莫逖 (作者)
代码如下 求教大佬解决方案 困扰很久了
updateSerivces() {
var that=this;
plus.share.getServices(function (s) {
that.outLine(JSON.stringify(s))
// let data=JSON.parse('[{"id":"qq","description":"QQ","authenticated":true,"nativeClient":true},{"id":"tencentweibo","description":"腾讯微博","authenticated":false,"accessToken":"","nativeClient":false},{"id":"weixin","description":"微信","authenticated":true,"nativeClient":true},{"id":"sinaweibo","description":"新浪微博","authenticated":true,"accessToken":"2.00unFNwGnpUszDe30d82130c03sNjy","nativeClient":true}]')
// that.shares = {};
// for (var i in data) {
// var t = data[i];
// that.shares[t.id] = t;
// }
2***@qq.com
一样的问题,真机调试都正常,我还有个跳转到小程序上也是一样的情况,请问解决了吗