Authored by liangxs

php测试数据

@@ -457,11 +457,13 @@ class HomeController extends AbstractAction @@ -457,11 +457,13 @@ class HomeController extends AbstractAction
457 $uid = $this->_uid; 457 $uid = $this->_uid;
458 $address = UserModel::getAddressData($uid); 458 $address = UserModel::getAddressData($uid);
459 459
  460 + //以下为测试数据
  461 + $address['hasRelataions'] = 'true';
  462 +
460 $this->_view->display('address_modify', array( 463 $this->_view->display('address_modify', array(
461 'addressModifyPage' => true, 464 'addressModifyPage' => true,
462 'pageFooter' => true, 465 'pageFooter' => true,
463 'address' => $address, 466 'address' => $address,
464 - 'changeable' => true,  
465 'showAddBtn' => (count($address) <= 5), 467 'showAddBtn' => (count($address) <= 5),
466 )); 468 ));
467 } 469 }
@@ -1055,6 +1057,22 @@ class HomeController extends AbstractAction @@ -1055,6 +1057,22 @@ class HomeController extends AbstractAction
1055 $this->setTitle('订单详情'); 1057 $this->setTitle('订单详情');
1056 $this->setNavHeader('订单详情', true, false); 1058 $this->setNavHeader('订单详情', true, false);
1057 1059
  1060 + //以下是添加的测试数据
  1061 + $orderDetail['hasChanged'] = 'false';
  1062 +
  1063 + //以下是判断能否修改地址
  1064 + if ($orderDetail['orderStatus'] === '待付款' || $orderDetail['orderStatus'] === '备货中' ) {
  1065 + if ($orderDetail['hasChanged'] === 'false') {
  1066 + $changeable = 'true';
  1067 + }else{
  1068 + $changeable = 'false';
  1069 + }
  1070 + }else{
  1071 + $changeable = 'false';
  1072 + }
  1073 +
  1074 + $orderDetail['changeable'] = $changeable;
  1075 +
1058 $this->_view->display('order-detail', array( 1076 $this->_view->display('order-detail', array(
1059 'orderDetailPage' => true, 1077 'orderDetailPage' => true,
1060 'serviceUrl' => 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409&info=', 1078 'serviceUrl' => 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409&info=',
@@ -1064,9 +1082,7 @@ class HomeController extends AbstractAction @@ -1064,9 +1082,7 @@ class HomeController extends AbstractAction
1064 'orderTotalFormat' => isset($orderDetail['goodsAmount']) ? sprintf("%d", $orderDetail['goodsAmount']) : 0, 1082 'orderTotalFormat' => isset($orderDetail['goodsAmount']) ? sprintf("%d", $orderDetail['goodsAmount']) : 0,
1065 'orderCount' => isset($orderDetail['orderCount']) ? intval($orderDetail['orderCount']) : 0, 1083 'orderCount' => isset($orderDetail['orderCount']) ? intval($orderDetail['orderCount']) : 0,
1066 'isOldUser' => (isset($_COOKIE['_isOldUser']) && $_COOKIE['_isOldUser'] == '4') ? 'true' : 'false', 1084 'isOldUser' => (isset($_COOKIE['_isOldUser']) && $_COOKIE['_isOldUser'] == '4') ? 'true' : 'false',
1067 - 'uid' => $this->_uid,  
1068 -  
1069 - 'changeable' => true 1085 + 'uid' => $this->_uid
1070 )); 1086 ));
1071 } 1087 }
1072 1088