瀏覽代碼

项目名称由配置文件改为后台数据库读取

NoNZero 9 年之前
父節點
當前提交
a6dd8b6beb
共有 1 個文件被更改,包括 16 次插入5 次删除
  1. 16 5
      protected/controller/ClientVerController.php

+ 16 - 5
protected/controller/ClientVerController.php

@@ -1,13 +1,18 @@
 <?php
-
+Doo::loadModelAt('aconfig', 'admin');
 /**
  * MainController
  * Feel free to delete the methods and replace them with your own code.
  *
  * @author NoNZero
  */
-class ClientVerController extends DooController {
+class ClientVerController extends DooController
+{
+    private $aconfig;
 
+    public function __construct() {
+        $this->aconfig = new AConfig();
+    }
     /**
      * 获取软件登陆界面显示文字
      */
@@ -16,9 +21,15 @@ class ClientVerController extends DooController {
 //	die();
 //    }
 //    佛清从
-    public function getLoginTitle() {
-	echo json_encode(array('status' => 'TRUE', 'msg' => DOO::conf()->PRO_NAME), JSON_UNESCAPED_UNICODE);
-	die();
+    public function getLoginTitle()
+    {
+        $proName = $this->aconfig->getOne(array('select' => 'proName', 'asArray' => TRUE))['proName'];
+        if(!isset($proName)){
+            $proName = '纵横';
+        }
+
+        echo json_encode(array('status' => 'TRUE', 'msg' => $proName), JSON_UNESCAPED_UNICODE);
+        die();
     }
 
 }