Authored by ccbikai

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

... ... @@ -18,17 +18,17 @@ class Yohobuy
{
// /* 正式环境 */
// const API_URL = 'http://api2.open.yohobuy.com/';
// const API_URL2 = 'http://api.open.yohobuy.com/';
// const SERVICE_URL = 'http://service.api.yohobuy.com/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
const API_URL = 'http://api2.open.yohobuy.com/';
const API_URL2 = 'http://api.open.yohobuy.com/';
const SERVICE_URL = 'http://service.api.yohobuy.com/';
const YOHOBUY_URL = 'http://www.yohobuy.com/';
/* 测试环境 */
const API_URL = 'http://test2.open.yohobuy.com/';
const SERVICE_URL = 'http://test.service.api.yohobuy.com/';
const YOHOBUY_URL = 'http://www.yohobuy.com/';
const API_URL_MYCENTER = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的个人中心接口URL
const API_URL_SHOPINGCART = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的购物车接口URL
// const API_URL = 'http://test2.open.yohobuy.com/';
// const SERVICE_URL = 'http://test.service.api.yohobuy.com/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_URL_MYCENTER = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的个人中心接口URL
// const API_URL_SHOPINGCART = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的购物车接口URL
/**
* 私钥列表
... ...
... ... @@ -444,14 +444,14 @@ class HomeController extends AbstractAction
$data = OrderModel::getNavs($type);
if (!empty($data)) {
$order['navs'] = $data;
$order['orderPage'] = true;
} else {
$this->error();
}
$this->_view->display('order', array(
'order' => $order,
'pageFooter' => true
'pageFooter' => true,
'orderPage' => true
));
}
... ... @@ -476,7 +476,11 @@ class HomeController extends AbstractAction
if (!empty($data)) {
$order['orders'] = $data;
} else {
$order['walkwayUrl'] = 'http://www.baidu.com';
if ($page > 1) {
echo " ";
} else {
$order['walkwayUrl'] = 'http://www.baidu.com';
}
}
//渲染模板
$this->_view->display('order-content', $order);
... ...
... ... @@ -121,55 +121,58 @@ class OrderModel
}
return $arr;
}
//根据type值设置nav属性
public function getNavs($type){
public function getNavs($type) {
$nav = array(
array(
'name' => '全部',
'typeId' => '1'
'typeId' => '1',
'url' => '/home/order?type=1'
),
array(
'name' => '待付款',
'typeId' => '2'
'typeId' => '2',
'url' => '/home/order?type=2'
),
array(
'name' => '待发货',
'typeId' => '3'
'typeId' => '3',
'url' => '/home/order?type=3'
),
array(
'name' => '待收货',
'typeId' => '4'
'typeId' => '4',
'url' => '/home/order?type=4'
)
);
foreach($nav as $key => $vo){
switch ($type) {
case 1:
if($vo['typeId'] == 1){
$nav[$key]['active'] = true;
}
break;
case 2:
if($vo['typeId'] == 2){
$nav[$key]['active'] = true;
}
break;
case 3:
if($vo['typeId'] == 3){
$nav[$key]['active'] = true;
}
break;
case 4:
if($vo['typeId'] == 4){
$nav[$key]['active'] = true;
}
break;
default:
break;
}
foreach ($nav as $key => $vo) {
switch ($type) {
case 1:
if ($vo['typeId'] == 1) {
$nav[$key]['active'] = true;
}
break;
case 2:
if ($vo['typeId'] == 2) {
$nav[$key]['active'] = true;
}
break;
case 3:
if ($vo['typeId'] == 3) {
$nav[$key]['active'] = true;
}
break;
case 4:
if ($vo['typeId'] == 4) {
$nav[$key]['active'] = true;
}
break;
default:
break;
}
}
return $nav;
}
}
... ...