Authored by liangxs

订单详情地址修改文件新建及路由

/**
* Created by Administrator on 2016/5/10.
*/
console.log('ss');
\ No newline at end of file
... ...
{{> layout/header}}
<div class="my-address-page select-address-page yoho-page">
<div class="page-wrap clearfix">
{{# address}}
<div class="address-item" data-address-id="{{address_id}}" data-is-support="{{is_support}}" data-href="/cart/index/orderEnsure">
<span class="name">{{consignee}}</span>
<span class="tel">{{mobile}}</span>
<p class="address-info">{{area}} {{address}}</p>
<div class="action iconfont">
<span class="edit" data-href="/home/addressAct?id={{address_id}}&refer=shopping">&#xe61e;</span>
<span class="del" data-id="{{address_id}}">&#xe621;</span>
</div>
</div>
{{/ address}}
<a class="add-address" data-href="/home/addressAct?refer=shopping">
添加新地址
</a>
<div class="confim-mask hide">
<div class="confim-box">
<div class="content">
您确定要删除地址?
</div>
<div class="action">
<span class="cancel">
取消
</span>
<span class="confim">
确认
</span>
</div>
</div>
</div>
</div>
</div>
{{> layout/footer}}
... ...
... ... @@ -395,3 +395,9 @@
seajs.use('js/product/shop');
</script>
{{/if}}
{{!-- 订单详情地址修改页 --}}
{{#if addressModifyPage}}
<script>
seajs.use('js/me/address-modify');
</script>
{{/if}}
... ...
... ... @@ -443,6 +443,30 @@ class HomeController extends AbstractAction
}
/**
* 地址修改
*/
public function addressModifyAction()
{
// 审判跳转登录页
$this->auditJumpLogin();
// 设置网站标题
$this->setTitle('地址管理');
$this->setNavHeader('地址管理', Helpers::url('/home'), false);
$uid = $this->_uid;
$address = UserModel::getAddressData($uid);
$this->_view->display('address_modify', array(
'addressModifyPage' => true,
'pageFooter' => true,
'address' => $address,
'changeable' => true,
'showAddBtn' => (count($address) <= 5),
));
}
/**
*
* 地址编辑或添加页面
*/
... ... @@ -1041,6 +1065,8 @@ class HomeController extends AbstractAction
'orderCount' => isset($orderDetail['orderCount']) ? intval($orderDetail['orderCount']) : 0,
'isOldUser' => (isset($_COOKIE['_isOldUser']) && $_COOKIE['_isOldUser'] == '4') ? 'true' : 'false',
'uid' => $this->_uid,
'changeable' => true
));
}
... ...