<?php

namespace app\home\controller;

class Index
{


    public function index()
    {
        if (!is_installed() && request() -> module() != 'install') {
            return redirect('install/index/index');
        }
        return '溪谷软件';
    }


    /**
     * @头部标题
     *
     * @author: zsl
     * @since: 2021/4/2 9:29
     */
    public function siteName()
    {
        $result = ['code' => 200, 'msg' => '请求成功', 'data' => ''];
        $siteName = get_option('site_name');
        if (empty($siteName) || empty($siteName['value'])) {
            $result['data'] = 'OA管理系统11111';
            return json($result);
        }
        $result['data'] = $siteName['value'];
        return json($result);
    }

}
