dever %!s(int64=6) %!d(string=hai) anos
pai
achega
a4901975a1
Modificáronse 2 ficheiros con 8 adicións e 2 borrados
  1. 1 0
      main/lib/Core.php
  2. 7 2
      main/src/View.php

+ 1 - 0
main/lib/Core.php

@@ -23,6 +23,7 @@ class Core
 
 
         # 获取基本配置
         # 获取基本配置
         $this->data['config'] = Dever::db('main/config')->one();
         $this->data['config'] = Dever::db('main/config')->one();
+        $this->data['system'] = Dever::input('system', 1);
     }
     }
 
 
     # 图片处理
     # 图片处理

+ 7 - 2
main/src/View.php

@@ -151,8 +151,13 @@ class View extends Core
         if (!$key) {
         if (!$key) {
             Dever::alert('您访问的页面有误');
             Dever::alert('您访问的页面有误');
         }
         }
-        
-        return Dever::db('content/page')->one(array('key' => $key));
+
+        $info = Dever::db('content/page')->one(array('key' => $key . '_' . $this->data['system']));
+        if (!$info) {
+            $info = Dever::db('content/page')->one(array('key' => $key));
+        }
+
+        return $info;
     }
     }
 
 
     # 根据类型,获取详情的html页面
     # 根据类型,获取详情的html页面