feat: mobile 联系我们留言页
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
// 这是系统自动生成的公共文件
|
||||
|
||||
use think\facade\Lang;
|
||||
|
||||
if (!function_exists('str_contains')) {
|
||||
/**
|
||||
* 检查字符串是否包含子字符串
|
||||
@@ -130,8 +132,11 @@ if (!function_exists('lang_i18n')) {
|
||||
if (is_null($name)) {
|
||||
return '';
|
||||
}
|
||||
$path = strtolower(request()->controller() . '/' . request()->action());
|
||||
$name = $path . '.' . $name;
|
||||
return lang($name, $vars, $lang);
|
||||
$path = strtolower(request()->controller() . '/' . request()->action());
|
||||
$full_name = $path . '.' . $name;
|
||||
if (!Lang::has($full_name, $lang)) {
|
||||
return $name;
|
||||
}
|
||||
return Lang::get($full_name, $vars, $lang);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user