Authored by Rock Zhang

添加异步获取三级地址列表的路由

... ... @@ -28,6 +28,5 @@
确认
</div>
</div>
{{> me/address/address-list}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
{{> me/address/address-list}}
\ No newline at end of file
... ...
... ... @@ -306,6 +306,23 @@ class HomeController extends AbstractAction
}*/
/**
* 异步获取三级地址数据
*/
public function locationListAction() {
$result = array();
if ($this->isAjax()) {
$result['addressList'] = UserModel::getAddressListData($this->_uid);
}
if (empty($result)) {
echo ' ';
} else {
$this->_view->display('location-list', $result);
}
}
/**
* 地址管理
*/
public function addressAction() {
... ... @@ -314,14 +331,12 @@ class HomeController extends AbstractAction
$this->setNavHeader('地址管理');
$address = UserModel::getAddressData($this->_uid);
$addressList = UserModel::getAddressListData($this->_uid);
$this->_view->display('address', array(
'addressPage' => true,
'pageFooter' => true,
'address' => $address,
'showAddBtn' => (count($address) <= 5),
'addressList' => $addressList
'showAddBtn' => (count($address) <= 5)
));
}
... ...