|
|
@@ -104,7 +104,26 @@ class Login extends Controller
|
|
|
if ($backData['code'] != 1) {
|
|
|
return json(['code' => -2, 'data' => [], 'msg' => '验证码错误']);
|
|
|
}
|
|
|
+
|
|
|
+ return json($backData);
|
|
|
}
|
|
|
+
|
|
|
+ // 验证码验证.
|
|
|
+ $securityCode = isset($param['securityCode']) ? $param['securityCode'] : '';
|
|
|
+ $securityData = json_encode([
|
|
|
+ 'platformUser' => $userAccount,
|
|
|
+ 'code' => $securityCode,
|
|
|
+ ], 256);
|
|
|
+ $securityToken = lock_url($securityData, $platformData['platform_code']);
|
|
|
+ $platformUrl = $platformData['platform_url_code'] . '?backSystem=' . $securityToken . '&platformCode=' . $platformData['platform_code'];
|
|
|
+ $backData = json_decode(make_request($platformUrl, ''), true);
|
|
|
+ if($this->_checkEnabledValid()==1){
|
|
|
+ if ($backData['code'] != 1) {
|
|
|
+ return json(['code' => -2, 'data' => [], 'msg' => '验证码错误']);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
$this->assign([
|
|
|
'token' => $token,
|
|
|
@@ -114,7 +133,12 @@ class Login extends Controller
|
|
|
|
|
|
return json(['code' => 1, 'data' => ['user' => $user[0]], 'msg' => '登录成功']);
|
|
|
}
|
|
|
-
|
|
|
+ private function _checkEnabledValid()
|
|
|
+ {
|
|
|
+ $checkcode = db('platform')->where('platform_code', 'Customer-Service')->find();
|
|
|
+ $chkcode = $checkcode ? $checkcode['platform_status'] : 1;
|
|
|
+ return $chkcode;
|
|
|
+ }
|
|
|
public function loginOut()
|
|
|
{
|
|
|
|