Skip to content
This repository has been archived by the owner on Dec 6, 2019. It is now read-only.

AV.push.js 132行缺少变量的声明 #44

Closed
wenzhihong2003 opened this issue Dec 1, 2015 · 4 comments
Closed

AV.push.js 132行缺少变量的声明 #44

wenzhihong2003 opened this issue Dec 1, 2015 · 4 comments

Comments

@wenzhihong2003
Copy link

id = tool.getId(); //132行
options.id = id;
engine.sendId(options, function(data) {
  tool.storage(itemName, id);
});
return id;

这里的 id缺少变量的声明吧, 要不然成为了一个全局变量了. 应改为 var id = tool.getId();

@wangxiao
Copy link
Contributor

wangxiao commented Dec 1, 2015

确实,非常感谢。
https://github.com/leancloud/js-push-sdk/pull/45/files

@wangxiao wangxiao closed this as completed Dec 1, 2015
@wenzhihong2003
Copy link
Author

👍 好快的速度. 这两天在狂看你们的文档. 谢谢, 做得真的不错. 减轻开发者不少工作量

@wenzhihong2003
Copy link
Author

问一下, 这个id也是可以由我们的应用自动来生成的吧. 比如在应用里我们想给系统里的每个用户在建立的时候就生成一个, 而不是每次打开浏览器时生成一个. (当然看代码, 知道这个id生成好后会存在localstore里)

@wangxiao
Copy link
Contributor

wangxiao commented Dec 1, 2015

暂时不支持用户自定义生成,但是可以获取。
在 av.push 的实例中,通过 pushObject.installationId 可以获取得到。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants