說明:用于獲取用戶詳情數(shù)據(jù)
使用方法:{% userDetail 變量名稱 with name="字段名稱" id="1" %}
變量名稱不是必須的,設(shè)置了變量名稱后,后續(xù)可以通過變量名稱來調(diào)用,而不設(shè)置變量名稱,則是直接輸出結(jié)果。
userDetail 支持的參數(shù)有:
id
。
id
必須的,用于指定獲取哪個用戶ID的詳情。Id
ParentId
UserName
RealName
AvatarURL
Email
Phone
GroupId
IsRetailer
Balance
TotalReward
InviteCode
LastLogin
時間戳,需要使用格式化時間戳為日期格式 {% userDetail lastLogin with name="LastLogin" id="1" %}{{stampToDate(lastLogin, "2006-01-02")}}
ExpireTime
時間戳,需要使用格式化時間戳為日期格式 {% userDetail expireTime with name="ExpireTime" id="1" %}{{stampToDate(expireTime, "2006-01-02")}}
Link
Id
標(biāo)簽用法:{% userDetail with name="Id" %}
{# 默認(rèn)用法,自動獲取當(dāng)前當(dāng)前頁面用戶ID #}
<div>UserID:{% userDetail with name="Id" %}</div>
{# 獲取指定用戶ID #}
<div>UserID:{% userDetail with name="Id" id="1" %}</div>
{# 自定義字段名稱 #}
<div>UserID:{% userDetail getId with name="Id" %}{{getId}}</div>
<div>UserID:{% userDetail getId with name="Id" id="1" %}{{getId}}</div>
UserName
標(biāo)簽用法:{% userDetail with name="UserName" %}
{# 默認(rèn)用法,自動獲取當(dāng)前當(dāng)前頁面用戶ID #}
<div>用戶名:{% userDetail with name="UserName" %}</div>
{# 獲取指定Tagid的Tag字段 #}
<div>用戶名:{% userDetail with name="TiUserNametle" id="1" %}</div>
{# 自定義字段名稱 #}
<div>用戶名:{% userDetail userName with name="UserName" %}{{userName}}</div>
<div>用戶名:{% userDetail userName with name="UserName" id="1" %}{{userName}}</div>
Link
標(biāo)簽用法:{% userDetail with name="Link" %}
{# 默認(rèn)用法,自動獲取當(dāng)前當(dāng)前頁面用戶ID #}
<div>用戶鏈接:{% userDetail with name="Link" %}</div>
{# 獲取指定Tagid的Tag字段 #}
<div>用戶鏈接:{% userDetail with name="Link" id="1" %}</div>
{# 自定義字段名稱 #}
<div>用戶鏈接:{% userDetail userLink with name="Link" %}{{userLink}}</div>
<div>用戶鏈接:{% userDetail userLink with name="Link" id="1" %}{{userLink}}</div>