Przeglądaj źródła

完善活动列表接口,报名接口

15954078560 2 lat temu
rodzic
commit
ece9fb20e4
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      application/api/controller/Index.php

+ 2 - 1
application/api/controller/Index.php

@@ -56,6 +56,7 @@ class Index extends Api
             } else {
                 $v['is_full'] = 0;
             }
+            $v['surplusperson'] = $v['maxperson'] - $v['currentperson'];
         }
 
         $this->success('活动列表', $list);
@@ -310,7 +311,7 @@ class Index extends Api
                     }
                     //计算会员价, 会员价优先顺序: 生日 > 女生特权日 > 会员价格
                     $birthday = date('md', strtotime($this->auth->birthday));
-                    $now_day = date('md', time());
+                    $now_day = date('md', $info['starttime']); //活动当天生日
                     if ($birthday == $now_day) {
                         //生日折扣
                         if ($vip_info['birthdiscount'] > 100 || $vip_info['birthdiscount'] < 0) {