首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >带有Cordova的Branch.Io Branch.loadRewards()无结果

带有Cordova的Branch.Io Branch.loadRewards()无结果
EN

Stack Overflow用户
提问于 2016-07-29 17:10:03
回答 1查看 99关注 0票数 0

遵循以下Branch.Io文档(https://dev.branch.io/features/referral-programs/guide/cordova/),我实现了以下代码来获取当前用户的奖励积分余额:

此代码返回rewards =0

代码语言:javascript
复制
Branch.loadRewards().then(function (rewards) {
  console.log("rew", rewards);
  // will return the balance of the current user's credits
  $scope.credits = rewards['beer'];
}).catch(function (err) {
  console.error(err);
});

但这应该有一个功劳。下面的代码正确地返回了它:

代码语言:javascript
复制
Branch.creditHistory().then(function (credits) {
  console.log("cred", credits);
  // will return the balance of the current user's credits
}).catch(function (err) {
  console.error(err);
});

是我的代码错误,还是Branch.Io cordova文档/实现有问题?

EN

回答 1

Stack Overflow用户

发布于 2016-08-01 23:57:46

Alex来自Branch here:这看起来在我们的Cordova SDK中从来没有正确实现过,但好消息是我们昨晚合并了一个修复!NPM模块应该会在今天晚些时候更新。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38654869

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档