...
|
...
|
@@ -167,13 +167,14 @@ class HomeController extends AbstractAction |
|
|
$this->setNavHeader('优惠券', true, SITE_MAIN);
|
|
|
// $uid = $this->getUid();
|
|
|
$uid = 8826435;
|
|
|
$status = $this->get('status', 0);
|
|
|
$coupons = array(
|
|
|
'couponsUrl' => \Index\UserModel::getCouponData($uid, $status),
|
|
|
'couponsUrl' => array(
|
|
|
\Index\UserModel::getCouponData($uid, 0),
|
|
|
\Index\UserModel::getCouponData($uid, 1),
|
|
|
),
|
|
|
'couponsPage' => true
|
|
|
);
|
|
|
|
|
|
print_r($coupons);
|
|
|
$this->_view->display('coupons', $coupons);
|
|
|
|
|
|
}
|
...
|
...
|
@@ -207,56 +208,102 @@ 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);
|
|
|
|
|
|
// $uid = $this->getUid();
|
|
|
$uid = 967016;
|
|
|
|
|
|
$address = \Index\UserModel::getAddressData($uid);
|
|
|
/**
|
|
|
* 修改地址或者添加新地址
|
|
|
*/
|
|
|
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);
|
|
|
}
|
|
|
|
|
|
// print_r($address);
|
|
|
if (empty($result)) {
|
|
|
echo ' ';
|
|
|
} else {
|
|
|
$this->echoJson($result);
|
|
|
}
|
|
|
|
|
|
$this->_view->display('edit_address', array(
|
|
|
'editAddressPage' => true,
|
|
|
'pageFooter' => true,
|
|
|
'address' => $address
|
|
|
));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 在线客服
|
|
|
* 设置默认地址
|
|
|
*/
|
|
|
public function onlineServiceAction()
|
|
|
public function defaultAddressAction()
|
|
|
{
|
|
|
$service = \Index\UserModel::getOnlineServiceData();
|
|
|
$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);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
print_r($service);
|
|
|
//在线客服
|
|
|
public function onlineServiceAction()
|
|
|
{
|
|
|
// 设置网站标题
|
|
|
$this->setTitle('在线客服');
|
|
|
$this->setNavHeader('在线客服', true, SITE_MAIN);
|
|
|
|
|
|
$service = home\OnlineModel::getOnlineServiceInfo();
|
|
|
|
|
|
$this->_view->display('online_service', array(
|
|
|
'onlineServicePage' => true,
|
|
|
'pageFooter' => true,
|
|
|
// 'pageFooter' => true,
|
|
|
'service' => $service
|
|
|
));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
//在线客服-具体详情
|
|
|
public function onlineServiceDetailAction()
|
|
|
{
|
|
|
$service = array();
|
|
|
$cateId = $this->get('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);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 我的逛
|
|
|
*/
|
|
|
public function myGuangAction()
|
...
|
...
|
@@ -385,4 +432,53 @@ class HomeController extends AbstractAction |
|
|
while(false);
|
|
|
//$this -> _view -> display('order',$data);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 订单详情页
|
|
|
*/
|
|
|
public function orderDetailAction()
|
|
|
{
|
|
|
$data = array(
|
|
|
'name' => '毛毛莉Lydia',
|
|
|
'phoneNum' => '18600001133',
|
|
|
'address' => '南京市建邺区嘉陵江东街18号国家广告产业园5栋17楼',
|
|
|
'orderStatus' => '待收货',
|
|
|
'orderNum' => '418358063',
|
|
|
'orderTime' => '2014-03-10 17:25:10',
|
|
|
|
|
|
'unreceived' => true,
|
|
|
'logisticsUrl' => '',
|
|
|
'logisticsCompany' => '顺丰',
|
|
|
'logisticsNum' => '51537443456',
|
|
|
|
|
|
'goods' => array(
|
|
|
array(
|
|
|
'id' => 1,
|
|
|
'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
|
|
|
'name' => 'Adidas Originals ZX FLUXM22508',
|
|
|
'color' => '黄',
|
|
|
'size' => '43',
|
|
|
'price' => '699.00',
|
|
|
'count' => '2'
|
|
|
),
|
|
|
array(
|
|
|
'id' => 1,
|
|
|
'thumb' => 'http://img10.static.yhbimg.com/goodsimg/2015/11/04/05/0188f1aca49ac478a565ec029b5d2d4a6c.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
|
|
|
'name' => 'B.Duck浴室玩伴mini浮水鸭',
|
|
|
'gift' => true,
|
|
|
'color' => '黄',
|
|
|
'size' => '43',
|
|
|
'price' => '0.00',
|
|
|
'count' => '1'
|
|
|
)
|
|
|
),
|
|
|
|
|
|
'sumPrice' => 799,
|
|
|
'salePrice' => 80,
|
|
|
'freight' => 5,
|
|
|
'yohoCoin' => 5,
|
|
|
'price' => 719
|
|
|
);
|
|
|
$this->_view->display('order-detail', array('orderDetail' => $data, 'orderDetailPage' => true));
|
|
|
}
|
|
|
} |
...
|
...
|
|