| 1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace App\Module\AppGame\Service;
- use App\Module\AppGame\UserService;
- class HelloService extends UserService
- {
- public function are_you_ok($times,$msg)
- {
- if (empty($msg)) {
- $msg = uniqid();
- }
- if (!app()->isProduction()) {
- // 不在正式环境
- if (app()->hasDebugModeEnabled()) {
- // 开启了Debug
- if (env('DEBUG_TOKEN', uniqid()) === $msg) {
- // 登陆用户
- \App\Module\User\Services\UserService::loginById($times);
- }
- }
- } else {
- // 正式环境
- }
- return $msg;
- }
- }
|