www.maiwd.cn // +---------------------------------------------------------------------- /** * Class Screen * Desc 数据大屏 * Create on 2024/7/2 9:55 * Create by wangyafang */ namespace app\api\controller\wdsxh; use app\common\controller\Api; class ScreenValidate extends Api { protected $noNeedLogin = ['*']; protected $noNeedRight = ['*']; public function _initialize() { parent::_initialize(); } /** * Desc 头部信息 * Create on 2024/7/2 10:08 * Create by wangyafang */ public function header() { if(!$this->request->isGet()) { $this->error('请求类型错误'); } $data = (new \app\api\model\wdsxh\business\Association())->where('id',1) ->field('logo') ->find(); $data['name'] = (new \app\admin\model\wdsxh\Config())->where('id',1)->value('data_screen_title'); $config = (new \app\admin\model\wdsxh\Config())->where('id',1)->find(); $data_screen_password_switch = $config['data_screen_password_switch'] ?? '2'; $data['data_screen_password_switch'] = $data_screen_password_switch; $this->success('请求成功',$data); } /** * Desc 校验开屏密码 * Create on 2025/10/29 下午3:26 * Create by wangyafang */ public function checkPassword() { if(!$this->request->isGet()) { $this->error('请求类型错误'); } $password = $this->request->get('password'); if(!$password) { $this->error('密码不能为空'); } $data_screen_password = (new \app\admin\model\wdsxh\Config()) ->where('id',1) ->value('data_screen_password'); if($password == $data_screen_password) { $this->success('校验成功'); } else { $this->error('校验失败'); } } }