TaoLer/app/admin/model/System.php

28 lines
383 B
PHP
Raw Normal View History

2020-01-01 13:17:19 +08:00
<?php
namespace app\admin\model;
use think\Model;
2021-07-07 17:40:43 +08:00
use think\facade\Cache;
2020-01-01 13:17:19 +08:00
class System extends Model
{
//登陆校验
2021-07-07 17:40:43 +08:00
public function sets($data,$cy)
2020-01-01 13:17:19 +08:00
{
2021-07-07 17:40:43 +08:00
$sys = $this::find(1);
if($cy == 0){
unset($data['copyright']);
}
$res = $sys->save($data);
if($res){
Cache::delete('system');
return 1;
} else {
return Lang::get('edit error');
}
2020-01-01 13:17:19 +08:00
}
}