更改下发token主键类型问题
This commit is contained in:
@@ -205,10 +205,10 @@ class LoginService extends BaseService
|
||||
UserModel::editUser($params,$data);
|
||||
// 组合生成token的数据
|
||||
$token_user_data = array();
|
||||
$token_user_data['user_id'] = $user['user_id']; // 用户id
|
||||
$token_user_data['user_id'] = (string)$user['user_id']; // 用户id
|
||||
$token_user_data['user_type'] = $user['user_type'];// 用户类型
|
||||
$token_user_data['open_id'] = $wx_info_data['openid'];// open_id
|
||||
$token_user_data['client_user_id'] = $client_user_id;// 对应客户端id
|
||||
$token_user_data['client_user_id'] = (string)$client_user_id;// 对应客户端id
|
||||
|
||||
// 发放token
|
||||
$Jwt = new Jwt();
|
||||
@@ -217,8 +217,8 @@ class LoginService extends BaseService
|
||||
// 组合返回数据
|
||||
$data = array();
|
||||
$data['token'] = $token;
|
||||
$data['user_id'] = $user['user_id'];
|
||||
$data['client_user_id'] = $client_user_id;
|
||||
$data['user_id'] = (string)$user['user_id'];
|
||||
$data['client_user_id'] = (string)$client_user_id;
|
||||
|
||||
Db::commit();
|
||||
return success($data);
|
||||
@@ -394,10 +394,10 @@ class LoginService extends BaseService
|
||||
|
||||
// 组合生成token的数据
|
||||
$token_user_data = array();
|
||||
$token_user_data['user_id'] = $user['user_id']; // 用户id
|
||||
$token_user_data['user_id'] = (string)$user['user_id']; // 用户id
|
||||
$token_user_data['user_type'] = $user['user_type'];// 用户类型
|
||||
$token_user_data['open_id'] = $open_id ?? "";// open_id
|
||||
$token_user_data['client_user_id'] = $client_user_id;// 对应客户端id
|
||||
$token_user_data['client_user_id'] = (string)$client_user_id;// 对应客户端id
|
||||
|
||||
// 发放token
|
||||
$Jwt = new Jwt();
|
||||
@@ -409,8 +409,8 @@ class LoginService extends BaseService
|
||||
// 组合返回数据
|
||||
$data = array();
|
||||
$data['token'] = $token;
|
||||
$data['user_id'] = $user['user_id'];
|
||||
$data['client_user_id'] = $client_user_id;
|
||||
$data['user_id'] = (string)$user['user_id'];
|
||||
$data['client_user_id'] = (string)$client_user_id;
|
||||
|
||||
Db::commit();
|
||||
return success($data);
|
||||
|
||||
Reference in New Issue
Block a user