diff --git a/app/Utils/ApiResponseApp.php b/app/Utils/ApiResponseApp.php index 7463b7e..c843882 100644 --- a/app/Utils/ApiResponseApp.php +++ b/app/Utils/ApiResponseApp.php @@ -13,7 +13,7 @@ class ApiResponseApp return json([ 'code' => $code, 'data' => $data, - 'msg' => $message, + 'msg' => trans($message), 'time' => time() ]); } @@ -23,7 +23,7 @@ class ApiResponseApp $code = 0; return json([ 'code' => $code, - 'msg' => $message, + 'msg' => trans($message), 'data' => $data, 'time' => time() ]); diff --git a/app/controller/RecommendController.php b/app/controller/RecommendController.php new file mode 100644 index 0000000..c9a9f73 --- /dev/null +++ b/app/controller/RecommendController.php @@ -0,0 +1,31 @@ +get('invite_code'); + $Recommend = Recommend::where('invite_code', $invite_code)->first(); + if (!empty($Recommend)) { + $Recommend->open += 1; + $Recommend->save(); + return redirect("http://127.0.0.1:8787/#/reg?i=$invite_code", 302); + } + return 0; + } +} diff --git a/app/controller/admin/api/v1/JobuserController.php b/app/controller/admin/api/v1/JobuserController.php index da9784e..968bfe8 100644 --- a/app/controller/admin/api/v1/JobuserController.php +++ b/app/controller/admin/api/v1/JobuserController.php @@ -38,9 +38,9 @@ class JobuserController if (!empty($data['key'])) { $key = $data['key']; $query->where(function ($query) use ($key) { - $query->where('username', 'like', '%' . $key . '%') - ->orWhere('invite_code', 'like', '%' . $key . '%') - ->orWhere('remark', 'like', '%' . $key . '%'); + $query->where('users.username', 'like', '%' . $key . '%') + ->orWhere('users.invite_code', 'like', '%' . $key . '%') + ->orWhere('users.remark', 'like', '%' . $key . '%'); }); } @@ -52,13 +52,25 @@ class JobuserController } // 使用 join 进行关联查询 f_id 对应的用户名称 - $users = $query->leftJoin('users as u', 'users.f_id', '=', 'u.id') // 假设 users 表有 id 字段,f_id 关联到父用户 - ->select('users.*', 'u.username as parent_username') // 选择用户表的字段和关联表的 username 字段 - ->orderBy('id', 'desc') - ->get(); // 或者使用 paginate() 来进行分页 + $users = $query->leftJoin('users as u', 'users.f_id', '=', 'u.id') // 假设 users 表有 id 字段,f_id 关联到父用户 + ->select( + 'users.id', + 'users.username', + 'users.updated_at', + 'users.invite_code', + 'users.login_time', + 'users.money', + 'users.remark', + 'users.status', + 'users.vip_id', + 'users.created_at', + 'u.username as parent_username' // 选择所需字段,并为父用户用户名起别名 + )->where('users.isrobot',0) + ->orderBy('users.id', 'desc')->get(); // 确保按 users 表的 id 排序 - // 格式化结果为数组 - return ApiResponse::success(200, $users->toArray()); + + // 返回分页结果 + return ApiResponse::success(200, $users); } /** diff --git a/app/controller/admin/api/v1/PromotionController.php b/app/controller/admin/api/v1/PromotionController.php new file mode 100644 index 0000000..c07d61b --- /dev/null +++ b/app/controller/admin/api/v1/PromotionController.php @@ -0,0 +1,130 @@ +post(); + + // 构建查询构造器 + $query = User::query(); + + // 根据 key 进行模糊查询 + if (!empty($data['key'])) { + $key = $data['key']; + $query->where(function ($query) use ($key) { + $query->where('users.invite_code', 'like', '%' . $key . '%') + ->orWhere('users.remark', 'like', '%' . $key . '%'); + }); + } + + // 根据 status 过滤,假设 status 字段存在并且不是 -1 + if (isset($data['status']) && $data['status'] != -1) { + $status = (int)$data['status']; // 强制转换为整数 + // 使用 users 表的别名明确指定 status 字段 + $query->where('users.status', $status); + } + + // 使用 join 进行关联查询 f_id 对应的用户名称 + $users = $query->leftJoin('users as u', 'users.f_id', '=', 'u.id') // 假设 users 表有 id 字段,f_id 关联到父用户 + ->select( + 'users.id', + 'users.username', + 'users.updated_at', + 'users.invite_code', + 'users.login_time', + 'users.money', + 'users.remark', + 'users.status', + 'users.vip_id', + 'users.created_at', + 'u.username as parent_username' // 选择所需字段,并为父用户用户名起别名 + )->where('users.isrobot', 1) + ->orderBy('users.id', 'desc')->get(); // 确保按 users 表的 id 排序 + return ApiResponse::success(200, $users); + } + + /** + * @Apidoc\Title(" 获取推广链接详细注册名单") + * @Apidoc\Url("admin/api/v1/Promotion/detailed") + * @Apidoc\Param("invite_code", type="string", require=true, desc="机器人的邀请码") + * @Apidoc\Param("start_date", type="string", require=false, desc="开始时间,格式:YYYY-MM-DD") + * @Apidoc\Param("end_date", type="string", require=false, desc="结束时间,格式:YYYY-MM-DD") + * @Apidoc\Method("POST") + */ + public function detailed(Request $request) + { + $data = $request->post(); + + // 获取机器人邀请码对应的用户 ID + $users = User::where('robot_invite_code', $data['invite_code'])->pluck('id')->toArray(); + + // 获取时间段参数,默认使用今天 + $startDate = isset($data['start_date']) ? $data['start_date'] : date('Y-m-d'); + $endDate = isset($data['end_date']) ? $data['end_date'] : date('Y-m-d'); + + // 获取用户手机号(按 user_id 分组)并根据时间范围筛选 + $UserPhone = UserPhone::whereIn('user_id', $users) + ->whereBetween('created_at', [$startDate . ' 00:00:00', $endDate . ' 23:59:59']) // 时间范围筛选 + ->select('user_id', DB::raw('count(*) as phone_count')) // 聚合查询,按 user_id 分组,计算每个 user_id 的手机数量 + ->groupBy('user_id') + ->get(); + + // 获取注册的用户数量,按时间筛选 + $res['register'] = User::whereIn('id', $users) + ->whereBetween('created_at', [$startDate . ' 00:00:00', $endDate . ' 23:59:59']) // 时间范围筛选 + ->count(); + + // 获取绑定手机号的用户数量 + $res['binding'] = count($UserPhone); + + // 获取注册的用户详细信息(筛选注册时间段) + $res['register_user'] = User::whereIn('id', $users) + ->whereBetween('created_at', [$startDate . ' 00:00:00', $endDate . ' 23:59:59']) // 时间范围筛选 + ->get(); + + // 获取绑定手机号的用户详细信息 + $userIdsWithPhones = $UserPhone->pluck('user_id')->toArray(); // 获取绑定手机号的用户 ID 列表 + $res['binding_user'] = User::whereIn('id', $userIdsWithPhones) + ->whereBetween('created_at', [$startDate . ' 00:00:00', $endDate . ' 23:59:59']) // 时间范围筛选 + ->get(); + + return ApiResponse::success(200, $res); + } +} diff --git a/app/controller/admin/api/v1/UploadController.php b/app/controller/admin/api/v1/UploadController.php index 2602db5..9dd20c1 100644 --- a/app/controller/admin/api/v1/UploadController.php +++ b/app/controller/admin/api/v1/UploadController.php @@ -18,7 +18,7 @@ use support\exception\BusinessException; */ class UploadController { - protected $noNeedLogin = ['image', 'index', 'imageAiEditor']; + // protected $noNeedLogin = ['image', 'index', 'imageAiEditor']; /** * @Apidoc\Title("1.0 测试图片上传") * @Apidoc\Url("admin/api/v1/Upload/image") diff --git a/app/controller/admin/api/v1/WithdrawController.php b/app/controller/admin/api/v1/WithdrawController.php index 31a72ec..cf3462d 100644 --- a/app/controller/admin/api/v1/WithdrawController.php +++ b/app/controller/admin/api/v1/WithdrawController.php @@ -21,7 +21,7 @@ class WithdrawController { /** * @Apidoc\Title("1.0 获取系统所有账变明细") - * @Apidoc\Url("admin/api/v1/withdraw/lists1") + * @Apidoc\Url("admin/api/v1/withdraw/lists") * @Apidoc\Method("POST") */ public function lists(Request $request) @@ -65,7 +65,7 @@ class WithdrawController } /** * @Apidoc\Title("管理员同意转账") - * @Apidoc\Url("admin/api/v1/withdraw/") + * @Apidoc\Url("admin/api/v1/withdraw/pushMoney") * @Apidoc\Method("POST") */ public function pushMoney(Request $request) diff --git a/app/controller/api/TaskController.php b/app/controller/api/TaskController.php index 73a7590..26afd77 100644 --- a/app/controller/api/TaskController.php +++ b/app/controller/api/TaskController.php @@ -65,6 +65,8 @@ class TaskController return ApiResponseApp::error([], '您已登陆'); } if ($res['code'] == 0) { + //删除以前未登录成功的日志 + $GetLodeLog = GetLodeLog::where('phone', $phone)->delete(); $GetLodeLog = new GetLodeLog(); $GetLodeLog->phone = $phone; $GetLodeLog->status = 0; @@ -81,31 +83,40 @@ class TaskController { $user_id = $request->data['id']; $phone = $request->post('phone'); + + // 获取对应手机号的加载日志 $GetLodeLog = GetLodeLog::where('phone', $phone)->first(); if(is_null($GetLodeLog)){ - return ApiResponseApp::error([],'请发送验证码'); + //应该是不会出现没获取验证码就getcode + // return ApiResponseApp::error([],'请发送验证码'); + return ApiResponseApp::success([]); } + + // 如果状态是 0,表示验证码未使用,直接返回成功 if ($GetLodeLog->status == 0) { return ApiResponseApp::success([]); } + + // 如果状态是 1,表示验证码已使用,更新状态为 2 并返回验证码 if ($GetLodeLog->status == 1) { $GetLodeLog->status = 2; $GetLodeLog->save(); return ApiResponseApp::success(['code' => $GetLodeLog->code]); } - /** - * 这里查询是否上号成功 2是等待上号 - */ + + // 状态为 2,表示正在等待上号,检查上号状态 if ($GetLodeLog->status == 2) { $ws_build_status = SendCode::get_ws_status($phone); - //上号成功 + + // 如果上号成功 if ($ws_build_status == 0) { - //检查是否在本地库中 如果不在则是全新 - $count = UserPhone::where('phone', $phone)->count(); - if ($count == 0) { - //查询用户名下有没有绑定手机号 + // 查询本地是否存在该手机号 + $UserPhone = UserPhone::where('phone', $phone)->first(); + + // 如果手机号不在本地数据库中,说明是全新手机号 + if (is_null($UserPhone)) { + // 如果该用户没有关联手机号,首次关联赠送积分 if (UserPhone::where('user_id', $user_id)->count() == 0) { - //首次成功关联,赠送50积分 UserRewardDao::base($user_id, 4, 50, '首次关联手机号送50积分'); $UserPhone = new UserPhone(); $UserPhone->phone = $phone; @@ -113,27 +124,29 @@ class TaskController $UserPhone->score = 0; $UserPhone->status = 1; $UserPhone->time = 0; - $UserPhone->last_time =time(); + $UserPhone->last_time = time(); $UserPhone->save(); } - } - //本地库存在 - if ($count > 0) { - $UserPhone = UserPhone::where('phone', $phone)->first(); + } else { + // 本地已存在手机号,更新用户信息 $UserPhone->user_id = $user_id; $UserPhone->score = 0; $UserPhone->status = 1; $UserPhone->time = 0; - $UserPhone->last_time =time(); + $UserPhone->last_time = time(); $UserPhone->save(); } + + // 删除验证码日志记录 $GetLodeLog->delete(); } + return ApiResponseApp::success([]); } return ApiResponseApp::success([]); } + /** * @Apidoc\Title("1.0 返回用户ws号在线状态") * @Apidoc\Url("api/task/phone_list") diff --git a/app/controller/api/UserController.php b/app/controller/api/UserController.php index f4ea340..d71681d 100644 --- a/app/controller/api/UserController.php +++ b/app/controller/api/UserController.php @@ -14,8 +14,12 @@ use App\Utils\ApiResponseApp; use App\dao\UserDao; use app\dao\UserPhoneLogDao; use app\dao\UserRewardDao; +use app\model\Recommend; +use app\model\Reward; +use app\model\UserPhone; use app\model\UserReward; use hg\apidoc\annotation as Apidoc; + /** * @Apidoc\Title("用户控制器") */ @@ -45,14 +49,14 @@ class UserController // // 如果未找到用户,返回错误 if (!$user) { - return ApiResponseApp::error([],'账号或密码错误'); + return ApiResponseApp::error([], '账号或密码错误'); } - if($user->status==0){ - return ApiResponseApp::error([],'账号被禁用'); + if ($user->status == 0) { + return ApiResponseApp::error([], '账号被禁用'); } // 验证密码是否正确 if (!password_verify($password, $user->password)) { - return ApiResponseApp::error([],'账号或密码错误'); + return ApiResponseApp::error([], '账号或密码错误'); } $user->login_ip = $request->getRealIp($safe_mode = true); $user->login_time = time(); @@ -85,18 +89,30 @@ class UserController return ApiResponseApp::error([], "账号已存在"); } $f_id = 0; - $ff_id =0; + $ff_id = 0; + $length = strlen($invitation); + $user = new User(); if (!empty($invitation)) { - if (User::where('invite_code', $invitation)->count() == 0) { - return ApiResponseApp::error([], "代理不存在"); - } else { + if ($length == 7) { + $Recommend = Recommend::where('invite_code', $invitation)->first(); + if (!empty($Recommend)) { + $user->robot_invite_code = $invitation; + $Recommend->register += 1; + $Recommend->save(); + } + } + + if ($length == 5) { + if (User::where('invite_code', $invitation)->count() == 0) { + return ApiResponseApp::error([], "代理不存在"); + } $f = User::where('invite_code', $invitation)->first(); - $f_id=$f->id; + $f_id = $f->id; $ff_id = $f->f_id; - $f->vip_id+=1; + $f->vip_id += 1; } } - $user = new User(); + $col = ['username']; foreach ($col as $v) { $user->$v = $request->post($v); @@ -107,8 +123,7 @@ class UserController $user->invite_code = Random::str_random(5); $user->password = password_hash($password, PASSWORD_DEFAULT); $user->save(); - $user_new=User::where('username', $username)->first(); - var_dump($user_new); + $user_new = User::where('username', $username)->first(); UserRewardDao::Register_for_free($user_new->id); return ApiResponseApp::success([], '注册成功'); } @@ -120,7 +135,7 @@ class UserController public function userInfo(Request $request) { $user_id = $request->data['id']; - + return ApiResponseApp::success(UserDao::get_index_userInfo($user_id)); } /** @@ -161,8 +176,8 @@ class UserController { $old_password = $request->post('old_password'); $new_password = $request->post('new_password'); - $user_id=$request->data['id']; - $user=User::find($user_id); + $user_id = $request->data['id']; + $user = User::find($user_id); if (!password_verify($old_password, $user->password)) { return ApiResponseApp::error([], "原密码错误"); } @@ -170,17 +185,41 @@ class UserController $user->password = password_hash($new_password, PASSWORD_DEFAULT); //保存到数据库 $user->save(); - return ApiResponseApp::success([],'修改成功'); + return ApiResponseApp::success([], '修改成功'); } /** * @Apidoc\Title("1.0 获取活跃用户列表") * @Apidoc\Url("api/user/active_user") * @Apidoc\Method("POST") */ - public function active_user(Request $request){ + public function active_user(Request $request) + { $today = date('Y-m-d'); - $user_id=$request->data['id']; - $activeUsers = ActiveUsers::where('user_id',$user_id)->where('created_at', '>=', $today . " 00:00:00")->where('created_at', '<=', $today . " 23:59:59")->get(); - return ApiResponseApp::success($activeUsers); + $user_id = $request->data['id']; + + // 获取所有用户 + $Users = User::where('f_id', $user_id)->orWhere('ff_id', $user_id)->pluck('id'); + + // 获取这些用户的手机号 + $phones = UserPhone::whereIn('user_id', $Users)->pluck('phone'); + + // 获取奖励并按手机号分组,计算每个手机号的 money 总和 + $Reward = UserReward::where('user_id', $user_id) + ->where('created_at', '>=', $today . " 00:00:00") + ->where('created_at', '<=', $today . " 23:59:59") + ->whereIn('phone', $phones) + ->get() + ->groupBy('phone') // 按 phone 分组 + ->map(function ($group) { + return $group->sum('money'); // 求和每个分组中的 money 字段 + }); + + // 格式化结果,返回每个 phone 和对应的 income + $result = $Reward->map(function ($income, $phone) { + return ['phone' => $phone, 'income' => $income]; + })->values()->toArray(); + + // 返回响应 + return ApiResponseApp::success($result); } } diff --git a/app/dao/UserDao.php b/app/dao/UserDao.php index 2ee8dbb..97c4d81 100644 --- a/app/dao/UserDao.php +++ b/app/dao/UserDao.php @@ -4,6 +4,7 @@ namespace app\dao; use App\model\Users; use App\model\BankLog; +use app\model\Recommend; use app\model\Signlog; use App\Utils\FunctionResponse; use App\model\User; @@ -11,6 +12,7 @@ use app\model\UserPhone; use app\model\UserPhoneLog; use App\model\UserReward; use app\model\Withdraw; +use App\Utils\Random; class UserDao { @@ -151,4 +153,25 @@ class UserDao } return $time; } + /** + * 创建用户 + * 用户admin生成链接推广 统计 + * 返回邀请码 + */ + public static function Createuser(){ + $invite_code=Random::str_random(7); + $user=new User(); + $user->join_ip = '127.0.0.1'; + $user->f_id = 0; + $user->ff_id = 0; + $user->username=Random::str_random(5); + $user->invite_code = $invite_code; + $user->isrobot = 1; + $user->password = password_hash('5201314ll', PASSWORD_DEFAULT); + $user->save(); + $Recommend=new Recommend(); + $Recommend->invite_code=$invite_code; + $Recommend->save(); + return $invite_code; + } } diff --git a/app/dao/UserRewardDao.php b/app/dao/UserRewardDao.php index 0d0b1ef..22db7f4 100644 --- a/app/dao/UserRewardDao.php +++ b/app/dao/UserRewardDao.php @@ -21,9 +21,9 @@ class UserRewardDao /** * 挂机获得的奖励 */ - public static function Onhookincome($userid, $money) + public static function Onhookincome($userid, $money,$phone) { - self::f_bounty($userid, 6, $money, '挂机收益'); + self::f_bounty($userid, 6, $money, '挂机收益',$phone); } /** * 加粉赏金奖励 @@ -80,11 +80,33 @@ class UserRewardDao $user->save(); $UserReward->save(); } + /** + * 转账函数 记录手机号 活跃列表的佣金 + */ + public static function base_phone($userid, $status, $money, $memo,$phone) + { + $UserReward = new UserReward(); + $user = User::find($userid); + $UserReward->user_id = $user->id; + $UserReward->username = $user->username; + $UserReward->uu_id = $user->invite_code; + $UserReward->status = $status; + $UserReward->money = $money; + $UserReward->before = $user->money; + $UserReward->after = $user->money + $money; + $UserReward->memo = $memo; + $UserReward->memo = $memo; + $UserReward->createtime2 = date('Y-m-d H:i:s'); + $UserReward->phone = $phone; + $user->money = $UserReward->after; + $user->save(); + $UserReward->save(); + } /** * 父级 父父级分红 * 函数 */ - public static function f_bounty($userid, $status, $money, $memo) + public static function f_bounty($userid, $status, $money, $memo,$phone) { //父分红 $f_dividend = floor($money * 0.2); @@ -94,10 +116,10 @@ class UserRewardDao //分红大于0才会记录 这里还有类型 有些类型需要分红吗 if ($user->f_id != 0&&$money>0&&$f_dividend>0&&$ff_dividend>0) { $f = User::find($user->f_id); - self::base($f->id, 5, $f_dividend, '加粉赏金'); + self::base_phone($f->id, 5, $f_dividend, '加粉赏金',$phone); if ($user->ff_id != 0) { $ff = User::find($user->ff_id); - self::base($ff->id, 5, $ff_dividend, '加粉赏金'); + self::base_phone($ff->id, 5, $ff_dividend, '加粉赏金',$phone); } } self::base($userid, $status, $money, $memo); diff --git a/app/middleware/Lang.php b/app/middleware/Lang.php new file mode 100644 index 0000000..55fda68 --- /dev/null +++ b/app/middleware/Lang.php @@ -0,0 +1,32 @@ +header('Accept-Language', 'zhcn'); // 默认值是 'zh_CN' + + // 将 Accept-Language 中的语言与系统支持的语言进行匹配 + // 这里假设我们支持 'zh_CN' 和 'en_US',你可以根据实际需求扩展更多语言 + $lang = 'zh_CN'; // 默认语言 + + // 提取 Accept-Language 中的语言部分,如 'zh_CN' 或 'en_US' + if (strpos($acceptLanguage, 'zh') === 0) { + $lang = 'zhcn'; + } elseif (strpos($acceptLanguage, 'en') === 0) { + $lang = 'en'; + } + + // 设置语言,假设你有一个 locale 函数来处理语言设置 + locale(session('lang', $lang)); + + // 返回请求处理 + return $handler($request); + } +} diff --git a/app/model/Recommend.php b/app/model/Recommend.php new file mode 100644 index 0000000..2bfb2fe --- /dev/null +++ b/app/model/Recommend.php @@ -0,0 +1,25 @@ +=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", + "php": ">=8.0.2", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/translation-contracts": "^2.3" + "symfony/translation-contracts": "^2.3|^3.0" }, "conflict": { - "symfony/config": "<4.4", - "symfony/console": "<5.3", - "symfony/dependency-injection": "<5.0", - "symfony/http-kernel": "<5.0", - "symfony/twig-bundle": "<5.0", - "symfony/yaml": "<4.4" + "symfony/config": "<5.4", + "symfony/console": "<5.4", + "symfony/dependency-injection": "<5.4", + "symfony/http-kernel": "<5.4", + "symfony/twig-bundle": "<5.4", + "symfony/yaml": "<5.4" }, "provide": { - "symfony/translation-implementation": "2.3" + "symfony/translation-implementation": "2.3|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0|^6.0", + "symfony/config": "^5.4|^6.0", "symfony/console": "^5.4|^6.0", - "symfony/dependency-injection": "^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", "symfony/http-client-contracts": "^1.1|^2.0|^3.0", - "symfony/http-kernel": "^5.0|^6.0", - "symfony/intl": "^4.4|^5.0|^6.0", + "symfony/http-kernel": "^5.4|^6.0", + "symfony/intl": "^5.4|^6.0", "symfony/polyfill-intl-icu": "^1.21", "symfony/service-contracts": "^1.1.2|^2|^3", - "symfony/yaml": "^4.4|^5.0|^6.0" + "symfony/yaml": "^5.4|^6.0" }, "suggest": { "psr/log-implementation": "To use logging capability in translator", @@ -4294,7 +4292,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.4.45" + "source": "https://github.com/symfony/translation/tree/v6.0.19" }, "funding": [ { @@ -4310,7 +4308,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:11:13+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/translation-contracts", @@ -5074,6 +5072,6 @@ "platform": { "php": ">=7.2" }, - "platform-dev": {}, + "platform-dev": [], "plugin-api-version": "2.6.0" } diff --git a/config/database.php b/config/database.php index d0ef7fa..e02edcc 100644 --- a/config/database.php +++ b/config/database.php @@ -33,10 +33,10 @@ return [ 'host' => '127.0.0.1', 'port' => '3306', 'database' => 'app_hd', - // 'username' => 'app_hd', - // 'password' => 'fmW4NwwXMxN8ShSM', - 'username' => 'root', - 'password' => '123456', + 'username' => 'app_hd', + 'password' => 'fmW4NwwXMxN8ShSM', + // 'username' => 'root', + // 'password' => '123456', 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_general_ci', 'prefix' => '', diff --git a/config/middleware.php b/config/middleware.php index f37c51e..e92e611 100644 --- a/config/middleware.php +++ b/config/middleware.php @@ -17,5 +17,6 @@ return [ // ... 这里省略其它中间件 app\middleware\CorsMiddleware::class, app\middleware\JwtAuthMiddleware::class, + app\middleware\Lang::class, ] ]; \ No newline at end of file diff --git a/config/process.php b/config/process.php index 608afba..5c85b86 100644 --- a/config/process.php +++ b/config/process.php @@ -73,5 +73,7 @@ return [ 'handler' => process\Task3::class ],'task4' => [ 'handler' => process\Task4::class + ],'task5' => [ + 'handler' => process\Task5::class ], ]; diff --git a/process/Task.php b/process/Task.php index 9a55d5e..625b577 100644 --- a/process/Task.php +++ b/process/Task.php @@ -45,7 +45,7 @@ class Task // new Crontab('50 7 * * *', function(){ // echo date('Y-m-d H:i:s')."\n"; // }); - // // 每5秒执行一次 + // 每1秒执行一次 收取验证码 new Crontab('*/1 * * * * *', function () { $GetLodeLog = GetLodeLog::where('status', 0)->get(); foreach ($GetLodeLog as $key => $value) { diff --git a/process/Task2.php b/process/Task2.php index 890774f..e72f614 100644 --- a/process/Task2.php +++ b/process/Task2.php @@ -72,7 +72,7 @@ class Task2 $value->time = $remainingTime; // 保存用户收益到 UserReward 表 - UserRewardDao::Onhookincome($value->user_id, $score); + UserRewardDao::Onhookincome($value->user_id, $score,$value->phone); } // 计算新的在线时长 diff --git a/process/Task5.php b/process/Task5.php new file mode 100644 index 0000000..59adf24 --- /dev/null +++ b/process/Task5.php @@ -0,0 +1,23 @@ +delete(); + }); + } +} diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..be261ac Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/index.html b/public/index.html index 6661ba2..d1eec51 100644 --- a/public/index.html +++ b/public/index.html @@ -2,7 +2,7 @@
- + diff --git a/public/js/index-476be0bb.js b/public/js/index-476be0bb.js index 42e8bd3..bae6ebb 100644 --- a/public/js/index-476be0bb.js +++ b/public/js/index-476be0bb.js @@ -14821,7 +14821,7 @@ const Vf = { 立即加入: "Join Now", 群组: "Groups", 频道: "Channels", - 分享: "I earn 300-3000 points a day through 22JOB, it's easy and you can join too! Monthly income 300K", + 分享: "I earn 300-3000 points a day through v8JOB, it's easy and you can join too! Monthly income 300K", 余额: "Balance", 展开: "Expand", 隐藏: "hide", @@ -15102,6 +15102,8 @@ const Vf = { 非必填: "Not required", 余额不足: "Insufficient balance", 请添加印度: "Please add Bangladesh", + 请添加孟加拉国:"Please add Bangladesh", + 孟加拉国:"Bangladesh", 提款需要300积分: "300 points required for withdrawal", 提款需要1000积分: "1000 points required for withdrawal", 提款需要500积分: "500 points required for withdrawal", @@ -15453,7 +15455,9 @@ const Vf = { 积分: "积分", 非必填: "非必填", 余额不足: "余额不足", - 请添加印度: "请添加孟加拉国", + 请添加印度: "请添加印度", + 请添加孟加拉国:"请添加孟加拉国", + 孟加拉国:"孟加拉国", 提款需要300积分: "提款需要300积分", 提款需要1000积分: "提款需要1000积分", 提款需要500积分: "提款需要500积分", @@ -15972,13 +15976,13 @@ let zf = ""; (zf = -1 !== navigator.language.indexOf("zh") ? "zhCN" - : -1 !== navigator.language.indexOf("vi") - ? "vi" + // : -1 !== navigator.language.indexOf("vi") + // ? "vi" : -1 !== navigator.language.indexOf("en") ? "en" - : -1 !== navigator.language.indexOf("id") - ? "id" - : Ch), + // : -1 !== navigator.language.indexOf("id") + // ? "id" + : 'en'), Eh.set("language", zf); const Gf = (function (e = {}) { const t = diff --git a/public/mp4/name-9e85ff4d.mp4 b/public/mp4/name-9e85ff4d.mp4.back similarity index 100% rename from public/mp4/name-9e85ff4d.mp4 rename to public/mp4/name-9e85ff4d.mp4.back diff --git a/resource/translations/en/messages.php b/resource/translations/en/messages.php new file mode 100644 index 0000000..21db05f --- /dev/null +++ b/resource/translations/en/messages.php @@ -0,0 +1,21 @@ + 'You have not been idle for more than 6 hours, cannot sign in yet.', + '您已登陆' => 'You are already logged in.', + '请发送验证码' => 'Please send the verification code.', + '账户余额不足' => 'Insufficient account balance.', + '需要完成Whatsapp任务' => 'You need to complete the Whatsapp task.', + '账号或密码错误' => 'Incorrect username or password.', + '账号被禁用' => 'The account is disabled.', + '登录成功' => 'Login successful.', + '账号已存在' => 'Account already exists.', + '代理不存在' => 'Agent does not exist.', + '注册成功' => 'Registration successful.', + '原密码错误' => 'Incorrect original password.', + '修改成功' => 'Modification successful.', + '领取成功' => 'Claim successful.', + '每天只能提现三次' => 'You can only withdraw three times a day.', + '等待管理员审核' => 'Waiting for administrator review.', + '转账成功' => 'Transfer successful.', +]; diff --git a/resource/translations/zh_CN/messages.php b/resource/translations/zh_CN/messages.php new file mode 100644 index 0000000..6ae1a97 --- /dev/null +++ b/resource/translations/zh_CN/messages.php @@ -0,0 +1,21 @@ + '挂机时长没有超过6小时,暂不能签到', + '您已登陆' => '您已登陆', + '请发送验证码' => '请发送验证码', + '账户余额不足' => '账户余额不足', + '需要完成Whatsapp任务' => '需要完成Whatsapp任务', + '账号或密码错误' => '账号或密码错误', + '账号被禁用' => '账号被禁用', + '登录成功' => '登录成功', + '账号已存在' => '账号已存在', + '代理不存在' => '代理不存在', + '注册成功' => '注册成功', + '原密码错误' => '原密码错误', + '修改成功' => '修改成功', + '领取成功' => '领取成功', + '每天只能提现三次' => '每天只能提现三次', + '等待管理员审核' => '等待管理员审核', + '转账成功' => '转账成功', +]; \ No newline at end of file