|
|
@@ -380,6 +380,13 @@ class UserOpen extends UserModel
|
|
|
*/
|
|
|
public function smsloginWx($data)
|
|
|
{
|
|
|
+ // 判断会员号如果是手机号,则查询是否有有此会员号
|
|
|
+ $pattern = '/^1\d{10}$/';
|
|
|
+ if (!preg_match($pattern, $data['mobile'])) {
|
|
|
+ $this->error = '登录账号错误';
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
$user = $this->where('user_no', $data['mobile'])->find();
|
|
|
if (empty($user)) {
|
|
|
$vall = [
|
|
|
@@ -401,12 +408,6 @@ class UserOpen extends UserModel
|
|
|
$user = $this->where('user_no', $data['mobile'])->find();
|
|
|
}
|
|
|
|
|
|
- // 判断会员号如果是手机号,则查询是否有有此会员号
|
|
|
- $pattern = '/^1\d{10}$/';
|
|
|
- if (!preg_match($pattern, $data['mobile'])) {
|
|
|
- $data['mobile'] = $user['mobile'];
|
|
|
- }
|
|
|
-
|
|
|
if (!$this->check($data)) {
|
|
|
return false;
|
|
|
}
|