遵循以下Branch.Io文档(https://dev.branch.io/features/referral-programs/guide/cordova/),我实现了以下代码来获取当前用户的奖励积分余额:
此代码返回rewards =0
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);
});但这应该有一个功劳。下面的代码正确地返回了它:
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文档/实现有问题?
发布于 2016-08-01 23:57:46
Alex来自Branch here:这看起来在我们的Cordova SDK中从来没有正确实现过,但好消息是我们昨晚合并了一个修复!NPM模块应该会在今天晚些时候更新。
https://stackoverflow.com/questions/38654869
复制相似问题