作者 赵彬吉

update

@@ -62,7 +62,7 @@ class LoginController extends BaseController @@ -62,7 +62,7 @@ class LoginController extends BaseController
62 * @time :2023/8/7 9:07 62 * @time :2023/8/7 9:07
63 */ 63 */
64 public function getAccessAddress(LoginLogic $logic){ 64 public function getAccessAddress(LoginLogic $logic){
65 - $data = $logic->accessAddress($this->uid); 65 + $data = $logic->accessAddress($this->manage['mobile']);
66 return $this->response('success',Code::SUCCESS,$data); 66 return $this->response('success',Code::SUCCESS,$data);
67 } 67 }
68 68
@@ -11,6 +11,7 @@ use App\Models\Manage\MenuSpecial; @@ -11,6 +11,7 @@ use App\Models\Manage\MenuSpecial;
11 use App\Models\Project\Project; 11 use App\Models\Project\Project;
12 use App\Models\Service\Service; 12 use App\Models\Service\Service;
13 use App\Models\Sms\SmsLog; 13 use App\Models\Sms\SmsLog;
  14 +use App\Models\User\User;
14 use App\Utils\EncryptUtils; 15 use App\Utils\EncryptUtils;
15 use Illuminate\Support\Facades\Cache; 16 use Illuminate\Support\Facades\Cache;
16 use Illuminate\Support\Facades\Hash; 17 use Illuminate\Support\Facades\Hash;
@@ -110,7 +111,7 @@ class LoginLogic extends BaseLogic @@ -110,7 +111,7 @@ class LoginLogic extends BaseLogic
110 * @method :post 111 * @method :post
111 * @time :2023/8/7 9:09 112 * @time :2023/8/7 9:09
112 */ 113 */
113 - public function accessAddress($user_id){ 114 + public function accessAddress($mobile){
114 $serviceSettingModel = new Service(); 115 $serviceSettingModel = new Service();
115 $info = $serviceSettingModel->read(['type'=>4]); 116 $info = $serviceSettingModel->read(['type'=>4]);
116 if($info === false){ 117 if($info === false){
@@ -124,7 +125,11 @@ class LoginLogic extends BaseLogic @@ -124,7 +125,11 @@ class LoginLogic extends BaseLogic
124 //演示账号 用自己的号登录 125 //演示账号 用自己的号登录
125 if(!empty($this->param['project_id']) && $this->param['project_id'] == Project::DEMO_PROJECT_ID){ 126 if(!empty($this->param['project_id']) && $this->param['project_id'] == Project::DEMO_PROJECT_ID){
126 unset($this->param['project_id']); 127 unset($this->param['project_id']);
127 - $this->param['user_id'] = $user_id; 128 + $user = User::where('mobile', $mobile)->first();
  129 + if(!$user){
  130 + $this->fail('未在演示项目注册账号');
  131 + }
  132 + $this->param['user_id'] = $user->id;
128 } 133 }
129 //获取超级管理员登录 134 //获取超级管理员登录
130 if(isset($this->param['project_id']) && !empty($this->param['project_id'])){ 135 if(isset($this->param['project_id']) && !empty($this->param['project_id'])){