(Instill Ene // 登录
Topbar.user.init(document.getElementById('SI_User'),{
// entry 默认为 account,各频道不一样,可向通行证@龚翼 申请
entry:'astro',
// 登录成功
login_success:function(){
window.__SinaFeedCard__.onLoginSuccess(SINA_OUTLOGIN_LAYER.getSinaCookie().uid, 30002);
//check weibo
$("#user_nick").html(SINA_OUTLOGIN_LAYER.getSinaCookie().nick);
$.ajax({
'url': 'http://api.sina.com.cn/weibo/2/friendships/batch_exists.json',
'data': {
'source': '3659039333',
'uids': '1719220997'
},
'dataType': 'jsonp',
'success': function (obj) {
if (obj.result.status.code == 0) {
/*if (obj.result.data == null) {*/
if (obj.result.data == null || obj.result.data.length == 0) {
return;
}
if (obj.result.data[0].result!=0) {
$("#followBtn").replaceWith($('已关注'));
}
}
}
});
},
// 退出成功
logout_success:function(){
},
// 获取微博信息
getWeiboInfo:function(info){
// console.log(info);
}
});
// 显示登录框可使用以下方法,当然这个方法需要在登录完成初始化之后才起作用的
// Topbar.user.showLoginLayer();
// 更多方法,可使用 SINA_USER_PANEL 及 SINA_OUTLOGIN_LAYER
})(window.__SinaTopBar__);