songxingwei 2 年之前
父节点
当前提交
83d58c0b35
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      application/api/controller/Index.php

+ 3 - 3
application/api/controller/Index.php

@@ -62,8 +62,8 @@ class Index extends Base
             ->select();
         $memberVip = Db::name('store_member')->where('id',$this->uid)->value('vip');
         $advance_minutes = getAdvanceMinutes();
-        if ($memberVip==2 && $advance_minutes>0){
-            foreach ($list as &$v){
+        foreach ($list as &$v){
+            if ($memberVip==2 && $advance_minutes>0){
                 if ($v['state']==2){
                     $sell_time = strtotime($v['sell_time'])-($advance_minutes*60);
                     if ($sell_time<=time()){
@@ -71,8 +71,8 @@ class Index extends Base
                     }
                     $v['sell_time'] = date('Y-m-d H:i:s',$sell_time);
                 }
-                $v['now_inventory'] = getCollectionInventory($v['id']);
             }
+            $v['now_inventory'] = getCollectionInventory($v['id']);
         }
         foreach ($list as &$v){
             $v['is_remind'] = getRemind($this->uid,$v['id']) ? true : false;