|
@@ -1642,7 +1642,6 @@ class User extends Api
|
|
|
if (!$id) {
|
|
|
$this->error('参数缺失');
|
|
|
}
|
|
|
-
|
|
|
$info = Db::name('active_order')->where(['id' => $id, 'user_id' => $this->auth->id])->find();
|
|
|
if (!$info) {
|
|
|
$this->error('数据不存在');
|
|
@@ -1666,5 +1665,67 @@ class User extends Api
|
|
|
|
|
|
$this->success('我的订单详情', $info);
|
|
|
}
|
|
|
+
|
|
|
+ //查看报名人信息
|
|
|
+ public function activepeople() {
|
|
|
+ $id = input('id', 0, 'intval'); //报名人员id
|
|
|
+ if (!$id) {
|
|
|
+ $this->error('参数缺失');
|
|
|
+ }
|
|
|
+ $info = Db::name('active_people')->where(['id' => $id, 'user_id' => $this->auth->id])->find();
|
|
|
+ if (!$info) {
|
|
|
+ $this->error('数据不存在');
|
|
|
+ }
|
|
|
+
|
|
|
+ $this->success('查看报名人信息', $info);
|
|
|
+ }
|
|
|
+
|
|
|
+ //修改报名人信息
|
|
|
+ public function modifyactivepeople() {
|
|
|
+ $id = input('id', 0, 'intval'); //报名人员id
|
|
|
+ $name = input('name', '', 'trim'); //姓名
|
|
|
+ $idcard = input('idcard', '', 'trim'); //身份证号
|
|
|
+ $mobile = input('mobile', '', 'trim'); //手机号
|
|
|
+ $emergencycontact = input('emergencycontact', '', 'trim'); //紧急联系人
|
|
|
+ $contactmobile = input('contactmobile', '', 'trim'); //紧急联系方式
|
|
|
+
|
|
|
+ if (!$id) {
|
|
|
+ $this->error('参数缺失');
|
|
|
+ }
|
|
|
+ $info = Db::name('active_people')->where(['id' => $id, 'user_id' => $this->auth->id])->find();
|
|
|
+ if (!$info) {
|
|
|
+ $this->error('数据不存在');
|
|
|
+ }
|
|
|
+ if ($info['status'] == 2) {
|
|
|
+ $this->success('订单已经结束');
|
|
|
+ }
|
|
|
+ if ($info['status'] == 3) {
|
|
|
+ $this->success('订单已经取消');
|
|
|
+ }
|
|
|
+ if ($info['modifystatus'] == 1) {
|
|
|
+ $this->error('报名信息正在修改中,请等待后台审核');
|
|
|
+ }
|
|
|
+ //查询活动状态
|
|
|
+ $active = Db::name('active')->find($info['active_id']);
|
|
|
+ if (!$active) {
|
|
|
+ $this->success('活动不存在或已取消');
|
|
|
+ }
|
|
|
+ if ($active['status'] == 1) {
|
|
|
+ $this->error('活动已成行,不能修改信息');
|
|
|
+ }
|
|
|
+ if (time() < $active['refundendtime'] || time() > $active['starttime']) {
|
|
|
+ $this->error('当前时间段暂不可修改信息');
|
|
|
+ }
|
|
|
+ //查询是否申请过退款
|
|
|
+ $active_refund = Db::name('active_refund')->where(['order_id' => $info['active_id'], 'status' => 0])->count('id');
|
|
|
+ if ($active_refund) {
|
|
|
+ $this->error('您正在申请退款,暂不可修改信息');
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
}
|