/** * 订单日志 */ public function actionLogs() { $order_id = $_POST['order_id']; $log_list = OrderLog::model()->findAll('rel_id = :order_id', array(':order_id' => $order_id)); foreach ($log_list as $v) { $item['op_name'] = $v->op_name; $item['alttime'] = $v->alttime; $item['bill_type'] = $v->bill_type; $item['behavior'] = Params::BehaviorStatus($v->behavior); $item['result'] = $v->result === 'SUCCESS' ? '成功' : '失败'; $log_text = unserialize($v->log_text); $item['txt_key'] = $log_text[0]['txt_key']; $item_list[] = $item; } echo $this->renderPartial('_order_logs', array('item_list' => $item_list), true); }