From 62d77f9f9629ef0d8e7b40138595f1b4e8458acd Mon Sep 17 00:00:00 2001
From: Karson <karsonzhang@163.com>
Date: Sat, 16 Sep 2017 09:43:52 +0800
Subject: [PATCH] 修复部分语言标识 修复前台首页统计错误

---
 application/admin/controller/auth/Admin.php | 5 +++++
 application/admin/controller/auth/Group.php | 2 +-
 application/index/view/index/index.html     | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/application/admin/controller/auth/Admin.php b/application/admin/controller/auth/Admin.php
index f5d0c5d..c89fbae 100644
--- a/application/admin/controller/auth/Admin.php
+++ b/application/admin/controller/auth/Admin.php
@@ -31,6 +31,11 @@ class Admin extends Backend
 
         $groupName = AuthGroup::where('id', 'in', $this->childrenGroupIds)
                 ->column('id,name');
+        foreach ($groupName as $k => &$v)
+        {
+            $v = __($v);
+        }
+        unset($v);
 
         $this->view->assign('groupdata', $groupName);
         $this->assignconfig("admin", ['id' => $this->auth->id]);
diff --git a/application/admin/controller/auth/Group.php b/application/admin/controller/auth/Group.php
index a82435e..5a19be4 100644
--- a/application/admin/controller/auth/Group.php
+++ b/application/admin/controller/auth/Group.php
@@ -272,7 +272,7 @@ class Group extends Backend
                     if (!$superadmin && !in_array($v['id'], $admin_rule_ids))
                         continue;
                     $state = array('selected' => in_array($v['id'], $current_rule_ids) && !in_array($v['id'], $hasChildrens));
-                    $nodelist[] = array('id' => $v['id'], 'parent' => $v['pid'] ? $v['pid'] : '#', 'text' => $v['title'], 'type' => 'menu', 'state' => $state);
+                    $nodelist[] = array('id' => $v['id'], 'parent' => $v['pid'] ? $v['pid'] : '#', 'text' => __($v['title']), 'type' => 'menu', 'state' => $state);
                 }
                 $this->success('', null, $nodelist);
             }
diff --git a/application/index/view/index/index.html b/application/index/view/index/index.html
index de6b143..93bf76a 100644
--- a/application/index/view/index/index.html
+++ b/application/index/view/index/index.html
@@ -181,7 +181,7 @@
                     console.log(installed);
                     if (!installed) {
                         $.ajax({
-                            url: "http://fast/api/statistics/installed",
+                            url: "{$Think.config.fastadmin.api_url}/statistics/installed",
                             data: {
                                 version: "{:config('fastadmin.version')}",
                                 os: "{$Think.PHP_OS}",
--
libgit2 0.24.0