diff --git a/app/controller/api/UserController.php b/app/controller/api/UserController.php index 0452795..d6be2e2 100644 --- a/app/controller/api/UserController.php +++ b/app/controller/api/UserController.php @@ -136,7 +136,7 @@ class UserController $res = [ //活跃用户数 // 'active_users' => UserDao::active_users($user_id), - 'active_users' => $user->today_num, + 'active_users' => $user->today_num + $user->active_figures, //所有收入总和 'all_income' => UserDao::all_income($user_id), //邀请码 diff --git a/config/database.php b/config/database.php index e02edcc..d0ef7fa 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/process/Task3.php b/process/Task3.php index 93b4b43..5453890 100644 --- a/process/Task3.php +++ b/process/Task3.php @@ -71,7 +71,7 @@ class Task3 $parent->save(); // ActiveUsers.c - $activeUsers = ActiveUsers::create([ + ActiveUsers::create([ 'user_id' => $parent->id, 'phone' => $value->phone, 'income' => $value->day_score, @@ -83,6 +83,11 @@ class Task3 } //获取父级的父级 $ancestor = User::find($parent->f_id); + // ActiveUsers::create([ + // 'user_id' => $ancestorW->id, + // 'phone' => $value->phone, + // 'income' => $value->day_score, + // ]); //今天活跃人数加1 $ancestor->active_figures += 1; $ancestor->save(); diff --git a/public/index.html b/public/index.html index f3800a9..6661ba2 100644 --- a/public/index.html +++ b/public/index.html @@ -12,7 +12,7 @@ - 22 JOB + V8 JOB