'serialize' ]; /** * 更新微信用户信息 * @param array $data 用户信息 * @date 2021-03-01 */ public function updateUser($data) { $where = [ ['openid', '=', $data['openid']] ]; $id = $this->getOneData($where, 'id'); if (!empty($id)) { $data['id'] = $id; } return $this->dataUpdate($data); } /** * 解除平台用户绑定 * @param integer $user_id USER_ID * @date 2021-03-01 */ public function unbindPlatform($user_id) { $where = [ ['user_id', '=', $user_id] ]; $id = $this->getOneData($where, 'id'); if (!empty($id)) { $data['id'] = $id; $data['user_id'] = 0; return $this->dataUpdate($data); } else { return true; } } }