...
|
...
|
@@ -146,9 +146,20 @@ class HomeController extends AbstractAction |
|
|
$uid = 967016;
|
|
|
$currency = \Index\UserModel::getYohoCoinData($uid);
|
|
|
|
|
|
$this->_view->display('currency', $currency);
|
|
|
}
|
|
|
$this->setTitle('优惠券');
|
|
|
$this->setNavHeader('优惠券', true, SITE_MAIN);
|
|
|
// $uid = $this->getUid();
|
|
|
$uid = 8826435;
|
|
|
$coupons = array(
|
|
|
'couponsUrl' => array(
|
|
|
\Index\UserModel::getCouponData($uid, 0),
|
|
|
\Index\UserModel::getCouponData($uid, 1),
|
|
|
),
|
|
|
'couponsPage' => true
|
|
|
);
|
|
|
|
|
|
$this->_view->display('coupons', $coupons);
|
|
|
}
|
|
|
/**
|
|
|
* 优惠券
|
|
|
*/
|
...
|
...
|
@@ -194,36 +205,68 @@ class HomeController extends AbstractAction |
|
|
$uid = 967016;
|
|
|
|
|
|
$address = \Index\UserModel::getAddressData($uid);
|
|
|
$addressList = \Index\UserModel::getAddressListData($uid);
|
|
|
|
|
|
// print_r($address);
|
|
|
|
|
|
$this->_view->display('address', array(
|
|
|
'addressPage' => true,
|
|
|
'pageFooter' => true,
|
|
|
'address' => $address
|
|
|
'address' => $address,
|
|
|
'addressList' => $addressList
|
|
|
));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 修改地址
|
|
|
* 修改地址或者添加新地址
|
|
|
*/
|
|
|
public function editAddressAction() {
|
|
|
// 设置网站标题
|
|
|
$this->setTitle('修改地址');
|
|
|
$this->setNavHeader('修改地址', true, SITE_MAIN);
|
|
|
public function saveAddressAction()
|
|
|
{
|
|
|
$result = array();
|
|
|
|
|
|
if ($this->isAjax()) {
|
|
|
// $uid = $this->getUid();
|
|
|
$uid = 967016;
|
|
|
$address = $this->post('address', '');
|
|
|
$area_code = $this->post('area_code', '');
|
|
|
$consignee = $this->post('consignee', '');
|
|
|
$email = $this->post('email', '');
|
|
|
$id = $this->post('id', null);
|
|
|
$mobile = $this->post('mobile', '');
|
|
|
$zip_code = $this->post('zip_code', '');
|
|
|
|
|
|
$result = \Index\UserModel::saveAddressData($uid, $address, $area_code, $consignee, $email, $id, $mobile, $zip_code);
|
|
|
}
|
|
|
|
|
|
$address = \Index\UserModel::getAddressData($uid);
|
|
|
if (empty($result)) {
|
|
|
echo ' ';
|
|
|
} else {
|
|
|
$this->echoJson($result);
|
|
|
}
|
|
|
|
|
|
// print_r($address);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 设置默认地址
|
|
|
*/
|
|
|
public function defaultAddressAction()
|
|
|
{
|
|
|
$result = array();
|
|
|
|
|
|
if ($this->isAjax()) {
|
|
|
// $uid = $this->getUid();
|
|
|
$uid = 967016;
|
|
|
$id = $this->post('id', '');
|
|
|
|
|
|
$result = \Index\UserModel::setDefaultAddress($uid, $id);
|
|
|
}
|
|
|
|
|
|
if (empty($result)) {
|
|
|
echo ' ';
|
|
|
} else {
|
|
|
$this->echoJson($result);
|
|
|
}
|
|
|
|
|
|
$this->_view->display('edit_address', array(
|
|
|
'editAddressPage' => true,
|
|
|
'pageFooter' => true,
|
|
|
'address' => $address
|
|
|
));
|
|
|
}
|
|
|
|
|
|
//在线客服
|
...
|
...
|
@@ -245,9 +288,13 @@ class HomeController extends AbstractAction |
|
|
public function onlineServiceDetailAction() {
|
|
|
$service = array();
|
|
|
$cateId = $this->get('cateId', 0);
|
|
|
if ($cateId > 0) {
|
|
|
$cateName = $this->get('cateName', '');
|
|
|
if ($cateId > 0)
|
|
|
{
|
|
|
$service = home\OnlineModel::getOnlineServiceDetail($cateId);
|
|
|
}
|
|
|
$this->setTitle('在线客服');
|
|
|
$this->setNavHeader($cateName, true, '');
|
|
|
$this->_view->display('online_service_detail', $service);
|
|
|
}
|
|
|
|
...
|
...
|
|