mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 09:39:10 +08:00
feature: i18n
This commit is contained in:
parent
c984fa2e0b
commit
393680c963
@ -73,10 +73,12 @@ class ShadowsocksTidalabController extends Controller
|
||||
Cache::put(CacheKey::get('SERVER_SHADOWSOCKS_ONLINE_USER', $server->id), count($data), 3600);
|
||||
$serverService = new ServerService();
|
||||
$userService = new UserService();
|
||||
DB::beginTransaction();
|
||||
foreach ($data as $item) {
|
||||
$u = $item['u'] * $server->rate;
|
||||
$d = $item['d'] * $server->rate;
|
||||
if (!$userService->trafficFetch((float)$u, (float)$d, (int)$item['user_id'])) {
|
||||
DB::rollBack();
|
||||
return response([
|
||||
'ret' => 0,
|
||||
'msg' => 'user fetch fail'
|
||||
@ -92,6 +94,7 @@ class ShadowsocksTidalabController extends Controller
|
||||
'trojan'
|
||||
);
|
||||
}
|
||||
DB::commit();
|
||||
|
||||
return response([
|
||||
'ret' => 1,
|
||||
|
@ -74,10 +74,12 @@ class TrojanTidalabController extends Controller
|
||||
Cache::put(CacheKey::get('SERVER_TROJAN_ONLINE_USER', $server->id), count($data), 3600);
|
||||
$serverService = new ServerService();
|
||||
$userService = new UserService();
|
||||
DB::beginTransaction();
|
||||
foreach ($data as $item) {
|
||||
$u = $item['u'] * $server->rate;
|
||||
$d = $item['d'] * $server->rate;
|
||||
if (!$userService->trafficFetch($u, $d, $item['user_id'])) {
|
||||
DB::rollBack();
|
||||
return response([
|
||||
'ret' => 0,
|
||||
'msg' => 'user fetch fail'
|
||||
@ -93,6 +95,7 @@ class TrojanTidalabController extends Controller
|
||||
'trojan'
|
||||
);
|
||||
}
|
||||
DB::commit();
|
||||
|
||||
return response([
|
||||
'ret' => 1,
|
||||
|
@ -80,7 +80,7 @@ class UserService
|
||||
{
|
||||
$user = User::find($userId);
|
||||
if (!$user) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
$user->t = time();
|
||||
$user->u = $user->u + $u;
|
||||
|
1
public/assets/admin/antd.async.js
vendored
1
public/assets/admin/antd.async.js
vendored
File diff suppressed because one or more lines are too long
1
public/assets/admin/components.async.js
vendored
Normal file
1
public/assets/admin/components.async.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
public/assets/admin/umi.js
vendored
2
public/assets/admin/umi.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
public/assets/user/umi.css
vendored
2
public/assets/user/umi.css
vendored
File diff suppressed because one or more lines are too long
2
public/assets/user/umi.js
vendored
2
public/assets/user/umi.js
vendored
File diff suppressed because one or more lines are too long
2
public/assets/user/vendors.async.js
vendored
2
public/assets/user/vendors.async.js
vendored
File diff suppressed because one or more lines are too long
@ -2,7 +2,7 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" href="/assets/admin/antd.chunk.css?v={{$verison}}">
|
||||
<link rel="stylesheet" href="/assets/admin/components.chunk.css?v={{$verison}}">
|
||||
<link rel="stylesheet" href="/assets/admin/umi.css?v={{$verison}}">
|
||||
<link rel="stylesheet" href="/assets/admin/custom.css?v={{$verison}}">
|
||||
<meta charset="utf-8">
|
||||
@ -27,7 +27,7 @@
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script src="/assets/admin/vendors.async.js?v={{$verison}}"></script>
|
||||
<script src="/assets/admin/antd.async.js?v={{$verison}}"></script>
|
||||
<script src="/assets/admin/components.async.js?v={{$verison}}"></script>
|
||||
<script src="/assets/admin/umi.js?v={{$verison}}"></script>
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-P1E9Z5LRRK"></script>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" href="/assets/user/antd.chunk.css?v={{$verison}}">
|
||||
<link rel="stylesheet" href="/assets/user/components.chunk.css?v={{$verison}}">
|
||||
<link rel="stylesheet" href="/assets/user/umi.css?v={{$verison}}">
|
||||
<link rel="stylesheet" href="/assets/user/custom.css?v={{$verison}}">
|
||||
<meta charset="utf-8">
|
||||
@ -28,7 +28,7 @@
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script src="/assets/user/vendors.async.js?v={{$verison}}"></script>
|
||||
<script src="/assets/user/antd.async.js?v={{$verison}}"></script>
|
||||
<script src="/assets/user/components.async.js?v={{$verison}}"></script>
|
||||
<script src="/assets/user/umi.js?v={{$verison}}"></script>
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-P1E9Z5LRRK"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user