4

作为小部件开发人员,我想根据登录 WireCloud 的用户在小部件中显示不同的信息。

小部件如何在加载时确定谁是登录 WireCloud 的用户?

4

1 回答 1

3

WireCloud provides support for accessing context information currently available through the MashupPlatform API. Currently WireCloud provides both the username and the full name of the user:

var username = MashupPlatform.context.get('username');
var realname = MashupPlatform.context.get('fullname');

Take a look into the "3.1.5. Accessing context information" section of the WireCloud's course @ FIWARE Academy for more info about how handle context information from widgets/operators.

于 2014-08-05T10:27:21.483 回答