|
@@ -65,23 +65,28 @@ class UserApi {
|
|
|
}
|
|
|
|
|
|
public function checkPwd() {
|
|
|
- if (!$this->_checkPwd() && $this->usertype == 2 && in_array($this->info["source"], [1, 2])) {
|
|
|
- //source3是新系统注册,企业号登录密码不正确时,验证一下是不是聚财账号
|
|
|
- if ($this->info["source"] == 1) {
|
|
|
- if (!$this->info["jUsername"]) {
|
|
|
- return false;
|
|
|
+ if ($this->_checkPwd()) {
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ if ($this->usertype == 2 && in_array($this->info["source"], [1, 2])) {
|
|
|
+ //source3是新系统注册,企业号登录密码不正确时,验证一下是不是聚财账号
|
|
|
+ if ($this->info["source"] == 1) {
|
|
|
+ if (!$this->info["jUsername"]) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- try {
|
|
|
- $res = JucaiApi::login($this->username, $this->password, 1);
|
|
|
- $resObj = json_decode($res);
|
|
|
- if ($resObj->state == 1) {
|
|
|
- return true;
|
|
|
+ try {
|
|
|
+ $res = JucaiApi::login($this->username, $this->password, 1);
|
|
|
+ $resObj = json_decode($res);
|
|
|
+ if ($resObj->state == 1) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ } catch (think\exception $e) {
|
|
|
+ return false;
|
|
|
}
|
|
|
- return false;
|
|
|
- } catch (think\exception $e) {
|
|
|
- return false;
|
|
|
}
|
|
|
+ return false;
|
|
|
}
|
|
|
}
|
|
|
|