Commit 81b0d9e1 authored by zhoujun's avatar zhoujun

微信

parent cfe1e462
......@@ -341,9 +341,13 @@ class CardController extends Controller
$userId = $request->session()->get("uid");
$roleId = $request->input('roleId');
$serverId = $request->input('serverId');
if(Cache::has('card:num:'.$userId.':'.$roleId)) return exit('页面走丢了,请稍后再试!');
if(Cache::has('card:info:'.$userId.':'.$roleId)){
$data = Cache::get('card:info:'.$userId.':'.$roleId,[]);
$data = Cache::get('card:info:'.$userId.':'.$roleId);
}else{
$data = [];
$result = $this->getVerityLogin($userId);
if($result['code'] != 200) return $this->jsonReturn($result['code'], $result['msg']);
if (empty($roleId) || empty($serverId)) return $this->jsonReturn(7002, '参数错误');
......@@ -455,6 +459,8 @@ class CardController extends Controller
}
Cache::put('card:info:'.$userId.':'.$roleId,300,$data);
}
Cache::put('card:num:'.$userId.':'.$roleId,1,5);
return view('card.card', $data);
}
}
\ No newline at end of file
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