本文整理汇总了PHP中Params::ShipStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP Params::ShipStatus方法的具体用法?PHP Params::ShipStatus怎么用?PHP Params::ShipStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Params
的用法示例。
在下文中一共展示了Params::ShipStatus方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionIndex
/**
* 订单列表
*/
public function actionIndex()
{
$pageIndex = isset($_GET['page']) ? $_GET['page'] : 1;
$view = isset($_GET['view']) ? $_GET['view'] : 0;
$conditionArr = array();
//待发货 pay_status:1;ship_status:0
if ($view == 0) {
$conditionArr = array('pay_status' => 1, 'ship_status' => 0);
}
//已发货 ship_status:1
if ($view == 1) {
$conditionArr = array('ship_status' => 1);
}
//待支付 pay_status:0
if ($view == 2) {
$conditionArr = array('pay_status' => 0);
}
//已支付到担保方 pay_status:2
if ($view == 3) {
$conditionArr = array('pay_status' => 2);
}
//已支付 pay_status:1
if ($view == 4) {
$conditionArr = array('pay_status' => 1);
}
//货到付款
if ($view == 5) {
$conditionArr = array('pay_status' => 10);
}
//活动 status:active
if ($view == 6) {
$conditionArr = array('status' => 'active', 'pay_status' => 0);
}
//已作废 status:dead
if ($view == 7) {
$conditionArr = array('status' => 'dead');
}
//已完成 status:finish
if ($view == 8) {
$conditionArr = array('status' => 'finish');
}
//全部
if ($view == 9) {
$conditionArr = array();
}
$Order = new Orders();
$result = $Order->orderList($conditionArr, $pageIndex, $this->pagesize);
$order_list = array();
foreach ($result['items'] as $k => $v) {
$order_list[$k] = $v;
$order_list[$k]['pay_status_name'] = Params::PayStatus($v['pay_status']);
$order_list[$k]['ship_status_name'] = Params::ShipStatus($v['ship_status']);
$order_list[$k]['member_name'] = Params::PamMember($v['member_id']);
}
//分页
$pages = new CPagination($result['count']);
$this->render('index', array('dataProvider' => $order_list, 'view' => $view, 'pages' => $pages, 'pageIndex' => $pageIndex - 1));
}