[已删除]
[已删除]
  • 发布:2021-09-26 18:00
  • 更新:2021-09-26 20:41
  • 阅读:996

Share微信分享:-4 授权失败

分类:uni-app

想实现的功能:从APP端分享商品详情到微信聊天

原始代码:
shareGoods() {
uni.share({
provider: 'weixin',
scene: "WXSceneSession",
type: 5,
imageUrl: this.groupOrder.image,
title: this.groupOrder.groupName,
miniProgram: {
id: '原始id',
path: '/pages2/group/detail?type=' + this.groupOrder.type + '&groupId=' + this.groupOrder.groupId + '&teamId=' + this.groupOrder.groupTeamId,
type: 0,
webUrl: 'http://uniapp.dcloud.io'
},
success: ret => {
console.log(JSON.stringify(ret));
},
fail: function(err) {
console.log("fail:" + JSON.stringify(err));
}
});
}

报错信息:
fail:{"errMsg":"share:fail [Share微信分享:-4]授权失败, http://ask.dcloud.net.cn/article/287","errCode":-100,"code":-100}
模拟器用的雷电
hbuilder X版本:3.2.3.20210825

2021-09-26 18:00 负责人:无 分享
已邀请:
一点儿

一点儿

看我的。

uniShare(  
                            {  
                                content: {  
                                    //公共的分享参数配置  类型(type)、链接(herf)、标题(title)、summary(描述)、imageUrl(缩略图)  
                                    type: 0,  
                                    href: 'https://www.baidu.com/pages/a?id=' + _this.id + '&userid=' + this.vuex_user.id + '&gid=' + res.data.id,  
                                    title: _this.data.title,  
                                    summary: _this.data.desc,  
                                    imageUrl: _this.data.titlepic  
                                },  
                                menus: [  
                                    {  
                                        img: '/static/app-plus/sharemenu/wechatfriend.png',  
                                        text: '微信好友',  
                                        share: {  
                                            //当前项的分享参数配置。可覆盖公共的配置如下:分享到微信小程序,配置了type=5  
                                            provider: 'weixin',  
                                            scene: 'WXSceneSession'  
                                        }  
                                    },  
                                    {  
                                        img: '/static/app-plus/sharemenu/wechatmoments.png',  
                                        text: '微信朋友圈',  
                                        share: {  
                                            provider: 'weixin',  
                                            scene: 'WXSenceTimeline'  
                                        }  
                                    }  
                                ],  
                                cancelText: '取消分享'  
                            },  
                            e => {  
                                // 上传点击数  
                                this.$u.api.ArticleShare({ id: this.id }).then(res => {  
                                    console.log(res);  
                                });  
                            }  
                        );
  • [已删除] (作者)

    谢谢~

    2021-09-27 17:34

  • FungOi

    回复 l***@163.com: 请问你解决了吗?是什么原因阿?

    2022-05-13 15:58

该问题目前已经被锁定, 无法添加新回复