// 判断订单状态 public function get_order_status($os,$ps,$ss){ $arr = array('已取消','待付款','待发货','待收货','确认收货','无效'); if($os==OS_CANCELED){ $str = $arr[0]; }elseif($os ==OS_INVALID ){ // 无效 $str = $arr[5]; }elseif($ps ==PS_PAYED && $ss ==SS_RECEIVED){ // 确认收货 $str = $arr[4]; }elseif($ps ==PS_PAYED && $ss ==SS_SHIPPED){ $str = $arr[3]; }elseif($ps == PS_PAYED && $ss==SS_UNSHIPPED){ // 待发货 $str = $arr[2]; }elseif($ps ==PS_UNPAYED){ $str = $arr[1]; }else{ $str = '11111'; } return $str; //return OS_INVALID; }
来源:https://www.cnblogs.com/wesky/p/5113171.html