This commit is contained in:
2026-04-08 10:05:25 +08:00
parent 594aa137ef
commit b0e87b3fb3
34 changed files with 128 additions and 54 deletions
+13 -2
View File
@@ -40,6 +40,12 @@ class AlbumController extends BaseController
}else{
$list = $query->paginate($limit);
}
$list->each(function($item){
if($item->image){
$item['image_detail'] = \support\think\Db::name('gallery')->where('id',$item->image)->find();
}
return $item;
});
return $this->success('ok',$list);
}
/**
@@ -53,11 +59,16 @@ class AlbumController extends BaseController
{
$user_id = \support\Jwt\JwtToken::getCurrentId();
$data = [
'user_id' => $user_id,
'groupID' => $request->post('groupID'),
'userID' => $user_id,
'groupID' => input('groupID'),
'title' => input('title'),
'image' => input('image'),
];
log_alert($data);
if(!$data['groupID']){
return $this->error(__('Invalid parameters'));
}
$result = AlbumModel::create($data);
return $this->success('ok',$result);
}
+1 -1
View File
@@ -75,7 +75,7 @@ class ArticleController extends BaseController
{
$id = (int)input('id');
if (!$id) {
return $this->error(__("Invalid parameter"));
return $this->error(__("Invalid parameters"));
}
$vo = ArchivesModel::where('id', $id)->find();
+6 -4
View File
@@ -176,10 +176,12 @@ class CommonController extends BaseController{
//邀请码
//$invite_code = 'TEAJXLEE';
$region = Input('region','+86');
$region = str_replace('+','',$region);
$extends = [
'role_id' => 1,
'group_id' => 0,
'region' => '86',
'region' => $region,
'nickname' => input('nickname'),
'avatar' => '/static/avatar/'.rand(0,17).'.png',
];
@@ -331,7 +333,7 @@ class CommonController extends BaseController{
}else{
if ($mobile && Validate::regex($mobile, "^1\d{10}$")) {
captcha_verify('mobile','reset_pwd',$mobile);
$region = Input('region');
$region = Input('region','+86');
$region = str_replace('+','',$region);
$user = UserModel::where('region',$region)->where('mobile',$mobile)->find();
}else if ($email && Validate::is($email, "email")) {
@@ -434,7 +436,7 @@ class CommonController extends BaseController{
$user = \support\Jwt::getUser();
$email = $user->email;
} catch (\Exception $th) {
return $this->error(__('Incoret param'));
return $this->error(__('Invalid parameter'));
}
}
$key = 'captcha_'.$event.'_'.$email;
@@ -467,7 +469,7 @@ class CommonController extends BaseController{
$user = \support\Jwt::getUser();
$mobile = $user->mobile;
} catch (\Exception $th) {
return $this->error(__('Incoret param'));
return $this->error(__('Invalid parameter'));
}
}
if (!Validate::regex($mobile, "^1\d{10}$")) {
+1 -1
View File
@@ -111,7 +111,7 @@ class GroupController extends BaseController
//单文件上传
$groupID = $request->post('groupID');
if(!$groupID){
return $this->fail(__('参数错误'));
return $this->fail(__('Invalid parameter'));
}
$res = $this->_upload($request);
if(is_string($res)){
+2 -1
View File
@@ -48,7 +48,8 @@ class PassportController extends BaseController{
{
$user = \support\Jwt::getUser();
$mobile = input('mobile');
$region = input('region');
$region = input('region','+86');
$region = str_replace('+','',$region);
// 验证手机号格式
if (!$mobile || !Validate::regex($mobile, "^1\d{10}$")) {
+1 -1
View File
@@ -207,7 +207,7 @@ class UserController extends BaseController{
'user_id' => $user->id,
];
if(!$data['realname'] || !$data['idcard']){
return $this->error(__('Incoret param'));
return $this->error(__('Invalid parameter'));
}
if($user->realname_verify == 1){
return $this->error(__('You have verified'));