|
@@ -35,7 +35,7 @@ class Examine extends Api
|
|
|
->autopage()
|
|
|
->select();
|
|
|
foreach ($list as $k => $v) {
|
|
|
- $list[$k]['apply'] = !empty($v['apply']) ? 1 : 0;
|
|
|
+ $list[$k]['apply'] = !empty($v['apply']) ? 1 : 0;
|
|
|
}
|
|
|
return $this->success('success', $list);
|
|
|
}
|
|
@@ -46,10 +46,10 @@ class Examine extends Api
|
|
|
if (empty($params['examine_id'])) {
|
|
|
return $this->error('参数缺失');
|
|
|
}
|
|
|
- if (empty($v['name'])) {
|
|
|
+ if (empty($params['name'])) {
|
|
|
return $this->error('报名信息姓名不能为空');
|
|
|
}
|
|
|
- if (empty($v['phone'])) {
|
|
|
+ if (empty($params['phone'])) {
|
|
|
return $this->error('报名信息手机号不能为空');
|
|
|
}
|
|
|
$user_id = $this->auth->id;
|
|
@@ -72,7 +72,7 @@ class Examine extends Api
|
|
|
// 开始报名
|
|
|
$data = [
|
|
|
'user_id' => $user_id,
|
|
|
- 'examine_id' => $params['examine_id'],
|
|
|
+ 'examine_id' => $params['examine_id'],
|
|
|
'order_no' => createUniqueNo('E', $user_id),
|
|
|
'name' => $params['name'],
|
|
|
'phone' => $params['phone'],
|
|
@@ -85,7 +85,6 @@ class Examine extends Api
|
|
|
Db::rollback();
|
|
|
return $this->error('订单创建失败');
|
|
|
}
|
|
|
-
|
|
|
Db::commit();
|
|
|
return $this->success('报名成功');
|
|
|
}
|