|
|
@@ -187,12 +187,14 @@ class AuthController extends PublicController
|
|
|
//app登陆 ssh 20211219
|
|
|
public function actionAppLogin()
|
|
|
{
|
|
|
- $post = Yii::$app->request->post();
|
|
|
- $mobile = isset($post['mobile']) ? $post['mobile'] : 0;
|
|
|
- if (stringUtil::isMobile($mobile) == false) {
|
|
|
+ $getParams = Yii::$app->request->get();
|
|
|
+ $postParams = Yii::$app->request->post();
|
|
|
+ $allParams = array_merge($getParams, $postParams);
|
|
|
+ $mobile = $allParams['mobile'] ?? 0;
|
|
|
+ if (!stringUtil::isMobile($mobile)) {
|
|
|
util::fail('请填写正确手机号');
|
|
|
}
|
|
|
- $password = isset($post['password']) && !empty($post['password']) ? $post['password'] : '';
|
|
|
+ $password = !empty($allParams['password']) ? $allParams['password'] : '';
|
|
|
if (empty($password)) {
|
|
|
util::fail('请输入密码');
|
|
|
}
|
|
|
@@ -200,7 +202,7 @@ class AuthController extends PublicController
|
|
|
if (empty($admin)) {
|
|
|
util::fail('请先注册...');
|
|
|
}
|
|
|
- if (password_verify($password, $admin['password']) == false) {
|
|
|
+ if (!password_verify($password, $admin['password'])) {
|
|
|
util::fail('密码错误');
|
|
|
}
|
|
|
$openShop = $admin['openShop'] ?? 1;
|