Commit 521c8998 authored by clone's avatar clone

bug

parent 36f0c343
...@@ -67,12 +67,13 @@ class WxSdk extends Basic ...@@ -67,12 +67,13 @@ class WxSdk extends Basic
} catch (Exception $exception) { } catch (Exception $exception) {
return $this->response("101", "request error:" . $exception); return $this->response("101", "request error:" . $exception);
} }
$conditions["buyer_id"] = $id; $conditions["buyer_id"] = $id;
$fields = "id,user_nick,user_phone,user_pic,other_pic,last_login_time,last_login_ip,first_login_time"; $fields = "id,user_nick,user_phone,user_pic,other_pic,last_login_time,last_login_ip,first_login_time";
$user_info = $this->userModel->getUserByWhere($conditions, $fields); $user_info = $this->userModel->getUserByWhere($conditions, $fields);
//todo 判断用户是否第一次登陆了没有则更新数据 //todo 判断用户是否第一次登陆了没有则更新数据
if (count($user_info) > 0 && empty($user_info[0]["last_login_time"]) || empty($user_info[0]["last_login_ip"]) if ($id > 0 && count($user_info) > 0 && empty($user_info[0]["last_login_time"]) || empty($user_info[0]["last_login_ip"])
|| empty($user_info[0]["first_login_time"])) { || empty($user_info[0]["first_login_time"])) {
$userArr = array( $userArr = array(
"id" => $user_info[0]['id'], "id" => $user_info[0]['id'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment