{extend name="default/users/base" /}
{block name="title"}用户地址 - 用户中心 - {:WSTConf('CONF.shopName')}{__block__}{/block}
{block name="content"}
<div class="wst-user-box"><div class="wst-user-info">
	<div class="wst-user-head">用户地址<span>你已经创建<em class="g g1">0</em>个收货地址,最多可以创建<em>20</em>个</span></div>
	<div class="wst-user-addr">
		<div class="list add" style="cursor: pointer;" onclick="location.href=WST.U('home/useraddress/edit')"><i class="iconfont"></i>添加新地址</div>
		<div id="address_box"></div>
		<div class="wst-clear"></div>
	</div>
        <script id="address" type="text/html">
        {{# for(var i = 0, len = d.length; i < len; i++){ }}
		<div class="list">
			<div class="infos" onclick="javascript:setDefault({{d[i].addressId}})">
				<p class="name">{{d[i].userName}}</p>
				<p class="phone">{{d[i].userPhone}}</p>
				<p class="address">{{d[i].areaName}}<br/>{{d[i].userAddress}}</p>
			</div>
			<div class="operate">
				<a href="javascript:editAddress({{ d[i].addressId }})">修改</a>
				<a href="javascript:delAddress({{ d[i].addressId }},this)">删除</a>
			</div>
			{{# if(d[i].isDefault==1) { }}<p class="default">默认</p>{{# } }}
		</div>
         {{# } }}
         </script>
</div></div>
{/block}
{block name="js"}
<script type='text/javascript' src='__STYLE__/users/useraddress/useraddress.js?v={$v}'></script>
<script>
$(function(){
  listQuery();
});
</script>
{/block}
