diff --git a/app/api/controller/AlbumController.php b/app/api/controller/AlbumController.php index 5d36640..5d492da 100644 --- a/app/api/controller/AlbumController.php +++ b/app/api/controller/AlbumController.php @@ -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); } diff --git a/app/api/controller/ArticleController.php b/app/api/controller/ArticleController.php index 5149eaa..7cf05cd 100755 --- a/app/api/controller/ArticleController.php +++ b/app/api/controller/ArticleController.php @@ -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(); diff --git a/app/api/controller/CommonController.php b/app/api/controller/CommonController.php index ee8837d..01388b5 100755 --- a/app/api/controller/CommonController.php +++ b/app/api/controller/CommonController.php @@ -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}$")) { diff --git a/app/api/controller/GroupController.php b/app/api/controller/GroupController.php index 0f4e58a..19b1553 100755 --- a/app/api/controller/GroupController.php +++ b/app/api/controller/GroupController.php @@ -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)){ diff --git a/app/api/controller/PassportController.php b/app/api/controller/PassportController.php index 453e38d..e574e15 100644 --- a/app/api/controller/PassportController.php +++ b/app/api/controller/PassportController.php @@ -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}$")) { diff --git a/app/api/controller/UserController.php b/app/api/controller/UserController.php index 6371ef9..44fa3ba 100755 --- a/app/api/controller/UserController.php +++ b/app/api/controller/UserController.php @@ -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')); diff --git a/resource/translations/zh-Hans/testproductbuy.php b/resource/translations/en/api/album.php old mode 100755 new mode 100644 similarity index 100% rename from resource/translations/zh-Hans/testproductbuy.php rename to resource/translations/en/api/album.php diff --git a/resource/translations/en/api/article.php b/resource/translations/en/api/article.php index a529b16..053054d 100755 --- a/resource/translations/en/api/article.php +++ b/resource/translations/en/api/article.php @@ -1,4 +1,5 @@ 'Article does not exist', + 'Invalid parameter' => 'Invalid parameter', ); \ No newline at end of file diff --git a/resource/translations/en/api/collection.php b/resource/translations/en/api/collection.php new file mode 100644 index 0000000..2deffbd --- /dev/null +++ b/resource/translations/en/api/collection.php @@ -0,0 +1,4 @@ + 'The field %field% must be not empty. ', +); \ No newline at end of file diff --git a/resource/translations/en/api/common.php b/resource/translations/en/api/common.php index 49a97de..90d00ee 100755 --- a/resource/translations/en/api/common.php +++ b/resource/translations/en/api/common.php @@ -13,7 +13,6 @@ return array ( 'Only one verification code can be sent within %second% seconds' => 'Only one verification code can be sent within %second% seconds', 'Email sent successfully' => 'Email sent successfully', 'Captcha is incorrect' => 'Captcha is incorrect', - 'Mt email code' => 'Mt email code', '错误的邀请码' => '错误的邀请码', 'Incoret param' => 'Incoret param', 'Trade password must be 6 characters' => 'Trade password must be 6 characters', @@ -22,4 +21,6 @@ return array ( 'Username is incorrect' => 'Username is incorrect', 'Password must be 6 to 32 characters' => 'Password must be 6 to 32 characters', 'Trade password must be 6-32 characters' => 'Trade password must be 6-32 characters', + 'Unknown verify type' => 'Unknown verify type', + 'Invalid parameter' => 'Invalid parameter', ); \ No newline at end of file diff --git a/resource/translations/zh-Hans/testrolebuy.php b/resource/translations/en/api/gallery.php old mode 100755 new mode 100644 similarity index 100% rename from resource/translations/zh-Hans/testrolebuy.php rename to resource/translations/en/api/gallery.php diff --git a/resource/translations/en/api/group.php b/resource/translations/en/api/group.php index a2248ca..cf1223a 100644 --- a/resource/translations/en/api/group.php +++ b/resource/translations/en/api/group.php @@ -1,4 +1,5 @@ '参数错误', + 'Invalid parameter' => 'Invalid parameter', ); \ No newline at end of file diff --git a/resource/translations/en/api/moments.php b/resource/translations/en/api/moments.php new file mode 100644 index 0000000..6cf866c --- /dev/null +++ b/resource/translations/en/api/moments.php @@ -0,0 +1,3 @@ + 'Invalid verify type', + 'Security verify successfully' => 'Security verify successfully', + 'Incorrect mobile number format' => 'Incorrect mobile number format', + 'Mobile number already exists' => 'Mobile number already exists', + 'Mobile number bound successfully' => 'Mobile number bound successfully', + 'Incorrect email format' => 'Incorrect email format', + 'Email already exists' => 'Email already exists', + 'Email bound successfully' => 'Email bound successfully', + 'Username length must be between 3 and 20 characters' => 'Username length must be between 3 and 20 characters', + 'Username already exists' => 'Username already exists', + 'Username bound successfully' => 'Username bound successfully', + 'Mobile number not bound' => 'Mobile number not bound', + 'Mobile number unbound successfully' => 'Mobile number unbound successfully', + 'Email not bound' => 'Email not bound', + 'Email unbound successfully' => 'Email unbound successfully', +); \ No newline at end of file diff --git a/resource/translations/en/api/user.php b/resource/translations/en/api/user.php index 46eea58..77dc4ca 100755 --- a/resource/translations/en/api/user.php +++ b/resource/translations/en/api/user.php @@ -8,4 +8,5 @@ return array ( 'Incoret param' => 'Incoret param', 'You have verified' => 'You have verified', 'ID card already exists' => 'ID card already exists', + 'Invalid parameter' => 'Invalid parameter', ); \ No newline at end of file diff --git a/resource/translations/zh-Hans/api/album.php b/resource/translations/zh-Hans/api/album.php new file mode 100644 index 0000000..6cf866c --- /dev/null +++ b/resource/translations/zh-Hans/api/album.php @@ -0,0 +1,3 @@ + 'Incorrect title', - 'Incorrect amount' => 'Incorrect amount', - 'Incorrect quantity' => 'Incorrect quantity', - 'Insufficient balance' => 'Insufficient balance', + 'Incorrect title' => '标题不正确', + 'Incorrect amount' => '金额不正确', + 'Incorrect quantity' => '数量不正确', + 'Insufficient balance' => '余额不足', ); \ No newline at end of file diff --git a/resource/translations/zh-Hans/api/collection.php b/resource/translations/zh-Hans/api/collection.php new file mode 100644 index 0000000..a350b86 --- /dev/null +++ b/resource/translations/zh-Hans/api/collection.php @@ -0,0 +1,4 @@ + '%field%不能为空. ', +); \ No newline at end of file diff --git a/resource/translations/zh-Hans/api/common.php b/resource/translations/zh-Hans/api/common.php index 8af38d9..419c234 100755 --- a/resource/translations/zh-Hans/api/common.php +++ b/resource/translations/zh-Hans/api/common.php @@ -15,12 +15,12 @@ return array ( 'Reset Trade password successful' => '重置交易密码成功', 'Only one verification code can be sent within %second% seconds' => '在%秒%秒内只能发送一个验证码', 'Email sent successfully' => '邮件发送成功', - 'Mt email code' => 'Mt email code', '错误的邀请码' => '错误的邀请码', - 'Incoret param' => 'Incoret param', - 'Unknown register way' => 'Unknown register way', - 'Username is incorrect' => 'Username is incorrect', - 'Password must be 6 to 32 characters' => 'Password must be 6 to 32 characters', - 'Trade password must be 6-32 characters' => 'Trade password must be 6-32 characters', - 'SMS sent successfully' => 'SMS sent successfully', + 'Unknown register way' => '未知注册方式', + 'Username is incorrect' => '用户名不正确', + 'Password must be 6 to 32 characters' => '密码长度必须为6到32个字符', + 'Trade password must be 6-32 characters' => '交易密码长度必须为6-32个字符', + 'SMS sent successfully' => '短信发送成功', + 'Unknown verify type' => '未知验证类型', + 'Invalid parameter' => '参数无效', ); \ No newline at end of file diff --git a/resource/translations/zh-Hans/api/gallery.php b/resource/translations/zh-Hans/api/gallery.php new file mode 100644 index 0000000..6cf866c --- /dev/null +++ b/resource/translations/zh-Hans/api/gallery.php @@ -0,0 +1,3 @@ + 'Product does not exist', - 'Gift is incorrect' => 'Gift is incorrect', - 'Denomination is incorrect' => 'Denomination is incorrect', - 'Insufficient balance' => 'Insufficient balance', - 'Quantity is incorrect' => 'Quantity is incorrect', - 'Gift stock is insufficient' => 'Gift stock is insufficient', + 'Product does not exist' => '产品不存在', + 'Gift is incorrect' => '礼物不正确', + 'Denomination is incorrect' => '面额不正确', + 'Insufficient balance' => '余额不足', + 'Quantity is incorrect' => '数量不正确', + 'Gift stock is insufficient' => '礼物库存不足', ); \ No newline at end of file diff --git a/resource/translations/zh-Hans/api/group.php b/resource/translations/zh-Hans/api/group.php index a2248ca..9aa1b72 100644 --- a/resource/translations/zh-Hans/api/group.php +++ b/resource/translations/zh-Hans/api/group.php @@ -1,4 +1,5 @@ '参数错误', + 'Invalid parameter' => '参数无效', ); \ No newline at end of file diff --git a/resource/translations/zh-Hans/api/moments.php b/resource/translations/zh-Hans/api/moments.php new file mode 100644 index 0000000..6cf866c --- /dev/null +++ b/resource/translations/zh-Hans/api/moments.php @@ -0,0 +1,3 @@ + '验证类型无效', + 'Security verify successfully' => '安全验证成功', + 'Incorrect mobile number format' => '手机号码格式不正确', + 'Mobile number already exists' => '手机号码已存在', + 'Mobile number bound successfully' => '手机号码绑定成功', + 'Incorrect email format' => '邮箱格式不正确', + 'Email already exists' => '邮箱已存在', + 'Email bound successfully' => '邮箱绑定成功', + 'Username length must be between 3 and 20 characters' => '用户名长度必须在3到20个字符之间', + 'Username already exists' => '用户名已存在', + 'Username bound successfully' => '用户名绑定成功', + 'Mobile number not bound' => '手机号码未绑定', + 'Mobile number unbound successfully' => '手机号码解绑成功', + 'Email not bound' => '邮箱未绑定', + 'Email unbound successfully' => '邮箱解绑成功', +); \ No newline at end of file diff --git a/resource/translations/zh-Hans/api/productorder.php b/resource/translations/zh-Hans/api/productorder.php index 32b6976..f112c28 100755 --- a/resource/translations/zh-Hans/api/productorder.php +++ b/resource/translations/zh-Hans/api/productorder.php @@ -6,6 +6,6 @@ return array ( 'Out of stock product' => '产品缺货', 'Insufficient balance' => '余额不足', 'You can only purchase %max_quantity% copies' => '你只能购买%max_quantity%份', - 'Quantity is incorrect' => 'Quantity is incorrect', + 'Quantity is incorrect' => '数量不正确', '微量包每个用户只能购买一个' => '微量包每个用户只能购买一个', ); \ No newline at end of file diff --git a/resource/translations/zh-Hans/api/questionnaire.php b/resource/translations/zh-Hans/api/questionnaire.php index ef5e623..5ded322 100755 --- a/resource/translations/zh-Hans/api/questionnaire.php +++ b/resource/translations/zh-Hans/api/questionnaire.php @@ -1,8 +1,8 @@ 'Product does not exist', - 'Questionnaire does not exist' => 'Questionnaire does not exist', - 'Incorrect parameter' => 'Incorrect parameter', - 'Server is not exist' => 'Server is not exist', - 'Server is not exist %sadds_f%' => 'Server is not exist %sadds_f%', + 'Product does not exist' => '产品不存在', + 'Questionnaire does not exist' => '问卷不存在', + 'Incorrect parameter' => '参数不正确', + 'Server is not exist' => '服务器不存在', + 'Server is not exist %sadds_f%' => '服务器不存在 %sadds_f%', ); \ No newline at end of file diff --git a/resource/translations/zh-Hans/api/recharge.php b/resource/translations/zh-Hans/api/recharge.php index d7aabcd..0af4f57 100755 --- a/resource/translations/zh-Hans/api/recharge.php +++ b/resource/translations/zh-Hans/api/recharge.php @@ -8,5 +8,5 @@ return array ( 'exist' => '已存在', 'You have reached the limit of uncompleted orders ( %max% ). Please complete the existing orders before trying to create another one.' => '订单已达上限,请完成订单或15分钟后再试', 'Minimum recharge of %num%' => '最低充值额 %num%', - 'Order not exsit' => 'Order not exsit', + 'Order not exsit' => '订单不存在', ); \ No newline at end of file diff --git a/resource/translations/zh-Hans/api/signin.php b/resource/translations/zh-Hans/api/signin.php index aa7ee10..0040e3d 100755 --- a/resource/translations/zh-Hans/api/signin.php +++ b/resource/translations/zh-Hans/api/signin.php @@ -1,6 +1,6 @@ 'Please login first', + 'Please login first' => '请先登录', '今日已签到' => '今日已签到', '请上传2张图片' => '请上传2张图片', '请明日再来' => '请明日再来', @@ -9,5 +9,5 @@ return array ( '日期格式错误' => '日期格式错误', '补签日期不能大于今天' => '补签日期不能大于今天', '该日已签到' => '该日已签到', - 'Please complete real-name verification first' => 'Please complete real-name verification first', + 'Please complete real-name verification first' => '请先完成实名认证', ); \ No newline at end of file diff --git a/resource/translations/zh-Hans/api/team.php b/resource/translations/zh-Hans/api/team.php index f2b0405..a630f34 100755 --- a/resource/translations/zh-Hans/api/team.php +++ b/resource/translations/zh-Hans/api/team.php @@ -3,9 +3,9 @@ return array ( '普通用户' => '普通用户', 'VIP' => 'VIP', '渠道商' => '渠道商', - 'Invalid user' => 'Invalid user', - 'Access denied' => 'Access denied', - 'It cannot be lower than the user\\\'s current level' => 'It cannot be lower than the user\\\'s current level', + 'Invalid user' => '无效用户', + 'Access denied' => '访问被拒绝', + 'It cannot be lower than the user\'s current level' => '不能低于用户当前等级', 'V1' => 'V1', 'V2' => 'V2', 'V3' => 'V3', diff --git a/resource/translations/zh-Hans/api/thali.php b/resource/translations/zh-Hans/api/thali.php index ec1587c..c06c2d5 100644 --- a/resource/translations/zh-Hans/api/thali.php +++ b/resource/translations/zh-Hans/api/thali.php @@ -1,7 +1,7 @@ 'Role does not exist', - 'Your level is too high to purchase this character' => 'Your level is too high to purchase this character', - 'This character group is not allowed to be sold' => 'This character group is not allowed to be sold', - 'Insufficient balance' => 'Insufficient balance', + 'Role does not exist' => '角色不存在', + 'Your level is too high to purchase this character' => '您的等级过高,无法购买此角色', + 'This character group is not allowed to be sold' => '该角色组不允许出售', + 'Insufficient balance' => '余额不足', ); \ No newline at end of file diff --git a/resource/translations/zh-Hans/api/user.php b/resource/translations/zh-Hans/api/user.php index 28372f7..334dee2 100755 --- a/resource/translations/zh-Hans/api/user.php +++ b/resource/translations/zh-Hans/api/user.php @@ -5,7 +5,7 @@ return array ( 'The system is under maintenance, please wait...' => '系统正在维护中,请稍等…', 'User is incorrect' => '用户名不正确', 'Trade successful' => '交易成功', - 'Incoret param' => 'Incoret param', - 'You have verified' => 'You have verified', - 'ID card already exists' => 'ID card already exists', + 'You have verified' => '您已验证', + 'ID card already exists' => '身份证已存在', + 'Invalid parameter' => '参数无效', ); \ No newline at end of file diff --git a/resource/translations/zh-Hans/api/wallet.php b/resource/translations/zh-Hans/api/wallet.php index 02d11a5..443e52f 100755 --- a/resource/translations/zh-Hans/api/wallet.php +++ b/resource/translations/zh-Hans/api/wallet.php @@ -1,9 +1,9 @@ 'The system is under maintenance, please wait...', - 'Exchange successful' => 'Exchange successful', - 'User is incorrect' => 'User is incorrect', - 'Insufficient balance' => 'Insufficient balance', - 'Transfer successful' => 'Transfer successful', + 'The system is under maintenance, please wait...' => '系统正在维护中,请稍等…', + 'Exchange successful' => '兑换成功', + 'User is incorrect' => '用户不正确', + 'Insufficient balance' => '余额不足', + 'Transfer successful' => '转账成功', '卡密不存在' => '卡密不存在', ); \ No newline at end of file diff --git a/resource/translations/zh-Hans/index.php b/resource/translations/zh-Hans/index.php index a529b16..cb57b5e 100755 --- a/resource/translations/zh-Hans/index.php +++ b/resource/translations/zh-Hans/index.php @@ -1,4 +1,4 @@ 'Article does not exist', + 'Article does not exist' => '文章不存在', ); \ No newline at end of file diff --git a/resource/translations/zh-Hant/api/common.php b/resource/translations/zh-Hant/api/common.php index 7f03e36..9d8e9c1 100644 --- a/resource/translations/zh-Hant/api/common.php +++ b/resource/translations/zh-Hant/api/common.php @@ -12,7 +12,6 @@ return array ( 'Reset Trade password successful' => '重置交易密码成功', 'Only one verification code can be sent within %second% seconds' => '在%秒%秒内只能发送一个验证码', 'Email sent successfully' => '邮件发送成功', - 'Mt email code' => '邮箱验证码', '错误的邀请码' => '错误的邀请码', 'Trade password must be 6 characters' => '交易密码必须为6个字符', 'Incoret param' => '参数不正确',