Browse Source

协议语言包

lizhen_gitee 1 year ago
parent
commit
7cff01ca61
1 changed files with 4 additions and 1 deletions
  1. 4 1
      application/index/controller/Index.php

+ 4 - 1
application/index/controller/Index.php

@@ -4,6 +4,7 @@ namespace app\index\controller;
 
 use think\Controller;
 use think\Db;
+
 class Index extends Controller
 {
 
@@ -18,7 +19,9 @@ class Index extends Controller
         if(!$key){
             exit;
         }
-        $lang = input('lang','');
+
+        $request = Request::instance();
+        $this->lang = $request->header('lang','CN');
 
         $content = Db::name('basedata')->where('key',$key)->find();