Commit 94f7c205 authored by zhoujun's avatar zhoujun

回归测试

parent 0eb017b1
......@@ -342,7 +342,10 @@ class CardController extends Controller
$roleId = $request->input('roleId');
$serverId = $request->input('serverId');
if(Cache::has('card:num:'.$userId.':'.$roleId)) return exit('页面走丢了,请稍后再试!');
if(Cache::has('card:num:'.$userId.':'.$roleId)){
$num = Cache::get('card:num:'.$userId.':'.$roleId);
if($num > 3) return exit('页面走丢了,请稍后再试!');
}
if(Cache::has('card:info:'.$userId.':'.$roleId)){
$data = Cache::get('card:info:'.$userId.':'.$roleId);
......@@ -460,7 +463,13 @@ class CardController extends Controller
Cache::put('card:info:'.$userId.':'.$roleId,300,$data);
}
Cache::put('card:num:'.$userId.':'.$roleId,1,5);
if(Cache::has('card:num:'.$userId.':'.$roleId)){
$num = Cache::get('card:num:'.$userId.':'.$roleId) + 1;
Cache::forget('card:num:'.$userId.':'.$roleId);
Cache::put('card:num:'.$userId.':'.$roleId,$num,3);
}else{
Cache::put('card:num:'.$userId.':'.$roleId,1,3);
}
return view('card.card', $data);
}
}
\ No newline at end of file
......@@ -27,4 +27,10 @@ class HomeController extends Controller
$data = [];
return view('index', $data);
}
public function getError()
{
$data = [];
return view('404', $data);
}
}
\ No newline at end of file
......@@ -194,7 +194,6 @@ class UtilService
public static function getIsWx($httpUserAgent)
{
return true;
if (strpos($httpUserAgent, 'MicroMessenger') !== false) {
return true;
} else {
......
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>404</title>
<style>
.no-found{
text-align: center;
font-size: 12px;
color: #333;
}
.no-found img{
width: 120px;
display: block;
margin: 100px auto 12px;
}
</style>
</head>
<body>
<div class="no-found">
<img src="https://aldzn-ios-cdn.aldzn.cn/ucCard/postcard/images/404.png" alt="">
<span>页面走丢了。。。</span>
</div>
</body>
</html>
\ No newline at end of file
......@@ -21,7 +21,7 @@
</head>
<body>
<div class="no-found">
<img src="../../public/static/postcard/images/404.png" alt="">
<img src="https://aldzn-ios-cdn.aldzn.cn/ucCard/postcard/images/404.png" alt="">
<span>页面走丢了。。。</span>
</div>
</body>
......
......@@ -11,6 +11,7 @@
|
*/
Route::any('/wx/home','HomeController@getIndex')->name('wxIndex');
Route::any('/404','HomeController@getError');
Route::prefix('service')->group(function() {
Route::post('/get_authcode', 'ToolController@authcode');
......
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