mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-03 11:09:27 +00:00
优化日期显示
This commit is contained in:
@@ -114,7 +114,7 @@ class DailyJob extends Command {
|
||||
// 重置用户流量
|
||||
private function resetUserTraffic(): void {
|
||||
$userList = User::query()
|
||||
->where('status', '>=', 0)
|
||||
->where('status', '<>', -1)
|
||||
->where('expire_time', '>', date('Y-m-d'))
|
||||
->where('reset_time', '<=', date('Y-m-d'))
|
||||
->get();
|
||||
|
||||
@@ -146,6 +146,18 @@ class User extends Authenticatable {
|
||||
return $this->attributes['credit'] = $value * 100;
|
||||
}
|
||||
|
||||
public function getEnableTimeAttribute() {
|
||||
return $this->attributes['enable_time'];
|
||||
}
|
||||
|
||||
public function getExpireTimeAttribute() {
|
||||
return $this->attributes['expire_time'];
|
||||
}
|
||||
|
||||
public function getResetTimeAttribute() {
|
||||
return $this->attributes['reset_time'];
|
||||
}
|
||||
|
||||
// User查询,查那些用户有传入Node的权限
|
||||
public function scopeGroupUserPermit($query, $node_id = 0) {
|
||||
$groups = [0];
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
</div>
|
||||
<input type="text" class="form-control" name="reset_time" id="reset_time"/>
|
||||
</div>
|
||||
<span class="text-help"> 账号流量重置日期 </span>
|
||||
<span class="text-help"> 账号流量下一个重置日期 </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
|
||||
Reference in New Issue
Block a user