15954078560 пре 2 година
родитељ
комит
89b533e474
1 измењених фајлова са 28 додато и 1 уклоњено
  1. 28 1
      application/api/controller/User.php

+ 28 - 1
application/api/controller/User.php

@@ -1629,8 +1629,17 @@ class User extends Api
 
         $active = Db::name('active');
         foreach ($list as &$v) {
+            $v['button_status'] = 0;//待出行按钮: 0不展示  1退款  2修改联系人
+
             $v['active'] = $active->find($v['active_id']);
             $v['active'] = info_domain_image($v['active'], ['image']);
+            if ($v['status'] == 1) {
+                if ($v['active']['refundendtime'] >= time()) {
+                    $v['button_status'] = 1;
+                } elseif ($v['active']['refundendtime'] < time() && $v['active']['starttime'] >= time()) {
+                    $v['button_status'] = 2;
+                }
+            }
         }
 
         $this->success('我的订单', $list);
@@ -1662,6 +1671,15 @@ class User extends Api
 
         $info['active'] = $active;
         $info['active_people'] = $active_people;
+        //待出行按钮: 0不展示  1退款  2修改联系人
+        $info['button_status'] = 0;
+        if ($info['status'] == 1) {
+            if ($info['active']['refundendtime'] >= time()) {
+                $info['button_status'] = 1;
+            } elseif ($info['active']['refundendtime'] < time() && $info['active']['starttime'] >= time()) {
+                $info['button_status'] = 2;
+            }
+        }
 
         $this->success('我的订单详情', $info);
     }
@@ -1713,7 +1731,7 @@ class User extends Api
         if ($active['status'] == 1) {
             $this->error('活动已成行,不能修改信息');
         }
-        if (time() < $active['refundendtime'] || time() > $active['starttime']) {
+        if (time() <= $active['refundendtime'] || time() > $active['starttime']) {
             $this->error('当前时间段暂不可修改信息');
         }
         //查询是否申请过退款
@@ -1788,4 +1806,13 @@ class User extends Api
         $this->success('修改成功');
     }
 
+    //取消订单
+
+
+    //支付订单
+
+
+    //退款
+
+
 }