Преглед на файлове

完善后台发布活动,完善我的订单 订单详情 修改报名信息接口

15954078560 преди 2 години
родител
ревизия
f1298dc10d
променени са 2 файла, в които са добавени 8 реда и са изтрити 8 реда
  1. 2 2
      application/admin/controller/Active.php
  2. 6 6
      application/api/controller/User.php

+ 2 - 2
application/admin/controller/Active.php

@@ -84,8 +84,8 @@ class Active extends Backend
                 if (strtotime($params['refundendtime']) < time()) {
                     $this->error('退款截止时间不能小于当前时间');
                 }
-                if (strtotime($params['refundendtime']) >= strtotime($params['starttime'])) {
-                    $this->error('退款截止时间必须小于活动开始时间');
+                if (strtotime($params['refundendtime']) >= strtotime($params['signupendtime'])) {
+                    $this->error('退款截止时间必须小于报名截止时间');
                 }
                 if ($params['girldiscount'] < 1 || $params['girldiscount'] > 100) {
                     $this->error('女生活动折扣取值范围1-100');

+ 6 - 6
application/api/controller/User.php

@@ -1664,7 +1664,7 @@ class User extends Api
             if ($v['status'] == 1) {
                 if ($v['active']['refundendtime'] >= time()) {
                     $v['button_status'] = 1;
-                } elseif ($v['active']['refundendtime'] < time() && $v['active']['starttime'] >= time()) {
+                } elseif ($v['active']['refundendtime'] < time() && $v['active']['signupendtime'] >= time()) {
                     $v['button_status'] = 2;
                 }
             }
@@ -1698,7 +1698,7 @@ class User extends Api
         if ($info['status'] == 1) {
             if ($active['refundendtime'] >= time()) {
                 $info['button_status'] = 1;
-            } elseif ($active['refundendtime'] < time() && $active['starttime'] >= time()) {
+            } elseif ($active['refundendtime'] < time() && $active['signupendtime'] >= time()) {
                 $info['button_status'] = 2;
             }
         }
@@ -1763,10 +1763,10 @@ class User extends Api
         if (!$active) {
             $this->success('活动不存在或已取消');
         }
-        if ($active['status'] == 1) {
-            $this->error('活动已成行,不能修改信息');
-        }
-        if (time() <= $active['refundendtime'] || time() > $active['starttime']) {
+//        if ($active['status'] == 1) {
+//            $this->error('活动已成行,不能修改信息');
+//        }
+        if (time() <= $active['refundendtime'] || time() > $active['signupendtime']) {
             $this->error('当前时间段暂不可修改信息');
         }
         //查询是否申请过退款