123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
-
-
- $plugins_route = [];
-
-
- $weappRow = \think\Db::name('weapp')->field('code')->where([
- 'status' => 1,
- ])->cache(true, null, "weapp")->select();
- foreach ($weappRow as $key => $val) {
- $file = WEAPP_DIR_NAME.DS.$val['code'].DS.'route.php';
- if (file_exists($file)) {
- $route_value = include_once $file;
- if (!empty($route_value) && is_array($route_value)) {
- $plugins_route = array_merge($route_value, $plugins_route);
- }
- }
- }
-
-
- $route = array(
- '__pattern__' => array(),
- '__alias__' => array(),
- '__domain__' => array(),
- );
-
- $route = array_merge($route, $plugins_route);
-
- return $route;
|