-1, 'name' => '选择分类', ); if ($auth) { $where['ids'] = $auth; } $data = Dever::db('course/cate')->getIds($where); } elseif ($level_num == 2 && $level_id > 0) { $default = array ( 'value' => -1, 'name' => '选择课程', ); if ($level_id > 0) { $where['cate_id'] = $level_id; } elseif ($auth) { $where['cate_id'] = $auth; } $data = Dever::db('course/info')->getIds($where); } else { return array(); } array_unshift($data, $default); $result['level_total'] = 2; $result['list'] = $data; return $result; } public function showOrderUser($id) { $info = Dever::db('course/order')->one($id); $table = array(); $user = Dever::db('passport/user')->one($info['uid']); $table['用户名'] = $user['username'] . '('.$info['uid'].')'; $table['手机号'] = $user['mobile']; $table['课程'] = $info['name']; $table['购买数量'] = $info['buy_num']; $table['支付金额'] = $info['cash']; if ($info['teacher_id']) { $user = Dever::db('teacher/info')->one($info['teacher_id']); $table['讲师'] = $user['name']; } if ($info['seller_id']) { $user = Dever::db('seller/info')->one($info['seller_id']); $table['销售人'] = $user['name']; } return Dever::table($table); } public function showOrderStatus($id) { $info = Dever::db('course/order')->one($id); if ($info) { if ($info['status'] == 1) { return '待支付'; } elseif ($info['status'] == 2) { return '已支付'; } elseif ($info['status'] == 3) { return '支付失败'; } elseif ($info['status'] == 10) { $table['状态'] = '已退款'; $manage = Dever::db('manage/admin')->one($info['tk_admin']); $table['备注'] = $info['tk_desc']; $table['截图'] = ''; //$table['退款时间'] = date('Y-m-d H:i:s', $info['tk_time']); $table['操作人'] = $manage['username']; return Dever::table($table); } } } }