|
@@ -309,7 +309,12 @@ class User extends Base
|
|
|
$validate = Validate::rule(['token' => 'require']);
|
|
|
if ($validate->check($post) == false) return json_show(1004, $validate->getError());
|
|
|
$getToken = checkToken($post['token'], $this->token_time);
|
|
|
- return $getToken == false ? json_show(104, "token失效") : json_show(0, "获取成功", $getToken);
|
|
|
+ if( $getToken == false)$this->error('token失效','104');
|
|
|
+ else{
|
|
|
+ $getToken['system_version']=(new AccountPlat())->where(['account_id'=>$getToken['id']])->column
|
|
|
+ ('system_version','plat_code');
|
|
|
+ $this->success('获取成功',$getToken,0);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -419,7 +424,7 @@ class User extends Base
|
|
|
$cache = Cache::store('redis')->set("user:info:{$token}", $userinfo, $this->token_time);
|
|
|
if ($cache == false)$this->error('token保存失败',1003);
|
|
|
$userinfo['token'] = $token;
|
|
|
- $this->success('获取成功',$userinfo,0);
|
|
|
+ $this->success('获取成功',$userinfo,0);
|
|
|
}
|
|
|
/**
|
|
|
* 系统板本更新
|
|
@@ -435,7 +440,7 @@ class User extends Base
|
|
|
$accountPlat= new AccountPlat();
|
|
|
$info =$accountPlat->where($param)->findOrEmpty();
|
|
|
if($info->isEmpty()==false) $this->error('记录信息已存在',1003);
|
|
|
- $accountPlat->where(["account_id"=>$param['account_id'],"plat_code"=>$param['plat_code']])->delete();
|
|
|
+ $accountPlat->where(["account_id"=>$param['account_id'],"plat_code"=>$param['plat_code']])->select()->delete();
|
|
|
$pl= $accountPlat->save($param);
|
|
|
$pl? $this->success('记录成功',[],0): $this->error('记录失败',1003);;
|
|
|
}
|