Browse Source

商家分离,另一套登录系统

lizhen_gitee 1 year ago
parent
commit
22d576a4a9

+ 2 - 2
application/api/controller/coach/User.php

@@ -1,6 +1,6 @@
 <?php
 
-namespace app\api\controller\company;
+namespace app\api\controller\coach;
 
 use app\common\controller\Apic;
 use app\common\library\Sms;
@@ -14,7 +14,7 @@ use think\Db;
  */
 class User extends Apic
 {
-    protected $noNeedLogin = ['accountlogin','resetpwd','getUserOpenid'];
+    protected $noNeedLogin = ['emaillogin','resetpwd'];
     protected $noNeedRight = '*';
 
 

+ 3 - 0
application/api/lang/zh-cn/coach/common.php

@@ -0,0 +1,3 @@
+<?php
+
+return [];

+ 41 - 0
application/api/lang/zh-cn/coach/user.php

@@ -0,0 +1,41 @@
+<?php
+
+return [
+    'User center'                           => '会员中心',
+    'Register'                              => '注册',
+    'Login'                                 => '登录',
+    'Sign up successful'                    => '注册成功',
+    'Username can not be empty'             => '用户名不能为空',
+    'Username must be 3 to 30 characters'   => '用户名必须3-30个字符',
+    'Username must be 6 to 30 characters'   => '用户名必须6-30个字符',
+    'Password can not be empty'             => '密码不能为空',
+    'Password must be 6 to 30 characters'   => '密码必须6-30个字符',
+    'Mobile is incorrect'                   => '手机格式不正确',
+    'Username already exist'                => '用户名已经存在',
+    'Nickname already exist'                => '昵称已经存在',
+    'Email already exist'                   => '邮箱已经存在',
+    'Mobile already exist'                  => '手机号已经存在',
+    'Username is incorrect'                 => '用户名不正确',
+    'Email is incorrect'                    => '邮箱不正确',
+    'Account is locked'                     => '账户已经被锁定',
+    'Password is incorrect'                 => '密码不正确',
+    'Account is incorrect'                  => '账户不正确',
+    'Account not exist'                     => '账户不存在',
+    'Account can not be empty'              => '账户不能为空',
+    'Username or password is incorrect'     => '用户名或密码不正确',
+    'You are not logged in'                 => '你当前还未登录',
+    'You\'ve logged in, do not login again' => '你已经存在,请不要重复登录',
+    'Profile'                               => '个人资料',
+    'Verify email'                          => '邮箱验证',
+    'Change password'                       => '修改密码',
+    'Captcha is incorrect'                  => '验证码不正确',
+    'Mobile Captcha is incorrect'                  => '手机验证码不正确',
+    'Email Captcha is incorrect'                  => '邮箱验证码不正确',
+    'Logged in successful'                  => '登录成功',
+    'Logout successful'                     => '退出成功',
+    'Operation failed'                      => '操作失败',
+    'Invalid parameters'                    => '参数不正确',
+    'Change password failure'               => '修改密码失败',
+    'Change password successful'            => '修改密码成功',
+    'Reset password successful'             => '重置密码成功',
+];

+ 1 - 2
application/common/library/Authcoach.php

@@ -25,8 +25,7 @@ class Authcoach
     //默认配置
     protected $config = [];
     protected $options = [];
-    //protected $allowFields = ['id', 'name', 'logo','image','contacts', 'mobile','province_name','city_name','area_name','province_id','city_id','area_id','address','full_address','longitude','latitude','aptitude_images','open_hours','staff'];
-    protected $allowFields = ['id','type','truename','mobile'];
+    protected $allowFields = ['id', 'username', 'mobile', 'avatar'];
 
 
     public function __construct($options = [])