Merge branch 'master' into develop

# Conflicts:
#	composer.json
#	composer.lock
#	config/route.php
This commit is contained in:
2025-03-21 15:46:23 +08:00
6 changed files with 35 additions and 34 deletions
+3 -3
View File
@@ -162,7 +162,7 @@ class CustomerController
$id = Util::getParam($request, 'id'); $id = Util::getParam($request, 'id');
$channel_id = Util::getParam($request, 'channel_id'); $channel_id = Util::getParam($request, 'channel_id');
if (Util::isEmpty($channel_id)) { if (Util::isEmpty($channel_id)) {
return Util::fail([], 'channel_id' . trans('not_null')); return Util::fail([], trans('channel_not_null'));
} }
$country_id = Util::getParam($request, 'country_id', 0); $country_id = Util::getParam($request, 'country_id', 0);
if (Util::isEmpty($country_id)) { if (Util::isEmpty($country_id)) {
@@ -170,13 +170,13 @@ class CustomerController
} }
$car_type_id = Util::getParam($request, 'car_type_id'); $car_type_id = Util::getParam($request, 'car_type_id');
if (Util::isEmpty($car_type_id)) { if (Util::isEmpty($car_type_id)) {
return Util::fail([], 'car_type_id' . trans('not_null')); return Util::fail([], trans('car_type_not_null'));
} }
$contacts = Util::getParam($request, 'contacts'); $contacts = Util::getParam($request, 'contacts');
$email = Util::getParam($request, 'email'); $email = Util::getParam($request, 'email');
$phone = Util::getParam($request, 'phone'); $phone = Util::getParam($request, 'phone');
if (Util::isEmpty($contacts) && Util::isEmpty($email) && Util::isEmpty($phone)) { if (Util::isEmpty($contacts) && Util::isEmpty($email) && Util::isEmpty($phone)) {
return Util::fail([], 'country_id' . trans('not_null')); return Util::fail([], trans('contacts_not_null'));
} }
$data = [ $data = [
+1 -1
View File
@@ -125,7 +125,7 @@ class FollowController
} }
$picture = Util::getParam($request,'picture'); $picture = Util::getParam($request,'picture');
if(Util::isEmpty($picture)){ if(Util::isEmpty($picture)){
return Util::fail([],'picture'.trans('not_null')); return Util::fail([],trans('picture_not_null'));
} }
$data = [ $data = [
+9 -6
View File
@@ -21,11 +21,11 @@ class UserController
$email = Util::getParam($request, 'email'); $email = Util::getParam($request, 'email');
$language = Util::getParam($request, 'language'); $language = Util::getParam($request, 'language');
if (Util::isEmpty($email)) { if (Util::isEmpty($email)) {
return Util::fail([], 'email' . trans('not_null')); return Util::fail([], trans('required_not_null'));
} }
$password = Util::getParam($request, 'password'); $password = Util::getParam($request, 'password');
if (Util::isEmpty($password)) { if (Util::isEmpty($password)) {
return Util::fail([], 'password' . trans('not_null')); return Util::fail([], trans('required_not_null'));
} }
$user = User::select(['id', 'name', 'sex', 'role', 'avatar', 'email', 'password']) $user = User::select(['id', 'name', 'sex', 'role', 'avatar', 'email', 'password'])
@@ -78,12 +78,15 @@ class UserController
{ {
$email = Util::getParam($request, 'email'); $email = Util::getParam($request, 'email');
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
return Util::fail([], 'email' . trans('not_null')); return Util::fail([], trans('required_not_null'));
} }
// 生成验证码 // 生成验证码
$code = str_pad(random_int(0, 999999), 6, '0', STR_PAD_LEFT); $code = str_pad(random_int(0, 999999), 6, '0', STR_PAD_LEFT);
// $verification_code = Redis::get("verification_code:{$email}");
// $code = $verification_code?:$code;
// return Util::success($code, '验证码已发送');
// 发送邮件 // 发送邮件
$mailService = new MailService(); $mailService = new MailService();
if ($mailService->sendVerificationCode($email, $code)) { if ($mailService->sendVerificationCode($email, $code)) {
@@ -106,14 +109,14 @@ class UserController
$email = Util::getParam($request, 'email', 'asdf'); $email = Util::getParam($request, 'email', 'asdf');
$code = Util::getParam($request, 'code'); $code = Util::getParam($request, 'code');
$sex = Util::getParam($request, 'sex', 0); $sex = Util::getParam($request, 'sex', 0);
$name = Util::getParam($request, 'name', 0); $name = Util::getParam($request, 'name', '');
$password = Util::getParam($request, 'password'); $password = Util::getParam($request, 'password');
$mobile = Util::getParam($request, 'mobile'); $mobile = Util::getParam($request, 'mobile');
$id = Util::getParam($request, 'id'); $id = Util::getParam($request, 'id');
$language = Util::getParam($request, 'language'); $language = Util::getParam($request, 'language');
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
return Util::fail([], 'email' . $email . trans('not_null')); return Util::fail([], trans('required_not_null'));
} }
$res = User::select('id', 'email') $res = User::select('id', 'email')
@@ -124,7 +127,7 @@ class UserController
// } // }
if (Util::isEmpty($name)) { if (Util::isEmpty($name)) {
return Util::fail([], 'name' . trans('not_null')); // return Util::fail([], trans('required_not_null'));
} }
$verification_code = Redis::get("verification_code:{$email}"); $verification_code = Redis::get("verification_code:{$email}");
Generated
+12 -24
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "ab7f80fdfdb27cc3009ad39dfc7f315f", "content-hash": "1a64bcf537bed214294c8043291f03f3",
"packages": [ "packages": [
{ {
"name": "aliyuncs/oss-sdk-php", "name": "aliyuncs/oss-sdk-php",
@@ -736,26 +736,20 @@
}, },
{ {
"name": "iidestiny/flysystem-oss", "name": "iidestiny/flysystem-oss",
"version": "4.0", "version": "4.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/iiDestiny/flysystem-oss.git", "url": "https://github.com/iiDestiny/flysystem-oss.git",
"reference": "6b6cf6850be377c484c086505d942e61afa2875c" "reference": "154ccb26075a20b350e2357289bfeabe3ca79ba0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/iiDestiny/flysystem-oss/zipball/6b6cf6850be377c484c086505d942e61afa2875c", "url": "https://api.github.com/repos/iiDestiny/flysystem-oss/zipball/154ccb26075a20b350e2357289bfeabe3ca79ba0",
"reference": "6b6cf6850be377c484c086505d942e61afa2875c", "reference": "154ccb26075a20b350e2357289bfeabe3ca79ba0",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"aliyuncs/oss-sdk-php": "^2.4", "aliyuncs/oss-sdk-php": "^2",
"ext-curl": "*", "ext-curl": "*",
"ext-json": "*", "ext-json": "*",
"ext-openssl": "*", "ext-openssl": "*",
@@ -763,8 +757,8 @@
"php": "^8.0.2" "php": "^8.0.2"
}, },
"require-dev": { "require-dev": {
"mockery/mockery": "^1.2", "mockery/mockery": "^1.5",
"phpunit/phpunit": "^6.5", "phpunit/phpunit": "^9.5",
"symfony/var-dumper": "^3.4" "symfony/var-dumper": "^3.4"
}, },
"type": "library", "type": "library",
@@ -792,9 +786,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/iiDestiny/flysystem-oss/issues", "issues": "https://github.com/iiDestiny/flysystem-oss/issues",
"source": "https://github.com/iiDestiny/flysystem-oss/tree/4.0" "source": "https://github.com/iiDestiny/flysystem-oss/tree/4.5"
}, },
"time": "2022-04-19T06:23:50+00:00" "time": "2025-02-12T05:54:03+00:00"
}, },
{ {
"name": "illuminate/bus", "name": "illuminate/bus",
@@ -2603,13 +2597,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/shopwwi/webman-filesystem/zipball/de33afdbfc56678323f1aafb8d011d79378d164a", "url": "https://api.github.com/repos/shopwwi/webman-filesystem/zipball/de33afdbfc56678323f1aafb8d011d79378d164a",
"reference": "de33afdbfc56678323f1aafb8d011d79378d164a", "reference": "de33afdbfc56678323f1aafb8d011d79378d164a",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"league/flysystem": "^2.3|^3.0", "league/flysystem": "^2.3|^3.0",
+5
View File
@@ -17,4 +17,9 @@ return [
'language_success' => ' Successfully switched languages', 'language_success' => ' Successfully switched languages',
'language_fail' => ' Language switching failed', 'language_fail' => ' Language switching failed',
'param_error' => ' param error', 'param_error' => ' param error',
'required_not_null' => ' required not_ ull',
'picture_not_null' => ' picture not null',
'contacts_not_null' => ' Contact person, email, and phone cannot be empty at the same time',
'car_type_not_null' => ' preference_not_null',
'channel_not_null' => ' channel not null',
]; ];
+5
View File
@@ -17,4 +17,9 @@ return [
'language_success' => ' 切换语言成功', 'language_success' => ' 切换语言成功',
'language_fail' => ' 切换语言失败', 'language_fail' => ' 切换语言失败',
'param_error' => ' 参数错误', 'param_error' => ' 参数错误',
'required_not_null' => ' 必填项不能为空',
'picture_not_null' => ' 图片不能为空',
'contacts_not_null' => ' 联系人,邮箱,电话不能同时为空',
'car_type_not_null' => ' 偏好不能为空',
'channel_not_null' => ' 渠道不能为空',
]; ];