zhaojs
2023-06-29 ef469c51ef6fec8986164471afb8f44a7d39dbeb
application/api/controller/User.php
@@ -214,7 +214,8 @@
        $user = $this->auth->getUser();
        $mobile = $this->request->post('mobile');
        $captcha = $this->request->post('captcha');
        if (!$mobile || !$captcha) {
        $isyj=$this->request->post('isyj',false);
        if (!$mobile || (!$isyj&&!$captcha)) {
            $this->error(__('Invalid parameters'));
        }
        if (!Validate::regex($mobile, "^1\d{10}$")) {
@@ -248,7 +249,6 @@
    {
        $openid = request()->param('openid');
        $access_token = request()->param('access_token');
        $push_cid=request()->param('push_cid','');
        $LogicUser = new LogicUser();
        $userId = $LogicUser->getUserByOpenId($openid);
        if ($userId) {
@@ -256,10 +256,6 @@
            if(empty($user)) $this->error("用户信息获取失败");
            if ($user['status'] != 'normal') {
                $this->error(__('Account is locked'));
            }
            if(!empty($push_cid)&&empty($user['push_cid']))
            {//表里push_cid为空,补全push_cid
            }
            //如果已经有账号则直接登录
            $ret = $this->auth->direct($user['id']);