微信公开课
微信公开课小程序热门讨论关于「wxgetShareInfo总是失败,返回错误42」的小程序开发问题
补充:wxgetShareInfo总是失败,返回错误42,appjsApp({globalData:{shareTicket:,openGid:},onLaunch:fun
展开:问题模块框架类型问题类型API组件名称终端类型微信版本基础库版本API和组件小程序BugwxgetShareInfo工具653240appjsApp({globalData:{shareTicket:,openGid:},onLaunch:function(options){},onShow:function(options){letthat=thisif(options&&optionsscene==1044){thatglobalDatashareTicket=optionsshareTicket}consolelog(onShowoptions=+JSONstringify(options))},getShareTiket:function(cb){letthat=this展示本地存储能力if(thatglobalDatashareTicket){wxgetShareInfo({shareTicket:thatglobalDatashareTicket,success:function(res){consolelog(getShareTiketshareTicket+JSONstringify(res))letjs_encryptedData=resencryptedDataletjs_iv=resivwxlogin({success:function(res){letjs_code=rescodeconsolelog(code+js_code)wxrequest({url:xxxxxxxx,method:POST,data:{code:js_code,appId:xxxxx,encryptedData:js_encryptedData,iv:js_iv},success:function(res){thatglobalDataopenGid=resdataopenGIdconsolelog(getShareTiketopenGid+thatglobalDataopenGid)typeofcb==function&&cb(thatglobalData)},fail:function(err){consolelog(getShareTiketerr+JSONstringify(err))}})}})},fail:function(res){consolelog(res)},complete:function(res){consolelog(res)}})}else{consolelog(不存在shareTicket)}}})代码片段https:developersweixinqqcomsJ0kBS5mR7g4J即速小程序:使用你的代码片段,是可以获取的啊:为什么我这里一直是fail呢,跟网络环境有关系:大哥能不能加个微信请教一下
更多有关「wxgetShareInfo总是失败,返回错误42」的讨论可以前往微信公开课小程序参与互动哦!了解更多
方法1:微信扫描微信公开课小程序码即可订阅热门讨论「wxgetShareInfo总是失败,返回错误42」
方法2:微信搜索微信公开课小程序名称进入,即可订阅热门讨论「wxgetShareInfo总是失败,返回错误42」
方法3:微信网页访问即速商店,长按识别微信公开课小程序码即可订阅热门讨论「wxgetShareInfo总是失败,返回错误42」
微信公开课小程序热门讨论「wxgetShareInfo总是失败,返回错误42」由微信公开课原创摘录于微信小程序商店shop.jisuapp.cn,转载请注明出处。
微信公开课热门讨论「wxgetShareInfo总是失败,返回错误42」由微信公开课开发者向微信用户提供,并对本服务内容、数据资料及其运营行为等真实性、合法性及有效性承担全部责任。