xxxrrrdddd 3 年之前
父节点
当前提交
6e8df49ddb
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      application/common/model/Mobile.php

+ 4 - 2
application/common/model/Mobile.php

@@ -221,7 +221,9 @@ class Mobile extends Model
     }
     #设置为非活动
     public function makeNotActivity(){
-        $this['is_activity']=0;
-        $this->save();
+        if($this['is_activity'] && $this['activity_time_end']<time()) {
+            $this['is_activity'] = 0;
+            $this->save();
+        }
     }
 }