81 lines
2.5 KiB
PHP
81 lines
2.5 KiB
PHP
<?php
|
||
// +----------------------------------------------------------------------
|
||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||
// +----------------------------------------------------------------------
|
||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||
// +----------------------------------------------------------------------
|
||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||
// +----------------------------------------------------------------------
|
||
// | Author: MY WORLD Team <bd@maiwd.cn> 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('校验失败');
|
||
}
|
||
}
|
||
}
|
||
|
||
|
||
|
||
|