<%
    if(typeof userInfo =='undefined'){
%>
<a href="<%= 'http://www.duowan.com/mlogin/?calbackUrl='+encodeURIComponent(location.href) %>" class="user-icon default-user-icon"></a>
<% }else{ %>

<a href="#" class="user-icon">
     <img src="<%= userInfo.avatar %>" onerror="this.onerror=null;this.src='http://att.bbs.duowan.com/avatar/noavatar_small.jpg'" />
</a>
<% } %>