This commit is contained in:
root 2020-01-06 13:48:58 +08:00
parent 2e505a9759
commit 4d66941ef6
5 changed files with 8 additions and 60 deletions

View File

@ -34,7 +34,7 @@ class ConfigController extends Controller
'plan_transfer_hour' => config('v2board.plan_transfer_hour', 12),
'try_out_enable' => (int)config('v2board.try_out_enable', 0),
'try_out_plan_id' => (int)config('v2board.try_out_plan_id'),
'try_out_day' => (int)config('v2board.try_out_day', 1)
'try_out_hour' => (int)config('v2board.try_out_hour', 1)
],
'pay' => [
// alipay

View File

@ -69,9 +69,10 @@ class RegisterController extends Controller
if ((int)config('v2board.try_out_enable', 0)) {
$plan = Plan::find(config('v2board.try_out_plan_id'));
if ($plan) {
$user->transfer_enable = $plan->transfer_enable * 1073741824;
$user->plan_id = $plan->id;
$user->group_id = $plan->group_id;
$user->expired_at = time() + (config('v2board.try_out_day', 1) * 86400);
$user->expired_at = time() + (config('v2board.try_out_hour', 1) * 3600);
}
}

View File

@ -20,7 +20,7 @@ class ConfigSave extends FormRequest
'plan_is_update' => 'in:0,1',
'try_out_enable' => 'in:0,1',
'try_out_plan_id' => 'integer',
'try_out_day' => 'integer',
'try_out_hour' => 'numeric',
// server
'server_token' => 'nullable|min:16',
// alipay

2
public/umi.js vendored

File diff suppressed because one or more lines are too long

View File

@ -8,64 +8,11 @@
- Redis
- Laravel
## 演示
## Demo
[Demo](https://v2board.com)
演示站点由 👉[Moack](https://www.moack.co.kr/dedicated.php)👈 强力驱动
[Demo](https://v2board.com)
Demo site provided by 👉[Moack](https://www.moack.co.kr/dedicated.php)👈
## 本地环境部署
1. 下载 composer
> ```shell script
> wget https://getcomposer.org/download/1.9.0/composer.phar
> php composer.phar install
> ```
2. 执行 `cp .env.example .env` 然后配置它
3. 执行安装
> ```install script
> php artisan v2board:install
> ```
>
4. 设置定时任务每分钟执行
> ```set crontable
> php artisan schedule:run
> ```
5. 其他注意事项
> 每次修改 `.env` 文件后需要执行 `php artisan config:cache` 重建缓存
> 请务必安装 `redis`
## Docker 环境部署
> 首先 `cp docker-compose.yml.example docker-compose.yml` 选择性修改
1. 执行 `docker-compose run --rm db` 进入 docker 容器
2. 从 `install.sql` 文件中恢复表后退出容器,执行 `docker-compose down`
3. 执行 `cp .env.example .env` 然后配置它
4. 执行配置脚本
> ```shell script
> docker run --rm -v $(pwd):/app composer install
> docker run --rm -v $(pwd):/app composer sh init.sh
> ```
4. 执行 `docker-compose up -d` 启动服务
> 每次修改 `.env` 文件后需要执行 `docker run --rm -v $(pwd):/app composer artisan config:cache` 重建缓存
## 注意
伪静态:
```
location /downloads {
}
location / {
try_files $uri $uri/ /index.php$is_args$query_string;
}
location ~ .*\.(js|css)?$
{
expires 1h;
error_log off;
access_log /dev/null;
}
```
## 投喂
ETH&(USDT-ERC20): 0x84F85A89105B93F74c3b5db6410Ee8630F01063f