Merge branch 'feature/ru' into develop

# Conflicts:
#	app/controller/UserController.php
#	config/constants/Constants.php
This commit is contained in:
2025-04-07 14:20:08 +08:00
3 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -5,6 +5,7 @@ namespace app\controller;
use app\model\CustomerTag;
use app\model\TagGroup;
use app\util\Util;
use config\constants\Constants;
use support\Request;
class TagGroupController
@@ -14,7 +15,7 @@ class TagGroupController
public function list(Request $request)
{
$list = TagGroup::with('tags')->get();
$languageArr = config('translation.fallback_locale');
$languageArr = Constants::LANGUAGE;
$language = $request->user['language'];
foreach ($list as &$item) {
$item['names'] = unserialize($item['names']);
+1 -1
View File
@@ -330,7 +330,7 @@ class UserController
if (Util::isEmpty($language)) {
return Util::fail([], 'language' . trans('not_null'));
}
if (!in_array($language, ['en', 'zh_CN','ru'])) {
if (!in_array($language, Constants::LANGUAGE)) {
return Util::fail([], trans('param_error'));
}
$data = [
+2
View File
@@ -98,4 +98,6 @@ class Constants
['id' => 'xinyouhe', 'name' => '新友合'],
['id' => 'mbaf', 'name' => 'MAGIC BRIDGE AUTO FZE']
];
public const LANGUAGE = ['en', 'zh_CN','ru'];
}