diff --git a/app/common.php b/app/common.php index 37309be1..1fa13ee4 100644 --- a/app/common.php +++ b/app/common.php @@ -104,6 +104,18 @@ if (!function_exists('array_to_tree')) { } } +if (!function_exists('array_flatten')) { + /** + * 将多维数组转换为一维数组 + * @param array $array + * @return array + */ + function array_flatten(array $array, int $depth = 1): array + { + return \think\helper\Arr::flatten($array, $depth); + } +} + if (!function_exists('thumb')) { /** * 获取缩略图 diff --git a/app/index/common.php b/app/index/common.php index 7fc6e0a6..7e901805 100644 --- a/app/index/common.php +++ b/app/index/common.php @@ -111,15 +111,3 @@ if (!function_exists('lang_i18n')) { return Lang::get($lang_key, $vars, $lang); } } - -if (!function_exists('array_flatten')) { - /** - * 将多维数组转换为一维数组 - * @param array $array - * @return array - */ - function array_flatten(array $array, int $depth = 1): array - { - return \think\helper\Arr::flatten($array, $depth); - } -} diff --git a/app/index/view/mobile/about_us/introduction.html b/app/index/view/mobile/about_us/introduction.html index 603a1a34..b401bce3 100644 --- a/app/index/view/mobile/about_us/introduction.html +++ b/app/index/view/mobile/about_us/introduction.html @@ -29,7 +29,7 @@