名称: address_list 

功能: 会员中心-获取会员收货地址列表 

返回值: 二维数组,每行存储一条地址信息 


模板语法示例:

<table class="table table-bordered">
	<tr>
		<th width="30">#</th>
		<th width="100">收货人</th>
		<th width="100">联系电话</th>
		<th width="60">邮编</th>
		<th width="">地址</th>
		<th width="80">操作</th>
	</tr>
{if( $address_list )}
{loop $address_list $k $v}
<tr{if($v['is_default'])} style="background:#dff0d8;" title="默认收货地址"{/if}>
	<td>{$v['id']}</td>
	<td>{$v['username']}</td>
	<td>{$v['phone']}</td>
	<td>{$v['postalCode']}</td>
	<td>{$v['address']}</td>
	<td>
		<a href="javascript:void(0);" class="" onclick="apps['address_edit']({$v['id']});">编辑</a>
	</td>
</tr>
{/loop}
{else}
<tr><td colspan="3" align="center">未找到相关数据</td></tr>
{/if}
</table>
 

数据格式打印:

Array
(
    [0] => Array
        (
            [id] => 4
            [user_id] => 1
            [username] => xxx
            [line1] => 罗湖区国贸
            [line2] => 佳宁娜B栋
            [city] => 深圳市
            [state] => 广东省
            [phone] => 13888888888
            [postalCode] => 435400
            [countryCode] => CN
            [is_default] => 1
            [address] => CN 广东省 深圳市 罗湖区国贸 佳宁娜B栋
        )

    [1] => Array
        (
            [id] => 3
            [user_id] => 1
            [username] => xx
            [line1] => 罗湖区水贝
            [line2] => 松泉公寓A栋
            [city] => 深圳市
            [state] => 广东省
            [phone] => 13888888888
            [postalCode] => 435411
            [countryCode] => CN
            [is_default] => 0
            [address] => CN 广东省 深圳市 罗湖区水贝 松泉公寓A栋
        )

)