├── .editorconfig ├── .env.example ├── .gitattributes ├── .gitignore ├── .styleci.yml ├── .vscode └── settings.json ├── LICENSE ├── app ├── Comments.php ├── Console │ ├── Commands │ │ ├── GrantHonor.php │ │ ├── GrantMonthMedal.php │ │ ├── GrantRankingMedal.php │ │ └── GrantSeasonMedal.php │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Hitokoto.php ├── Http │ ├── Controllers │ │ ├── ActivitysController.php │ │ ├── AdminController.php │ │ ├── Auth │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── RegisterController.php │ │ │ ├── ResetPasswordController.php │ │ │ └── VerificationController.php │ │ ├── Controller.php │ │ ├── MomentsController.php │ │ ├── PublicController.php │ │ ├── RUsersController.php │ │ ├── RunController.php │ │ ├── SystemController.php │ │ └── testController.php │ ├── Kernel.php │ └── Middleware │ │ ├── Authenticate.php │ │ ├── CheckForMaintenanceMode.php │ │ ├── EncryptCookies.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustProxies.php │ │ ├── UserAuth.php │ │ ├── VerifyCsrfToken.php │ │ └── filterTime.php ├── Images.php ├── Lib │ └── functions.php ├── LinkUAs.php ├── LinkUHs.php ├── LinkULikeMs.php ├── LinkUMs.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── RActivityImgs.php ├── RActivitys.php ├── RCourses.php ├── RHonors.php ├── RMedals.php ├── RMomentImgs.php ├── RMoments.php ├── RNotices.php ├── RRuns.php ├── RSettings.php ├── RUsers.php └── User.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config&deploy.md ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── database.php ├── filesystems.php ├── hashing.php ├── logging.php ├── mail.php ├── queue.php ├── services.php ├── session.php └── view.php ├── database ├── .gitignore ├── factories │ └── UserFactory.php ├── migrations │ ├── 2020_01_24_113716_r_users.php │ ├── 2020_01_24_113717_images.php │ ├── 2020_01_24_113718_r_honors.php │ ├── 2020_01_24_113719_r_medals.php │ ├── 2020_01_24_113720_r_courses.php │ ├── 2020_01_24_114452_r_runs.php │ ├── 2020_01_24_114453_r_activitys.php │ ├── 2020_01_24_114454_r_moments.php │ ├── 2020_01_24_114455_comments.php │ ├── 2020_01_24_114456_r_settings.php │ ├── 2020_01_24_114457_r_notices.php │ ├── 2020_01_24_114458_hitokotos.php │ ├── 2020_01_27_163646_link_u_hs.php │ ├── 2020_01_27_163937_link_u_ms.php │ ├── 2020_01_27_164346_link_u_like_ms.php │ └── 2020_04_12_215243_link_u_as.php └── seeds │ └── DatabaseSeeder.php ├── package-lock.json ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── css │ └── app.css ├── favicon.ico ├── index.php ├── js │ └── app.js ├── layui │ ├── css │ │ ├── layui.css │ │ ├── layui.mobile.css │ │ └── modules │ │ │ ├── code.css │ │ │ ├── laydate │ │ │ └── default │ │ │ │ └── laydate.css │ │ │ └── layer │ │ │ └── default │ │ │ ├── icon-ext.png │ │ │ ├── icon.png │ │ │ ├── layer.css │ │ │ ├── loading-0.gif │ │ │ ├── loading-1.gif │ │ │ └── loading-2.gif │ ├── font │ │ ├── iconfont.eot │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ ├── iconfont.woff │ │ └── iconfont.woff2 │ ├── images │ │ └── face │ │ │ ├── 0.gif │ │ │ ├── 1.gif │ │ │ ├── 10.gif │ │ │ ├── 11.gif │ │ │ ├── 12.gif │ │ │ ├── 13.gif │ │ │ ├── 14.gif │ │ │ ├── 15.gif │ │ │ ├── 16.gif │ │ │ ├── 17.gif │ │ │ ├── 18.gif │ │ │ ├── 19.gif │ │ │ ├── 2.gif │ │ │ ├── 20.gif │ │ │ ├── 21.gif │ │ │ ├── 22.gif │ │ │ ├── 23.gif │ │ │ ├── 24.gif │ │ │ ├── 25.gif │ │ │ ├── 26.gif │ │ │ ├── 27.gif │ │ │ ├── 28.gif │ │ │ ├── 29.gif │ │ │ ├── 3.gif │ │ │ ├── 30.gif │ │ │ ├── 31.gif │ │ │ ├── 32.gif │ │ │ ├── 33.gif │ │ │ ├── 34.gif │ │ │ ├── 35.gif │ │ │ ├── 36.gif │ │ │ ├── 37.gif │ │ │ ├── 38.gif │ │ │ ├── 39.gif │ │ │ ├── 4.gif │ │ │ ├── 40.gif │ │ │ ├── 41.gif │ │ │ ├── 42.gif │ │ │ ├── 43.gif │ │ │ ├── 44.gif │ │ │ ├── 45.gif │ │ │ ├── 46.gif │ │ │ ├── 47.gif │ │ │ ├── 48.gif │ │ │ ├── 49.gif │ │ │ ├── 5.gif │ │ │ ├── 50.gif │ │ │ ├── 51.gif │ │ │ ├── 52.gif │ │ │ ├── 53.gif │ │ │ ├── 54.gif │ │ │ ├── 55.gif │ │ │ ├── 56.gif │ │ │ ├── 57.gif │ │ │ ├── 58.gif │ │ │ ├── 59.gif │ │ │ ├── 6.gif │ │ │ ├── 60.gif │ │ │ ├── 61.gif │ │ │ ├── 62.gif │ │ │ ├── 63.gif │ │ │ ├── 64.gif │ │ │ ├── 65.gif │ │ │ ├── 66.gif │ │ │ ├── 67.gif │ │ │ ├── 68.gif │ │ │ ├── 69.gif │ │ │ ├── 7.gif │ │ │ ├── 70.gif │ │ │ ├── 71.gif │ │ │ ├── 8.gif │ │ │ └── 9.gif │ ├── lay │ │ └── modules │ │ │ ├── carousel.js │ │ │ ├── code.js │ │ │ ├── colorpicker.js │ │ │ ├── element.js │ │ │ ├── flow.js │ │ │ ├── form.js │ │ │ ├── jquery.js │ │ │ ├── laydate.js │ │ │ ├── layedit.js │ │ │ ├── layer.js │ │ │ ├── laypage.js │ │ │ ├── laytpl.js │ │ │ ├── mobile.js │ │ │ ├── rate.js │ │ │ ├── slider.js │ │ │ ├── table.js │ │ │ ├── transfer.js │ │ │ ├── tree.js │ │ │ ├── upload.js │ │ │ └── util.js │ ├── layui.all.js │ └── layui.js ├── mix-manifest.json ├── resources │ ├── .gitignore │ ├── images │ │ └── 2020-01-31 │ │ │ ├── 5e331bb3986ad-1080x1920.jpg │ │ │ ├── 5e331bb3986ad-min-200x356.jpg │ │ │ ├── 5e33d15d2896e-1200x800.jpg │ │ │ └── 5e33d15d2896e-min-200x133.jpg │ └── medals │ │ ├── 2020_01.png │ │ ├── 2020_02.png │ │ ├── 2020_03.png │ │ ├── 2020_04.png │ │ ├── 2020_05.png │ │ ├── 2020_06.png │ │ ├── 2020_07.png │ │ ├── 2020_08.png │ │ ├── 2020_09.png │ │ ├── 2020_10.png │ │ ├── 2020_11.png │ │ ├── 2020_12.png │ │ ├── 2020_a.png │ │ ├── 2020_b.png │ │ ├── 2020_c.png │ │ ├── 2020_d.png │ │ ├── alltroea.png │ │ ├── dlmls2020.png │ │ ├── jiqin6.png │ │ ├── rank_a.png │ │ ├── rank_b.png │ │ ├── rank_c.png │ │ ├── rank_d.png │ │ ├── star_1.png │ │ ├── star_1_act.png │ │ ├── star_2.png │ │ ├── star_2_act.png │ │ ├── star_3.png │ │ ├── star_3_act.png │ │ ├── star_4.png │ │ ├── star_4_act.png │ │ ├── star_5.png │ │ ├── star_5_act.png │ │ ├── star_6.png │ │ ├── star_6_act.png │ │ ├── star_7.png │ │ ├── star_7_act.png │ │ ├── star_8.png │ │ ├── star_8_act.png │ │ └── sukl.png ├── robots.txt └── web.config ├── readme.md ├── resources ├── js │ ├── app.js │ ├── bootstrap.js │ └── components │ │ └── ExampleComponent.vue ├── lang │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php ├── sass │ ├── _variables.scss │ └── app.scss └── views │ ├── addActivity.blade.php │ ├── addCourse.blade.php │ ├── auth │ ├── login.blade.php │ ├── passwords │ │ ├── confirm.blade.php │ │ ├── email.blade.php │ │ └── reset.blade.php │ ├── register.blade.php │ └── verify.blade.php │ ├── home.blade.php │ ├── layouts │ └── app.blade.php │ └── welcome.blade.php ├── routes ├── api.php ├── channels.php ├── console.php └── web.php ├── server.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tests ├── CreatesApplication.php ├── Feature │ └── ExampleTest.php ├── TestCase.php ├── Unit │ └── ExampleTest.php └── bootstrap.php └── webpack.mix.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.yml] 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=PopRun 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | LOG_CHANNEL=stack 8 | TIMEZONE=Asia/Shanghai 9 | 10 | WX_APPID= 11 | WX_SECRET= 12 | 13 | DB_CONNECTION=mysql 14 | DB_HOST=127.0.0.1 15 | DB_PORT=3306 16 | DB_DATABASE= 17 | DB_USERNAME= 18 | DB_PASSWORD= 19 | 20 | BROADCAST_DRIVER=log 21 | CACHE_DRIVER=file 22 | QUEUE_CONNECTION=sync 23 | SESSION_DRIVER=file 24 | SESSION_LIFETIME=120 25 | 26 | REDIS_HOST=127.0.0.1 27 | REDIS_PASSWORD=null 28 | REDIS_PORT=6379 29 | 30 | MAIL_DRIVER=smtp 31 | MAIL_HOST=smtp.mailtrap.io 32 | MAIL_PORT=2525 33 | MAIL_USERNAME=null 34 | MAIL_PASSWORD=null 35 | MAIL_ENCRYPTION=null 36 | 37 | AWS_ACCESS_KEY_ID= 38 | AWS_SECRET_ACCESS_KEY= 39 | AWS_DEFAULT_REGION=us-east-1 40 | AWS_BUCKET= 41 | 42 | PUSHER_APP_ID= 43 | PUSHER_APP_KEY= 44 | PUSHER_APP_SECRET= 45 | PUSHER_APP_CLUSTER=mt1 46 | 47 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 48 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 49 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/hot 3 | /public/storage 4 | /public/resources/images 5 | /public/resources/files 6 | /storage/*.key 7 | /vendor 8 | .env 9 | .env.backup 10 | .phpunit.result.cache 11 | Homestead.json 12 | Homestead.yaml 13 | npm-debug.log 14 | yarn-error.log 15 | -------------------------------------------------------------------------------- /.styleci.yml: -------------------------------------------------------------------------------- 1 | php: 2 | preset: laravel 3 | disabled: 4 | - unused_use 5 | finder: 6 | not-name: 7 | - index.php 8 | - server.php 9 | js: 10 | finder: 11 | not-name: 12 | - webpack.mix.js 13 | css: true 14 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Patrick Jun 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /app/Comments.php: -------------------------------------------------------------------------------- 1 | where('r_runs.distance', '<>', null) //排除未完成运动 52 | ->select( 53 | DB::raw( 54 | 'r_users.rid, 55 | count(r_runs.ruid) as count 56 | ' 57 | ) 58 | ) 59 | ->groupBy('r_runs.rid') 60 | ->get(); 61 | foreach($userRuns as $user){ 62 | $hoid = 1; 63 | if($user->count <= 1) $hoid = 1; 64 | else if($user->count < 10) $hoid = 2; 65 | else if($user->count < 50) $hoid = 3; 66 | else if($user->count < 100) $hoid = 4; 67 | else if($user->count < 200) $hoid = 5; 68 | else if($user->count < 400) $hoid = 6; 69 | else if($user->count < 800) $hoid = 7; 70 | else if($user->count < 1000) $hoid = 8; 71 | else $hoid = 9; 72 | //先查询是否已存在相同等级的称号 73 | $linkHonors = LinkUHs::where('rid', $user->rid)->where('hoid', '=', $hoid)->first(); 74 | if(!$linkHonors){ //如果不存在,则可以进行称号进阶授予 75 | LinkUHs::where('rid', $user->rid) 76 | ->update( 77 | [ 78 | 'hoid' => $hoid 79 | ] 80 | ); 81 | System::systemNotice([ 82 | 'to' => $user->rid, 83 | 'msg' => "你已累计运动 $user->count 次,授予您新的的称号: lv".($hoid-1).' '.$this->honors[$hoid-1] 84 | ]); 85 | } 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /app/Console/Commands/GrantMonthMedal.php: -------------------------------------------------------------------------------- 1 | where('r_runs.distance', '<>', null) //排除未完成运动 53 | ->whereBetween('r_runs.created_at', [$timeStart, $timeEnd]) 54 | ->select( 55 | DB::raw( 56 | 'r_users.rid, 57 | count(r_runs.ruid) as count 58 | ' 59 | ) 60 | ) 61 | ->groupBy('r_runs.rid') 62 | ->get(); 63 | $medal = RMedals::where('mkey', $medalKey)->first(); 64 | if($medal){ 65 | foreach($userRuns as $user){ 66 | if($user->count >= 7){ 67 | $me = new LinkUMs(); 68 | $me->fill([ 69 | 'rid' => $user->rid, 70 | 'meid' => $medal->meid 71 | ]); 72 | if($me->save()){ 73 | System::systemNotice([ 74 | 'from' => 0, 75 | 'to' => $user->rid, 76 | 'type' => 0, 77 | 'msg' => "你新获得一枚勋章<".$medal->name.">" 78 | ]); 79 | } 80 | } 81 | } 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /app/Console/Commands/GrantRankingMedal.php: -------------------------------------------------------------------------------- 1 | $rid, 45 | 'msg' => "你新获得一枚勋章<".$medalName.">" 46 | ]); 47 | } 48 | 49 | /** 50 | * Execute the console command. 51 | * 52 | * @return mixed 53 | */ 54 | public function handle() 55 | { 56 | $ranks = ['rank_a', 'rank_b', 'rank_c', 'rank_d']; 57 | 58 | $timeStart = date('Y-m-01 00:00:00',strtotime('-1 month')); 59 | $timeEnd = date('Y-m-d', strtotime("$timeStart +1 month -1 day"))." 23:59:59"; 60 | 61 | $schools = RUsers::where('team', '<>', 'system')->select('team')->distinct()->get(); 62 | 63 | $rank_a = RMedals::where('mkey', $ranks[0])->first(); //校区前100 64 | $rank_b = RMedals::where('mkey', $ranks[1])->first(); //校区前10 65 | $rank_c = RMedals::where('mkey', $ranks[2])->first(); //校前1 66 | $rank_d = RMedals::where('mkey', $ranks[3])->first(); //国前100 67 | 68 | foreach($schools as $school){ 69 | //校区前100 70 | $top100school = RRuns::join('r_users', 'r_users.rid', '=', 'r_runs.rid') 71 | ->where('r_users.team', $school->team) 72 | ->where('r_runs.distance', '<>', null) //排除未完成运动 73 | ->whereBetween('r_runs.created_at', [$timeStart, $timeEnd]) 74 | ->select( 75 | DB::raw( 76 | 'r_users.rid, 77 | cast(sum(r_runs.distance) as decimal(15,2)) as sumD' 78 | )) 79 | ->groupBy('r_runs.rid') 80 | ->orderBy('sumD', 'desc') 81 | ->limit(100) 82 | ->get(); 83 | for( $i=0; $ifill([ 87 | 'rid' => $top100school[$i]->rid, 88 | 'meid' => $rank_c->meid 89 | ]); 90 | $me->save(); 91 | $this->noticeUser($top100school[$i]->rid, $rank_c->name); 92 | }else 93 | if( $i <= 10 ){ //校区前10 94 | $me = new LinkUMs(); 95 | $me->fill([ 96 | 'rid' => $top100school[$i]->rid, 97 | 'meid' => $rank_b->meid 98 | ]); 99 | $me->save(); 100 | $this->noticeUser($top100school[$i]->rid, $rank_b->name); 101 | }else{ //校区前100 102 | $me = new LinkUMs(); 103 | $me->fill([ 104 | 'rid' => $top100school[$i]->rid, 105 | 'meid' => $rank_a->meid 106 | ]); 107 | $me->save(); 108 | $this->noticeUser($top100school[$i]->rid, $rank_a->name); 109 | } 110 | } 111 | } 112 | 113 | //全国前100 114 | $top100 = RRuns::join('r_users', 'r_users.rid', '=', 'r_runs.rid') 115 | ->where('r_runs.distance', '<>', null) //排除未完成运动 116 | ->whereBetween('r_runs.created_at', [$timeStart, $timeEnd]) 117 | ->select( 118 | DB::raw( 119 | 'r_users.rid, 120 | cast(sum(r_runs.distance) as decimal(15,2)) as sumD' 121 | )) 122 | ->groupBy('r_runs.rid') 123 | ->orderBy('sumD', 'desc') 124 | ->limit(100) 125 | ->get(); 126 | foreach($top100 as $user){ 127 | $me = new LinkUMs(); 128 | $me->fill([ 129 | 'rid' => $user->rid, 130 | 'meid' => $rank_d->meid 131 | ]); 132 | $me->save(); 133 | $this->noticeUser($user->rid, $rank_d->name); 134 | } 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /app/Console/Commands/GrantSeasonMedal.php: -------------------------------------------------------------------------------- 1 | where('r_runs.distance', '<>', null) //排除未完成运动 54 | ->whereBetween('r_runs.created_at', [$timeStart, $timeEnd]) 55 | ->select( 56 | DB::raw( 57 | 'r_users.rid, 58 | count(r_runs.ruid) as count 59 | ' 60 | ) 61 | ) 62 | ->groupBy('r_runs.rid') 63 | ->get(); 64 | $medal = RMedals::where('mkey', $medalKey)->first(); 65 | foreach($userRuns as $user){ 66 | if($user->count >= 45){ 67 | $me = new LinkUMs(); 68 | $me->fill([ 69 | 'rid' => $user->rid, 70 | 'meid' => $medal->meid 71 | ]); 72 | if($me->save()){ 73 | System::systemNotice([ 74 | 'to' => $user->rid, 75 | 'msg' => "你新获得一枚勋章<".$medal->name.">" 76 | ]); 77 | } 78 | } 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('command:GrantMonthMedal')->monthlyOn(1, '00:30'); 34 | //获取季勋章 35 | $schedule->command('command:GrantSeasonMedal')->cron('35 00 01 */3 *'); 36 | //获取月排行榜勋章 37 | $schedule->command('command:GrantRankingMedal')->monthlyOn(1, '00:40'); 38 | //获取称号 39 | $schedule->command('command:GrantHonor')->dailyAt('00:01'); 40 | } 41 | 42 | /** 43 | * Register the commands for the application. 44 | * 45 | * @return void 46 | */ 47 | protected function commands() 48 | { 49 | $this->load(__DIR__.'/Commands'); 50 | 51 | require base_path('routes/console.php'); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | middleware('guest')->except('logout'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/RegisterController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 41 | } 42 | 43 | /** 44 | * Get a validator for an incoming registration request. 45 | * 46 | * @param array $data 47 | * @return \Illuminate\Contracts\Validation\Validator 48 | */ 49 | protected function validator(array $data) 50 | { 51 | return Validator::make($data, [ 52 | 'name' => ['required', 'string', 'max:255'], 53 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 54 | 'password' => ['required', 'string', 'min:8', 'confirmed'], 55 | ]); 56 | } 57 | 58 | /** 59 | * Create a new user instance after a valid registration. 60 | * 61 | * @param array $data 62 | * @return \App\User 63 | */ 64 | protected function create(array $data) 65 | { 66 | return User::create([ 67 | 'name' => $data['name'], 68 | 'email' => $data['email'], 69 | 'password' => Hash::make($data['password']), 70 | ]); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/VerificationController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 38 | $this->middleware('signed')->only('verify'); 39 | $this->middleware('throttle:6,1')->only('verify', 'resend'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | all(); 16 | $rules = [ 17 | 'img' => [ 'file','image','max:10240' ] 18 | ]; 19 | $validator = Validator::make($inputData,$rules); 20 | if($validator->fails()){ 21 | return returnData(false, "校验失败", $validator); 22 | } 23 | $photo = $inputData['img']; 24 | $file_name = uniqid(); 25 | $file_relative_path = 'resources/images/'.date('Y-m-d'); 26 | $file_path = public_path($file_relative_path); 27 | try { 28 | if (!is_dir($file_path)){ 29 | mkdir($file_path); 30 | } 31 | // 保存缩略图 resources/images/2020-01-31/5e3319bcafcae-min-200x356.jpg 32 | $dfile = Image::make($photo); 33 | $min_file_path = '/'.$file_name.'-min-'.'200x'.round(200*$dfile->height()/$dfile->width()).'.'.$photo->getClientOriginalExtension(); 34 | $image = Image::make($photo)->resize(200, null, function ($constraint) {$constraint->aspectRatio();})->save($file_path.$min_file_path); 35 | // 保存原图 resources/images/2020-01-31/5e3319bcafcae-1080x1920.jpg 36 | // $original_file_path = '/'.$file_name.'-'.$dfile->width().'x'.$dfile->height().'.'.$photo->getClientOriginalExtension(); 37 | // $image = Image::make($photo)->save($file_path.$original_file_path); //不能原图保存,服务器带宽获取太慢 38 | $original_file_path = '/'.$file_name.'-'.'1080x'.round(1080*$dfile->height()/$dfile->width()).'.'.$photo->getClientOriginalExtension(); 39 | $image = Image::make($photo)->resize(1080, null, function ($constraint) {$constraint->aspectRatio();})->save($file_path.$original_file_path); 40 | // TODO: 处理返回网络url, 本地调试默认用的http://,体验版或者上线需要替换成https:// 41 | $imgUrl = 'http://'.$request->server('HTTP_HOST').'/'.$file_relative_path; 42 | $data = [ 43 | 'name' => $photo->getClientOriginalName(), 44 | 'store' => $file_name, 45 | 'extension' => $photo->getClientOriginalExtension(), 46 | 'mimetype' => $photo->getClientMimeType(), 47 | 'size' => $photo->getSize(), 48 | 'width' => $dfile->width(), 49 | 'height' => $dfile->height(), 50 | 'mwidth' => 200, 51 | 'mheight' => round(200*$dfile->height()/$dfile->width()), 52 | 'original' => $imgUrl.$original_file_path, 53 | 'thumbnail' => $imgUrl.$min_file_path, 54 | 'error' => $photo->getError() 55 | ]; 56 | return returnData(true, '上传成功', $data); 57 | } catch (\Throwable $th) { 58 | return returnData(false, $th->getMessage()); 59 | } 60 | } 61 | // 获取称号列表 62 | public function getHonorAll(){ 63 | $honors = RHonors::get(); 64 | $data = []; 65 | foreach($honors as $honor){ 66 | array_push($data, ['name'=>$honor->name, 'desc'=>$honor->desc]); 67 | } 68 | return returnData(true, "操作成功", $data); 69 | } 70 | // 获取openid 71 | public function getOpenid(Request $request){ 72 | $appid = $request->has('appid') ? $request->appid : env('WX_APPID'); 73 | $secret = $request->has('secret') ? $request->secret : env('WX_SECRET'); 74 | if($request->has('code')){ 75 | $url = 'https://api.weixin.qq.com/sns/jscode2session?appid='.$appid.'&secret='.$secret.'&js_code='.$request->code.'&grant_type=authorization_code'; 76 | $curl = curl_init(); 77 | curl_setopt($curl, CURLOPT_URL, $url); 78 | curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); 79 | curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);//不验证 80 | curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);//不验证主机 81 | $returnjson=curl_exec($curl); 82 | if($returnjson){ 83 | //整理返回数据 84 | $json = json_decode($returnjson); 85 | if(!property_exists($json, 'errmsg')){ 86 | return returnData(true, "操作成功", $json); 87 | }else{ 88 | return returnData(false, $json->errmsg, null); 89 | } 90 | }else{ 91 | return returnData(false, curl_error($curl), null); 92 | } 93 | }else{ 94 | return returnData(false, "缺少code", null); 95 | } 96 | } 97 | // 获取勋章列表 98 | public function getMedalAll(Request $request){ 99 | return returnData(true, "操作成功", RMedals::get()); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 31 | \App\Http\Middleware\EncryptCookies::class, 32 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 33 | \Illuminate\Session\Middleware\StartSession::class, 34 | // \Illuminate\Session\Middleware\AuthenticateSession::class, 35 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 36 | \App\Http\Middleware\VerifyCsrfToken::class, 37 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 38 | ], 39 | 40 | 'api' => [ 41 | 'throttle:60,1', 42 | 'bindings', 43 | ], 44 | ]; 45 | 46 | /** 47 | * The application's route middleware. 48 | * 49 | * These middleware may be assigned to groups or used individually. 50 | * 51 | * @var array 52 | */ 53 | protected $routeMiddleware = [ 54 | 'auth' => \App\Http\Middleware\Authenticate::class, 55 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 56 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 57 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 58 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 59 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 60 | 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 61 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 62 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 63 | // 自定义中间件 64 | 'userAuth' => \App\Http\Middleware\UserAuth::class, 65 | 'filterTime' => \App\Http\Middleware\filterTime::class 66 | ]; 67 | 68 | /** 69 | * The priority-sorted list of middleware. 70 | * 71 | * This forces non-global middleware to always be in the given order. 72 | * 73 | * @var array 74 | */ 75 | protected $middlewarePriority = [ 76 | \Illuminate\Session\Middleware\StartSession::class, 77 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 78 | \App\Http\Middleware\Authenticate::class, 79 | \Illuminate\Routing\Middleware\ThrottleRequests::class, 80 | \Illuminate\Session\Middleware\AuthenticateSession::class, 81 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 82 | \Illuminate\Auth\Middleware\Authorize::class, 83 | ]; 84 | } 85 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 18 | return route('login'); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Middleware/CheckForMaintenanceMode.php: -------------------------------------------------------------------------------- 1 | check()) { 21 | return redirect('/home'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | all()['user']); 19 | // echo dd($request->has('user')); 20 | echo var_dump($request->only(['user','passwd'])); 21 | return $next($request); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | offsetUnset('created_at'); 20 | $request->offsetUnset('updated_at'); 21 | return $next($request); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Images.php: -------------------------------------------------------------------------------- 1 | 2 ? $args[2] : $args[1]; //可选:数据,失败时可不传(使用提示信息) 8 | 9 | $msg = is_string($msg) ? $msg : json_encode($msg); 10 | return [ 11 | 'isSuccess' => $isSuccess, 12 | 'msg' => $msg, 13 | 'data' => $data 14 | ]; 15 | } -------------------------------------------------------------------------------- /app/LinkUAs.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 19 | SendEmailVerificationNotification::class, 20 | ], 21 | ]; 22 | 23 | /** 24 | * Register any events for your application. 25 | * 26 | * @return void 27 | */ 28 | public function boot() 29 | { 30 | parent::boot(); 31 | 32 | // 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapApiRoutes(); 39 | 40 | $this->mapWebRoutes(); 41 | 42 | // 43 | } 44 | 45 | /** 46 | * Define the "web" routes for the application. 47 | * 48 | * These routes all receive session state, CSRF protection, etc. 49 | * 50 | * @return void 51 | */ 52 | protected function mapWebRoutes() 53 | { 54 | Route::middleware('web') 55 | ->namespace($this->namespace) 56 | ->group(base_path('routes/web.php')); 57 | } 58 | 59 | /** 60 | * Define the "api" routes for the application. 61 | * 62 | * These routes are typically stateless. 63 | * 64 | * @return void 65 | */ 66 | protected function mapApiRoutes() 67 | { 68 | Route::prefix('api') 69 | ->middleware('api') 70 | ->namespace($this->namespace) 71 | ->group(base_path('routes/api.php')); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /app/RActivityImgs.php: -------------------------------------------------------------------------------- 1 | 'datetime', 38 | ]; 39 | } 40 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "type": "project", 4 | "description": "The Laravel Framework.", 5 | "keywords": [ 6 | "framework", 7 | "laravel" 8 | ], 9 | "license": "MIT", 10 | "require": { 11 | "php": "^7.2", 12 | "fideloper/proxy": "^4.0", 13 | "intervention/image": "^2.5", 14 | "laravel/framework": "^6.0", 15 | "laravel/tinker": "^1.0", 16 | "predis/predis": "^1.1" 17 | }, 18 | "require-dev": { 19 | "filp/whoops": "^2.0", 20 | "fzaninotto/faker": "^1.4", 21 | "laravel/ui": "^1.1", 22 | "mockery/mockery": "^1.0", 23 | "nunomaduro/collision": "^3.0", 24 | "phpunit/phpunit": "^8.0" 25 | }, 26 | "config": { 27 | "optimize-autoloader": true, 28 | "preferred-install": "dist", 29 | "sort-packages": true 30 | }, 31 | "extra": { 32 | "laravel": { 33 | "dont-discover": [] 34 | } 35 | }, 36 | "autoload": { 37 | "psr-4": { 38 | "App\\": "app/" 39 | }, 40 | "classmap": [ 41 | "database/seeds", 42 | "database/factories" 43 | ], 44 | "files": [ 45 | "app/Lib/functions.php" 46 | ] 47 | }, 48 | "autoload-dev": { 49 | "psr-4": { 50 | "Tests\\": "tests/" 51 | } 52 | }, 53 | "minimum-stability": "dev", 54 | "prefer-stable": true, 55 | "scripts": { 56 | "post-autoload-dump": [ 57 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 58 | "@php artisan package:discover --ansi" 59 | ], 60 | "post-root-package-install": [ 61 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 62 | ], 63 | "post-create-project-cmd": [ 64 | "@php artisan key:generate --ansi" 65 | ] 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /config&deploy.md: -------------------------------------------------------------------------------- 1 | ## 1. Config 2 | 3 | ### dev.run.conf 4 | 5 | ``` sh 6 | server { 7 | listen 80; 8 | root /home/dev.run/PopRun-b/public; 9 | index index.html index.htm index.php; 10 | server_name dev.run.example.com; 11 | # 404 重要 12 | location / { 13 | try_files $uri $uri/ /index.php?$query_string; 14 | } 15 | location ~ \.php$ { 16 | include snippets/fastcgi-php.conf; 17 | fastcgi_pass unix:/run/php/php7.2-fpm.sock; 18 | } 19 | location ~ /\.ht { 20 | deny all; 21 | } 22 | } 23 | ``` 24 | 25 | ### nginx.conf 26 | client_max_body_size 30m; 27 | 28 | ### php.ini 29 | 30 | ``` she 31 | cgi.fix_pathinfo=0 32 | upload_max_filesize 20m 33 | 34 | extension=curl 35 | extension=fileinfo 36 | extension=gd2 37 | extension=mbstring 38 | extension=openssl 39 | extension=pdo_mysql 40 | ``` 41 | 42 | ### my.cnf 43 | 44 | [client] 45 | default-character-set = utf8mb4 46 | [mysql] 47 | default-character-set = utf8mb4 48 | [mysqld] 49 | character-set-client-handshake = FALSE 50 | character-set-server = utf8mb4 51 | collation-server = utf8mb4_unicode_ci 52 | init_connect='SET NAMES utf8mb4' 53 | 54 | ALTER DATABASE poprun CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; 55 | ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; 56 | ALTER TABLE table_name CHANGE column_name VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; 57 | 58 | ### .env 59 | 60 | ``` she 61 | APP_ENV=production 62 | APP_DEBUG=false 63 | APP_URL=http://dev.run.example.com 64 | 65 | WX_APPID= 66 | WX_SECRET= 67 | 68 | TIMEZONE=Asia/Shanghai 69 | DB_DATABASE= 70 | DB_USERNAME=root 71 | DB_PASSWORD= 72 | ``` 73 | 74 | ## Deploy 75 | 76 | ``` she 77 | /home/dev.run/ git clone git@github.com:Patrick-Jun/PopRun-b.git 78 | cd PopRun-b 79 | cp ../.env ./ 80 | 81 | composer install #first time 82 | php artisan key:generate #first time 83 | php artisan migrate #first time 84 | php artisan up 85 | 86 | crontab -e 87 | * * * * * php /home/dev.run/PopRun-b/artisan schedule:run >> /dev/null 2>&1 88 | 89 | chown -R www-data:www-data /home/dev.run/PopRun-b 90 | chmod -R 775 resources 91 | 92 | systemctl restart nginx 93 | systemctl restart php7.2-fpm 94 | ``` 95 | 96 | ## Update 97 | 98 | ``` she 99 | cd /home/dev.run/PopRun-b 100 | git pull 101 | ``` -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => 'web', 18 | 'passwords' => 'users', 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | here which uses session storage and the Eloquent user provider. 29 | | 30 | | All authentication drivers have a user provider. This defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | mechanisms used by this application to persist your user's data. 33 | | 34 | | Supported: "session", "token" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | 44 | 'api' => [ 45 | 'driver' => 'token', 46 | 'provider' => 'users', 47 | 'hash' => false, 48 | ], 49 | ], 50 | 51 | /* 52 | |-------------------------------------------------------------------------- 53 | | User Providers 54 | |-------------------------------------------------------------------------- 55 | | 56 | | All authentication drivers have a user provider. This defines how the 57 | | users are actually retrieved out of your database or other storage 58 | | mechanisms used by this application to persist your user's data. 59 | | 60 | | If you have multiple user tables or models you may configure multiple 61 | | sources which represent each model / table. These sources may then 62 | | be assigned to any extra authentication guards you have defined. 63 | | 64 | | Supported: "database", "eloquent" 65 | | 66 | */ 67 | 68 | 'providers' => [ 69 | 'users' => [ 70 | 'driver' => 'eloquent', 71 | 'model' => App\User::class, 72 | ], 73 | 74 | // 'users' => [ 75 | // 'driver' => 'database', 76 | // 'table' => 'users', 77 | // ], 78 | ], 79 | 80 | /* 81 | |-------------------------------------------------------------------------- 82 | | Resetting Passwords 83 | |-------------------------------------------------------------------------- 84 | | 85 | | You may specify multiple password reset configurations if you have more 86 | | than one user table or model in the application and you want to have 87 | | separate password reset settings based on the specific user types. 88 | | 89 | | The expire time is the number of minutes that the reset token should be 90 | | considered valid. This security feature keeps tokens short-lived so 91 | | they have less time to be guessed. You may change this as needed. 92 | | 93 | */ 94 | 95 | 'passwords' => [ 96 | 'users' => [ 97 | 'provider' => 'users', 98 | 'table' => 'password_resets', 99 | 'expire' => 60, 100 | ], 101 | ], 102 | 103 | ]; 104 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | 'cluster' => env('PUSHER_APP_CLUSTER'), 40 | 'useTLS' => true, 41 | ], 42 | ], 43 | 44 | 'redis' => [ 45 | 'driver' => 'redis', 46 | 'connection' => 'default', 47 | ], 48 | 49 | 'log' => [ 50 | 'driver' => 'log', 51 | ], 52 | 53 | 'null' => [ 54 | 'driver' => 'null', 55 | ], 56 | 57 | ], 58 | 59 | ]; 60 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Cache Stores 26 | |-------------------------------------------------------------------------- 27 | | 28 | | Here you may define all of the cache "stores" for your application as 29 | | well as their drivers. You may even define multiple stores for the 30 | | same cache driver to group types of items stored in your caches. 31 | | 32 | */ 33 | 34 | 'stores' => [ 35 | 36 | 'apc' => [ 37 | 'driver' => 'apc', 38 | ], 39 | 40 | 'array' => [ 41 | 'driver' => 'array', 42 | ], 43 | 44 | 'database' => [ 45 | 'driver' => 'database', 46 | 'table' => 'cache', 47 | 'connection' => null, 48 | ], 49 | 50 | 'file' => [ 51 | 'driver' => 'file', 52 | 'path' => storage_path('framework/cache/data'), 53 | ], 54 | 55 | 'memcached' => [ 56 | 'driver' => 'memcached', 57 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 58 | 'sasl' => [ 59 | env('MEMCACHED_USERNAME'), 60 | env('MEMCACHED_PASSWORD'), 61 | ], 62 | 'options' => [ 63 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 64 | ], 65 | 'servers' => [ 66 | [ 67 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 68 | 'port' => env('MEMCACHED_PORT', 11211), 69 | 'weight' => 100, 70 | ], 71 | ], 72 | ], 73 | 74 | 'redis' => [ 75 | 'driver' => 'redis', 76 | 'connection' => 'cache', 77 | ], 78 | 79 | 'dynamodb' => [ 80 | 'driver' => 'dynamodb', 81 | 'key' => env('AWS_ACCESS_KEY_ID'), 82 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 83 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 84 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), 85 | 'endpoint' => env('DYNAMODB_ENDPOINT'), 86 | ], 87 | 88 | ], 89 | 90 | /* 91 | |-------------------------------------------------------------------------- 92 | | Cache Key Prefix 93 | |-------------------------------------------------------------------------- 94 | | 95 | | When utilizing a RAM based store such as APC or Memcached, there might 96 | | be other applications utilizing the same cache. So, we'll specify a 97 | | value to get prefixed to all our keys so we can avoid collisions. 98 | | 99 | */ 100 | 101 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), 102 | 103 | ]; 104 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Default Cloud Filesystem Disk 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Many applications store files both locally and in the cloud. For this 24 | | reason, you may specify a default "cloud" driver here. This driver 25 | | will be bound as the Cloud disk implementation in the container. 26 | | 27 | */ 28 | 29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Filesystem Disks 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here you may configure as many filesystem "disks" as you wish, and you 37 | | may even configure multiple disks of the same driver. Defaults have 38 | | been setup for each driver as an example of the required options. 39 | | 40 | | Supported Drivers: "local", "ftp", "sftp", "s3" 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path('app'), 49 | ], 50 | 51 | 'public' => [ 52 | 'driver' => 'local', 53 | 'root' => storage_path('app/public'), 54 | 'url' => env('APP_URL').'/storage', 55 | 'visibility' => 'public', 56 | ], 57 | 58 | 's3' => [ 59 | 'driver' => 's3', 60 | 'key' => env('AWS_ACCESS_KEY_ID'), 61 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 62 | 'region' => env('AWS_DEFAULT_REGION'), 63 | 'bucket' => env('AWS_BUCKET'), 64 | 'url' => env('AWS_URL'), 65 | ], 66 | 67 | ], 68 | 69 | ]; 70 | -------------------------------------------------------------------------------- /config/hashing.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Bcrypt Options 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may specify the configuration options that should be used when 26 | | passwords are hashed using the Bcrypt algorithm. This will allow you 27 | | to control the amount of time it takes to hash the given password. 28 | | 29 | */ 30 | 31 | 'bcrypt' => [ 32 | 'rounds' => env('BCRYPT_ROUNDS', 10), 33 | ], 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Argon Options 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Here you may specify the configuration options that should be used when 41 | | passwords are hashed using the Argon algorithm. These will allow you 42 | | to control the amount of time it takes to hash the given password. 43 | | 44 | */ 45 | 46 | 'argon' => [ 47 | 'memory' => 1024, 48 | 'threads' => 2, 49 | 'time' => 2, 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Log Channels 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may configure the log channels for your application. Out of 27 | | the box, Laravel uses the Monolog PHP logging library. This gives 28 | | you a variety of powerful log handlers / formatters to utilize. 29 | | 30 | | Available Drivers: "single", "daily", "slack", "syslog", 31 | | "errorlog", "monolog", 32 | | "custom", "stack" 33 | | 34 | */ 35 | 36 | 'channels' => [ 37 | 'stack' => [ 38 | 'driver' => 'stack', 39 | 'channels' => ['daily'], 40 | 'ignore_exceptions' => false, 41 | ], 42 | 43 | 'single' => [ 44 | 'driver' => 'single', 45 | 'path' => storage_path('logs/laravel.log'), 46 | 'level' => 'debug', 47 | ], 48 | 49 | 'daily' => [ 50 | 'driver' => 'daily', 51 | 'path' => storage_path('logs/laravel.log'), 52 | 'level' => 'debug', 53 | 'days' => 14, 54 | ], 55 | 56 | 'slack' => [ 57 | 'driver' => 'slack', 58 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 59 | 'username' => 'Laravel Log', 60 | 'emoji' => ':boom:', 61 | 'level' => 'critical', 62 | ], 63 | 64 | 'papertrail' => [ 65 | 'driver' => 'monolog', 66 | 'level' => 'debug', 67 | 'handler' => SyslogUdpHandler::class, 68 | 'handler_with' => [ 69 | 'host' => env('PAPERTRAIL_URL'), 70 | 'port' => env('PAPERTRAIL_PORT'), 71 | ], 72 | ], 73 | 74 | 'stderr' => [ 75 | 'driver' => 'monolog', 76 | 'handler' => StreamHandler::class, 77 | 'formatter' => env('LOG_STDERR_FORMATTER'), 78 | 'with' => [ 79 | 'stream' => 'php://stderr', 80 | ], 81 | ], 82 | 83 | 'syslog' => [ 84 | 'driver' => 'syslog', 85 | 'level' => 'debug', 86 | ], 87 | 88 | 'errorlog' => [ 89 | 'driver' => 'errorlog', 90 | 'level' => 'debug', 91 | ], 92 | ], 93 | 94 | ]; 95 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_CONNECTION', 'sync'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Queue Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the connection information for each server that 24 | | is used by your application. A default configuration has been added 25 | | for each back-end shipped with Laravel. You are free to add more. 26 | | 27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'retry_after' => 90, 49 | 'block_for' => 0, 50 | ], 51 | 52 | 'sqs' => [ 53 | 'driver' => 'sqs', 54 | 'key' => env('AWS_ACCESS_KEY_ID'), 55 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 56 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 57 | 'queue' => env('SQS_QUEUE', 'your-queue-name'), 58 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 59 | ], 60 | 61 | 'redis' => [ 62 | 'driver' => 'redis', 63 | 'connection' => 'default', 64 | 'queue' => env('REDIS_QUEUE', 'default'), 65 | 'retry_after' => 90, 66 | 'block_for' => null, 67 | ], 68 | 69 | ], 70 | 71 | /* 72 | |-------------------------------------------------------------------------- 73 | | Failed Queue Jobs 74 | |-------------------------------------------------------------------------- 75 | | 76 | | These options configure the behavior of failed queue job logging so you 77 | | can control which database and table are used to store the jobs that 78 | | have failed. You may change them to any database / table you wish. 79 | | 80 | */ 81 | 82 | 'failed' => [ 83 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database'), 84 | 'database' => env('DB_CONNECTION', 'mysql'), 85 | 'table' => 'failed_jobs', 86 | ], 87 | 88 | ]; 89 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | ], 22 | 23 | 'postmark' => [ 24 | 'token' => env('POSTMARK_TOKEN'), 25 | ], 26 | 27 | 'ses' => [ 28 | 'key' => env('AWS_ACCESS_KEY_ID'), 29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 31 | ], 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | *.sqlite-journal 3 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | define(User::class, function (Faker $faker) { 20 | return [ 21 | 'name' => $faker->name, 22 | 'email' => $faker->unique()->safeEmail, 23 | 'email_verified_at' => now(), 24 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 25 | 'remember_token' => Str::random(10), 26 | ]; 27 | }); 28 | -------------------------------------------------------------------------------- /database/migrations/2020_01_24_113716_r_users.php: -------------------------------------------------------------------------------- 1 | increments('rid')->unsigned(); 18 | $table->string('openid', 50)->unique(); 19 | $table->string('nickname', 20)->comment('昵称:微信昵称最长16'); 20 | $table->string('team', 50)->nullable()->comment('校区'); 21 | $table->tinyInteger('sex')->unsigned()->comment('性别'); 22 | $table->string('img', 200)->comment('头像'); 23 | $table->string('info', 200)->nullable()->comment('签名'); 24 | $table->string('job', 20)->nullable()->comment('职业'); 25 | $table->timestamps(); 26 | // $table->primary(['rid']); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::dropIfExists('r_users'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /database/migrations/2020_01_24_113717_images.php: -------------------------------------------------------------------------------- 1 | increments('id')->unsigned(); 18 | $table->string('key', 10)->comment('索引串:moment,activity,activity-c,course'); 19 | $table->integer('key_id')->unsigned()->comment('对应表id'); 20 | $table->string('name', 200)->comment('源名称'); 21 | $table->string('store', 50)->comment('存储名称'); 22 | $table->string('extension', 10)->comment('后缀'); 23 | $table->string('mimetype', 20)->comment('图片格式'); 24 | $table->integer('size')->unsigned()->comment('源大小'); 25 | $table->smallInteger('width')->unsigned()->comment('宽'); 26 | $table->smallInteger('height')->unsigned()->comment('高'); 27 | $table->smallInteger('mwidth')->unsigned()->default(200)->comment('压缩宽'); 28 | $table->smallInteger('mheight')->unsigned()->comment('压缩高'); 29 | $table->string('original', 200)->comment('原图url'); 30 | $table->string('thumbnail', 200)->comment('压缩图rul'); 31 | $table->string('error', 50)->nullable()->comment('压缩错误信息'); 32 | $table->timestamps(); 33 | }); 34 | } 35 | 36 | /** 37 | * Reverse the migrations. 38 | * 39 | * @return void 40 | */ 41 | public function down() 42 | { 43 | Schema::dropIfExists('images'); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /database/migrations/2020_01_24_113718_r_honors.php: -------------------------------------------------------------------------------- 1 | increments('hoid')->unsigned(); 18 | $table->string('desc', 4)->unique()->comment('称号描述'); 19 | $table->string('name', 10)->unique()->comment('称号名称'); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('r_honors'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2020_01_24_113719_r_medals.php: -------------------------------------------------------------------------------- 1 | increments('meid', 4)->unsigned(); 18 | $table->string('mkey', 10)->unique()->comment('检索串'); 19 | $table->tinyInteger('type')->unsigned()->default(0)->comment('类型:1可重复获得,0不可重复'); 20 | $table->string('desc', 100)->comment('勋章简介'); 21 | $table->string('name', 20)->unique()->comment('勋章名称'); 22 | $table->string('img', 200)->unique()->comment('勋章图标'); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('r_medals'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2020_01_24_113720_r_courses.php: -------------------------------------------------------------------------------- 1 | increments('rcid')->unsigned(); 18 | $table->string('title', 30)->comment('教程标题'); 19 | $table->longText('text')->comment('教程内容'); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('r_courses'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2020_01_24_114452_r_runs.php: -------------------------------------------------------------------------------- 1 | increments('ruid')->unsigned(); 18 | $table->integer('rid')->unsigned(); 19 | $table->decimal('distance', 5, 2)->unsigned()->nullable()->comment('里程'); //勋章计算:总里程、单次 5表示总位数 2表示小数位 20 | $table->smallInteger('calorie')->unsigned()->nullable()->comment('卡路里'); 21 | 22 | $table->decimal('speed_top', 4, 2)->unsigned()->nullable()->comment('最高配速'); // Syntax error or access violation: 1427 For float(M,D), double(M,D) or decimal(M,D), M must be >= D 23 | $table->decimal('speed_low', 4, 2)->unsigned()->nullable()->comment('最低配速'); 24 | $table->decimal('speed', 4, 2)->unsigned()->nullable()->comment('平均配速'); 25 | 26 | $table->timestamp('time_start')->comment('开始时间'); //勋章计算:早起 27 | $table->timestamp('time_end')->nullable()->comment('结束时间'); 28 | $table->smallInteger('time_run')->unsigned()->nullable()->comment('运动时间s'); //勋章计算:累计时间、单次 29 | 30 | $table->decimal('latitude_start', 19, 15)->comment('起点维度'); 31 | $table->decimal('longitude_start', 19, 15)->comment('起点经度'); 32 | $table->decimal('latitude_end', 19, 15)->nullable()->comment('终点维度'); 33 | $table->decimal('longitude_end', 19, 15)->nullable()->comment('终点经度'); 34 | 35 | $table->tinyInteger('isshared')->unsigned()->default(0)->comment('是否分享'); //是否分享:0未分享,1已分享 36 | $table->timestamps(); 37 | 38 | 39 | //外键设置得先定义字段,再设置 40 | $table->foreign('rid')->references('rid')->on('r_users'); 41 | }); 42 | } 43 | 44 | /** 45 | * Reverse the migrations. 46 | * 47 | * @return void 48 | */ 49 | public function down() 50 | { 51 | Schema::dropIfExists('r_runs'); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /database/migrations/2020_01_24_114453_r_activitys.php: -------------------------------------------------------------------------------- 1 | increments('acid')->unsigned(); 18 | $table->integer('meid')->unsigned()->comment('勋章id'); 19 | $table->integer('cover')->unsigned()->comment('封面图id'); 20 | $table->string('title', 30)->comment('标题'); 21 | $table->tinyInteger('distance')->unsigned()->default(1)->comment('完成条件'); 22 | $table->string('desc', 200)->nullable()->comment('简要描述:当图片介绍时可为空'); 23 | $table->longText('content')->nullable()->comment('活动内容:当图片介绍时可为空'); 24 | $table->timestamp('period')->comment('截止时间'); 25 | $table->timestamps(); 26 | 27 | //外键设置得先定义字段,再设置 28 | $table->foreign('meid')->references('meid')->on('r_medals'); 29 | $table->foreign('cover')->references('id')->on('images'); 30 | }); 31 | } 32 | 33 | /** 34 | * Reverse the migrations. 35 | * 36 | * @return void 37 | */ 38 | public function down() 39 | { 40 | Schema::dropIfExists('r_activitys'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /database/migrations/2020_01_24_114454_r_moments.php: -------------------------------------------------------------------------------- 1 | increments('moid')->unsigned(); 18 | $table->integer('rid')->unsigned(); 19 | $table->text('text')->nullable()->comment('动态内容:图片动态时为空'); 20 | $table->string('location', 50)->nullable()->comment('位置'); 21 | $table->decimal('latitude', 19, 15)->nullable()->comment('位置维度'); 22 | $table->decimal('longitude', 19, 15)->nullable()->comment('位置经度'); 23 | $table->tinyInteger('type')->unsigned()->default(0)->comment('类型:0普通动态,1打卡分享'); 24 | $table->timestamps(); 25 | 26 | //外键设置得先定义字段,再设置 27 | $table->foreign('rid')->references('rid')->on('r_users'); 28 | }); 29 | } 30 | 31 | /** 32 | * Reverse the migrations. 33 | * 34 | * @return void 35 | */ 36 | public function down() 37 | { 38 | Schema::dropIfExists('r_moments'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /database/migrations/2020_01_24_114455_comments.php: -------------------------------------------------------------------------------- 1 | increments('coid')->unsigned(); 18 | $table->integer('rid')->unsigned(); 19 | $table->integer('moid')->unsigned(); 20 | $table->string('comment', 200)->comment('评论'); 21 | $table->timestamps(); 22 | 23 | //外键设置得先定义字段,再设置 24 | $table->foreign('rid')->references('rid')->on('r_users'); 25 | $table->foreign('moid')->references('moid')->on('r_moments'); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('comments'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /database/migrations/2020_01_24_114456_r_settings.php: -------------------------------------------------------------------------------- 1 | integer('rid')->unsigned(); 18 | $table->tinyInteger('job')->unsigned()->default(1)->comment('类型:0不可见,1可见'); 19 | $table->tinyInteger('team')->unsigned()->default(1)->comment('类型:0不可见,1可见'); 20 | $table->tinyInteger('run')->unsigned()->default(1)->comment('类型:0不可见,1可见'); 21 | $table->timestamps(); 22 | 23 | //外键设置得先定义字段,再设置 24 | $table->foreign('rid')->references('rid')->on('r_users'); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('r_settings'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2020_01_24_114457_r_notices.php: -------------------------------------------------------------------------------- 1 | increments('noid')->unsigned(); 18 | $table->integer('from')->unsigned()->comment('发出者:系统用户rid=0'); 19 | $table->integer('to')->unsigned()->on('r_users')->comment('接收者'); 20 | $table->tinyInteger('type')->unsigned()->comment('类型:1点赞,2评论,0系统通知'); 21 | $table->tinyInteger('read')->unsigned()->default(0)->comment('是否已读:0未读,1已读'); 22 | $table->string('msg', 200)->comment('消息内容'); 23 | $table->timestamps(); 24 | 25 | 26 | //外键设置得先定义字段,再设置 27 | $table->foreign('from')->references('rid')->on('r_users'); 28 | $table->foreign('to')->references('rid')->on('r_users'); 29 | }); 30 | } 31 | 32 | /** 33 | * Reverse the migrations. 34 | * 35 | * @return void 36 | */ 37 | public function down() 38 | { 39 | Schema::dropIfExists('r_notice'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /database/migrations/2020_01_24_114458_hitokotos.php: -------------------------------------------------------------------------------- 1 | increments('hiid')->unsigned(); 18 | $table->string('hitokoto', 200)->comment('一言'); 19 | $table->string('type', 1)->comment('类型'); 20 | $table->string('from', 50)->nullable()->comment('来源'); 21 | $table->string('creator', 30)->nullable()->comment('作者'); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::table('hitokoto', function (Blueprint $table) { 34 | // 35 | }); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2020_01_27_163646_link_u_hs.php: -------------------------------------------------------------------------------- 1 | integer('rid')->unsigned(); 18 | $table->integer('hoid')->unsigned(); 19 | $table->timestamps(); 20 | 21 | //外键设置得先定义字段,再设置 22 | $table->foreign('rid')->references('rid')->on('r_users'); 23 | $table->foreign('hoid')->references('hoid')->on('r_honors'); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('link_u_hs'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2020_01_27_163937_link_u_ms.php: -------------------------------------------------------------------------------- 1 | increments('linkid')->unsigned(); 18 | $table->integer('rid')->unsigned(); 19 | $table->integer('meid')->unsigned(); 20 | $table->timestamps(); 21 | 22 | //外键设置得先定义字段,再设置 23 | $table->foreign('rid')->references('rid')->on('r_users'); 24 | $table->foreign('meid')->references('meid')->on('r_medals'); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('link_u_ms'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2020_01_27_164346_link_u_like_ms.php: -------------------------------------------------------------------------------- 1 | integer('moid')->unsigned(); 18 | $table->integer('rid')->unsigned(); 19 | $table->timestamps(); 20 | 21 | //外键设置得先定义字段,再设置 22 | $table->foreign('moid')->references('moid')->on('r_moments'); 23 | $table->foreign('rid')->references('rid')->on('r_users'); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('link_u_like_ms'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2020_04_12_215243_link_u_as.php: -------------------------------------------------------------------------------- 1 | integer('rid')->unsigned(); 18 | $table->integer('acid')->unsigned(); 19 | $table->tinyInteger('isfinished')->unsigned()->default(0)->comment('0未完成,1已完成'); 20 | $table->timestamps(); 21 | 22 | //外键设置得先定义字段,再设置 23 | $table->foreign('rid')->references('rid')->on('r_users'); 24 | $table->foreign('acid')->references('acid')->on('r_activitys'); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('link_u_as'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UsersTableSeeder::class); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 6 | "watch": "npm run development -- --watch", 7 | "watch-poll": "npm run watch -- --watch-poll", 8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", 9 | "prod": "npm run production", 10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" 11 | }, 12 | "devDependencies": { 13 | "axios": "^0.19", 14 | "bootstrap": "^4.0.0", 15 | "cross-env": "^5.1", 16 | "jquery": "^3.2", 17 | "laravel-mix": "^4.0.7", 18 | "lodash": "^4.17.13", 19 | "popper.js": "^1.12", 20 | "resolve-url-loader": "^2.3.1", 21 | "sass": "^1.20.1", 22 | "sass-loader": "7.*", 23 | "vue": "^2.5.17", 24 | "vue-template-compiler": "^2.6.10" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests/Unit 14 | 15 | 16 | 17 | ./tests/Feature 18 | 19 | 20 | 21 | 22 | ./app 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Handle Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/favicon.ico -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | define('LARAVEL_START', microtime(true)); 11 | 12 | /* 13 | |-------------------------------------------------------------------------- 14 | | Register The Auto Loader 15 | |-------------------------------------------------------------------------- 16 | | 17 | | Composer provides a convenient, automatically generated class loader for 18 | | our application. We just need to utilize it! We'll simply require it 19 | | into the script here so that we don't have to worry about manual 20 | | loading any of our classes later on. It feels great to relax. 21 | | 22 | */ 23 | 24 | require __DIR__.'/../vendor/autoload.php'; 25 | 26 | /* 27 | |-------------------------------------------------------------------------- 28 | | Turn On The Lights 29 | |-------------------------------------------------------------------------- 30 | | 31 | | We need to illuminate PHP development, so let us turn on the lights. 32 | | This bootstraps the framework and gets it ready for use, then it 33 | | will load up this application so that we can run it and send 34 | | the responses back to the browser and delight our users. 35 | | 36 | */ 37 | 38 | $app = require_once __DIR__.'/../bootstrap/app.php'; 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Run The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once we have the application, we can handle the incoming request 46 | | through the kernel, and send the associated response back to 47 | | the client's browser allowing them to enjoy the creative 48 | | and wonderful application we have prepared for them. 49 | | 50 | */ 51 | 52 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 53 | 54 | $response = $kernel->handle( 55 | $request = Illuminate\Http\Request::capture() 56 | ); 57 | 58 | $response->send(); 59 | 60 | $kernel->terminate($request, $response); 61 | -------------------------------------------------------------------------------- /public/layui/css/modules/code.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none} -------------------------------------------------------------------------------- /public/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /public/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /public/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /public/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /public/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /public/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/font/iconfont.eot -------------------------------------------------------------------------------- /public/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /public/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/font/iconfont.woff -------------------------------------------------------------------------------- /public/layui/font/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/font/iconfont.woff2 -------------------------------------------------------------------------------- /public/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/0.gif -------------------------------------------------------------------------------- /public/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/1.gif -------------------------------------------------------------------------------- /public/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/10.gif -------------------------------------------------------------------------------- /public/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/11.gif -------------------------------------------------------------------------------- /public/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/12.gif -------------------------------------------------------------------------------- /public/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/13.gif -------------------------------------------------------------------------------- /public/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/14.gif -------------------------------------------------------------------------------- /public/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/15.gif -------------------------------------------------------------------------------- /public/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/16.gif -------------------------------------------------------------------------------- /public/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/17.gif -------------------------------------------------------------------------------- /public/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/18.gif -------------------------------------------------------------------------------- /public/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/19.gif -------------------------------------------------------------------------------- /public/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/2.gif -------------------------------------------------------------------------------- /public/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/20.gif -------------------------------------------------------------------------------- /public/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/21.gif -------------------------------------------------------------------------------- /public/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/22.gif -------------------------------------------------------------------------------- /public/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/23.gif -------------------------------------------------------------------------------- /public/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/24.gif -------------------------------------------------------------------------------- /public/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/25.gif -------------------------------------------------------------------------------- /public/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/26.gif -------------------------------------------------------------------------------- /public/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/27.gif -------------------------------------------------------------------------------- /public/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/28.gif -------------------------------------------------------------------------------- /public/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/29.gif -------------------------------------------------------------------------------- /public/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/3.gif -------------------------------------------------------------------------------- /public/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/30.gif -------------------------------------------------------------------------------- /public/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/31.gif -------------------------------------------------------------------------------- /public/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/32.gif -------------------------------------------------------------------------------- /public/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/33.gif -------------------------------------------------------------------------------- /public/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/34.gif -------------------------------------------------------------------------------- /public/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/35.gif -------------------------------------------------------------------------------- /public/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/36.gif -------------------------------------------------------------------------------- /public/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/37.gif -------------------------------------------------------------------------------- /public/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/38.gif -------------------------------------------------------------------------------- /public/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/39.gif -------------------------------------------------------------------------------- /public/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/4.gif -------------------------------------------------------------------------------- /public/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/40.gif -------------------------------------------------------------------------------- /public/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/41.gif -------------------------------------------------------------------------------- /public/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/42.gif -------------------------------------------------------------------------------- /public/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/43.gif -------------------------------------------------------------------------------- /public/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/44.gif -------------------------------------------------------------------------------- /public/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/45.gif -------------------------------------------------------------------------------- /public/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/46.gif -------------------------------------------------------------------------------- /public/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/47.gif -------------------------------------------------------------------------------- /public/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/48.gif -------------------------------------------------------------------------------- /public/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/49.gif -------------------------------------------------------------------------------- /public/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/5.gif -------------------------------------------------------------------------------- /public/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/50.gif -------------------------------------------------------------------------------- /public/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/51.gif -------------------------------------------------------------------------------- /public/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/52.gif -------------------------------------------------------------------------------- /public/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/53.gif -------------------------------------------------------------------------------- /public/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/54.gif -------------------------------------------------------------------------------- /public/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/55.gif -------------------------------------------------------------------------------- /public/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/56.gif -------------------------------------------------------------------------------- /public/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/57.gif -------------------------------------------------------------------------------- /public/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/58.gif -------------------------------------------------------------------------------- /public/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/59.gif -------------------------------------------------------------------------------- /public/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/6.gif -------------------------------------------------------------------------------- /public/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/60.gif -------------------------------------------------------------------------------- /public/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/61.gif -------------------------------------------------------------------------------- /public/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/62.gif -------------------------------------------------------------------------------- /public/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/63.gif -------------------------------------------------------------------------------- /public/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/64.gif -------------------------------------------------------------------------------- /public/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/65.gif -------------------------------------------------------------------------------- /public/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/66.gif -------------------------------------------------------------------------------- /public/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/67.gif -------------------------------------------------------------------------------- /public/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/68.gif -------------------------------------------------------------------------------- /public/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/69.gif -------------------------------------------------------------------------------- /public/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/7.gif -------------------------------------------------------------------------------- /public/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/70.gif -------------------------------------------------------------------------------- /public/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/71.gif -------------------------------------------------------------------------------- /public/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/8.gif -------------------------------------------------------------------------------- /public/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/layui/images/face/9.gif -------------------------------------------------------------------------------- /public/layui/lay/modules/carousel.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(clearInterval(e.timer),e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
"].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a/g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
  1. '+o.replace(/[\r\t\n]+/g,"
  2. ")+"
"),c.find(">.layui-code-h3")[0]||c.prepend('

'+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); -------------------------------------------------------------------------------- /public/layui/lay/modules/flow.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),!i&&f.width()&&(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)}); -------------------------------------------------------------------------------- /public/layui/lay/modules/laypage.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var a=document,t="getElementById",n="getElementsByTagName",i="laypage",r="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config,t=a.groups="groups"in a?0|a.groups:5;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),t<0?t=1:t>a.pages&&(t=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var n=a.pages>t?Math.ceil((a.curr+(t>1?1:0))/(t>0?t:1)):1,i={prev:function(){return a.prev?''+a.prev+"":""}(),page:function(){var e=[];if(a.count<1)return"";n>1&&a.first!==!1&&0!==t&&e.push(''+(a.first||1)+"");var i=Math.floor((t-1)/2),r=n>1?a.curr-i:1,u=n>1?function(){var e=a.curr+(t-i-1);return e>a.pages?a.pages:e}():t;for(u-r2&&e.push('');r<=u;r++)r===a.curr?e.push('"+r+""):e.push(''+r+"");return a.pages>t&&a.pages>u&&a.last!==!1&&(u+1…'),0!==t&&e.push(''+(a.last||a.pages)+"")),e.join("")}(),next:function(){return a.next?''+a.next+"":""}(),count:'共 '+a.count+" 条",limit:function(){var e=['"}(),refresh:['','',""].join(""),skip:function(){return['到第','','页',""].join("")}()};return['
',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"
"].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;oi.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)}); -------------------------------------------------------------------------------- /public/layui/lay/modules/laytpl.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)}); -------------------------------------------------------------------------------- /public/layui/lay/modules/rate.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var a=layui.jquery,i={config:{},index:layui.rate?layui.rate.index+1e4:0,set:function(e){var i=this;return i.config=a.extend({},i.config,e),i},on:function(e,a){return layui.onevent.call(this,n,e,a)}},l=function(){var e=this,a=e.config;return{setvalue:function(a){e.setvalue.call(e,a)},config:a}},n="rate",t="layui-rate",o="layui-icon-rate",s="layui-icon-rate-solid",u="layui-icon-rate-half",r="layui-icon-rate-solid layui-icon-rate-half",c="layui-icon-rate-solid layui-icon-rate",f="layui-icon-rate layui-icon-rate-half",v=function(e){var l=this;l.index=++i.index,l.config=a.extend({},l.config,i.config,e),l.render()};v.prototype.config={length:5,text:!1,readonly:!1,half:!1,value:0,theme:""},v.prototype.render=function(){var e=this,i=e.config,l=i.theme?'style="color: '+i.theme+';"':"";i.elem=a(i.elem),parseInt(i.value)!==i.value&&(i.half||(i.value=Math.ceil(i.value)-i.value<.5?Math.ceil(i.value):Math.floor(i.value)));for(var n='
    ",u=1;u<=i.length;u++){var r='
  • ";i.half&&parseInt(i.value)!==i.value&&u==Math.ceil(i.value)?n=n+'
  • ":n+=r}n+="
"+(i.text?''+i.value+"星":"")+"";var c=i.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),i.span=e.elemTemp.next("span"),i.setText&&i.setText(i.value),c.html(e.elemTemp),c.addClass("layui-inline"),i.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,i=a.config;i.value=e,a.render()},v.prototype.action=function(){var e=this,i=e.config,l=e.elemTemp,n=l.find("i").width();l.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(i.value=t,i.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(i.value=i.value-.5)}i.text&&l.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),v.on("mousemove",function(e){if(l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+t+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(u).removeClass(s)}}),v.on("mouseleave",function(){l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+Math.floor(i.value)+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half&&parseInt(i.value)!==i.value&&l.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(u).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},i.render=function(e){var a=new v(e);return l.call(a)},e(n,i)}); -------------------------------------------------------------------------------- /public/layui/lay/modules/util.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var t=layui.$,i={fixbar:function(e){var i,n,a="layui-fixbar",o="layui-fixbar-top",r=t(document),l=t("body");e=t.extend({showHeight:200},e),e.bar1=e.bar1===!0?"":e.bar1,e.bar2=e.bar2===!0?"":e.bar2,e.bgcolor=e.bgcolor?"background-color:"+e.bgcolor:"";var c=[e.bar1,e.bar2,""],u=t(['
    ',e.bar1?'
  • '+c[0]+"
  • ":"",e.bar2?'
  • '+c[1]+"
  • ":"",'
  • '+c[2]+"
  • ","
"].join("")),g=u.find("."+o),s=function(){var t=r.scrollTop();t>=e.showHeight?i||(g.show(),i=1):i&&(g.hide(),i=0)};t("."+a)[0]||("object"==typeof e.css&&u.css(e.css),l.append(u),s(),u.find("li").on("click",function(){var i=t(this),n=i.attr("lay-type");"top"===n&&t("html,body").animate({scrollTop:0},200),e.click&&e.click.call(this,n)}),r.on("scroll",function(){clearTimeout(n),n=setTimeout(function(){s()},100)}))},countdown:function(e,t,i){var n=this,a="function"==typeof t,o=new Date(e).getTime(),r=new Date(!t||a?(new Date).getTime():t).getTime(),l=o-r,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];a&&(i=t);var u=setTimeout(function(){n.countdown(e,r+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],t,u),l<=0&&clearTimeout(u),u},timeAgo:function(e,t){var i=this,n=[[],[]],a=(new Date).getTime()-new Date(e).getTime();return a>26784e5?(a=new Date(e),n[0][0]=i.digit(a.getFullYear(),4),n[0][1]=i.digit(a.getMonth()+1),n[0][2]=i.digit(a.getDate()),t||(n[1][0]=i.digit(a.getHours()),n[1][1]=i.digit(a.getMinutes()),n[1][2]=i.digit(a.getSeconds())),n[0].join("-")+" "+n[1].join(":")):a>=864e5?(a/1e3/60/60/24|0)+"天前":a>=36e5?(a/1e3/60/60|0)+"小时前":a>=18e4?(a/1e3/60|0)+"分钟前":a<0?"未来":"刚刚"},digit:function(e,t){var i="";e=String(e),t=t||2;for(var n=e.length;n/g,">").replace(/'/g,"'").replace(/"/g,""")},event:function(e,n,a){var o=t("body");return a=a||"click",n=i.event[e]=t.extend(!0,i.event[e],n)||{},i.event.UTIL_EVENT_CALLBACK=i.event.UTIL_EVENT_CALLBACK||{},o.off(a,"*["+e+"]",i.event.UTIL_EVENT_CALLBACK[e]),i.event.UTIL_EVENT_CALLBACK[e]=function(){var i=t(this),a=i.attr(e);"function"==typeof n[a]&&n[a].call(this,i)},o.on(a,"*["+e+"]",i.event.UTIL_EVENT_CALLBACK[e]),n}};!function(e,t,i){"$:nomunge";function n(){a=t[l](function(){o.each(function(){var t=e(this),i=t.width(),n=t.height(),a=e.data(this,u);(i!==a.w||n!==a.h)&&t.trigger(c,[a.w=i,a.h=n])}),n()},r[g])}var a,o=e([]),r=e.resize=e.extend(e.resize,{}),l="setTimeout",c="resize",u=c+"-special-event",g="delay",s="throttleWindow";r[g]=250,r[s]=!0,e.event.special[c]={setup:function(){if(!r[s]&&this[l])return!1;var t=e(this);o=o.add(t),e.data(this,u,{w:t.width(),h:t.height()}),1===o.length&&n()},teardown:function(){if(!r[s]&&this[l])return!1;var t=e(this);o=o.not(t),t.removeData(u),o.length||clearTimeout(a)},add:function(t){function n(t,n,o){var r=e(this),l=e.data(this,u)||{};l.w=n!==i?n:r.width(),l.h=o!==i?o:r.height(),a.apply(this,arguments)}if(!r[s]&&this[l])return!1;var a;return e.isFunction(t)?(a=t,n):(a=t.handler,void(t.handler=n))}}}(t,window),e("util",i)}); -------------------------------------------------------------------------------- /public/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/app.js": "/js/app.js", 3 | "/css/app.css": "/css/app.css" 4 | } 5 | -------------------------------------------------------------------------------- /public/resources/.gitignore: -------------------------------------------------------------------------------- 1 | images 2 | medals 3 | userImgs 4 | files 5 | !.gitignore -------------------------------------------------------------------------------- /public/resources/images/2020-01-31/5e331bb3986ad-1080x1920.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/images/2020-01-31/5e331bb3986ad-1080x1920.jpg -------------------------------------------------------------------------------- /public/resources/images/2020-01-31/5e331bb3986ad-min-200x356.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/images/2020-01-31/5e331bb3986ad-min-200x356.jpg -------------------------------------------------------------------------------- /public/resources/images/2020-01-31/5e33d15d2896e-1200x800.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/images/2020-01-31/5e33d15d2896e-1200x800.jpg -------------------------------------------------------------------------------- /public/resources/images/2020-01-31/5e33d15d2896e-min-200x133.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/images/2020-01-31/5e33d15d2896e-min-200x133.jpg -------------------------------------------------------------------------------- /public/resources/medals/2020_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/2020_01.png -------------------------------------------------------------------------------- /public/resources/medals/2020_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/2020_02.png -------------------------------------------------------------------------------- /public/resources/medals/2020_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/2020_03.png -------------------------------------------------------------------------------- /public/resources/medals/2020_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/2020_04.png -------------------------------------------------------------------------------- /public/resources/medals/2020_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/2020_05.png -------------------------------------------------------------------------------- /public/resources/medals/2020_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/2020_06.png -------------------------------------------------------------------------------- /public/resources/medals/2020_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/2020_07.png -------------------------------------------------------------------------------- /public/resources/medals/2020_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/2020_08.png -------------------------------------------------------------------------------- /public/resources/medals/2020_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/2020_09.png -------------------------------------------------------------------------------- /public/resources/medals/2020_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/2020_10.png -------------------------------------------------------------------------------- /public/resources/medals/2020_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/2020_11.png -------------------------------------------------------------------------------- /public/resources/medals/2020_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/2020_12.png -------------------------------------------------------------------------------- /public/resources/medals/2020_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/2020_a.png -------------------------------------------------------------------------------- /public/resources/medals/2020_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/2020_b.png -------------------------------------------------------------------------------- /public/resources/medals/2020_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/2020_c.png -------------------------------------------------------------------------------- /public/resources/medals/2020_d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/2020_d.png -------------------------------------------------------------------------------- /public/resources/medals/alltroea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/alltroea.png -------------------------------------------------------------------------------- /public/resources/medals/dlmls2020.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/dlmls2020.png -------------------------------------------------------------------------------- /public/resources/medals/jiqin6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/jiqin6.png -------------------------------------------------------------------------------- /public/resources/medals/rank_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/rank_a.png -------------------------------------------------------------------------------- /public/resources/medals/rank_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/rank_b.png -------------------------------------------------------------------------------- /public/resources/medals/rank_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/rank_c.png -------------------------------------------------------------------------------- /public/resources/medals/rank_d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/rank_d.png -------------------------------------------------------------------------------- /public/resources/medals/star_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/star_1.png -------------------------------------------------------------------------------- /public/resources/medals/star_1_act.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/star_1_act.png -------------------------------------------------------------------------------- /public/resources/medals/star_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/star_2.png -------------------------------------------------------------------------------- /public/resources/medals/star_2_act.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/star_2_act.png -------------------------------------------------------------------------------- /public/resources/medals/star_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/star_3.png -------------------------------------------------------------------------------- /public/resources/medals/star_3_act.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/star_3_act.png -------------------------------------------------------------------------------- /public/resources/medals/star_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/star_4.png -------------------------------------------------------------------------------- /public/resources/medals/star_4_act.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/star_4_act.png -------------------------------------------------------------------------------- /public/resources/medals/star_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/star_5.png -------------------------------------------------------------------------------- /public/resources/medals/star_5_act.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/star_5_act.png -------------------------------------------------------------------------------- /public/resources/medals/star_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/star_6.png -------------------------------------------------------------------------------- /public/resources/medals/star_6_act.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/star_6_act.png -------------------------------------------------------------------------------- /public/resources/medals/star_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/star_7.png -------------------------------------------------------------------------------- /public/resources/medals/star_7_act.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/star_7_act.png -------------------------------------------------------------------------------- /public/resources/medals/star_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/star_8.png -------------------------------------------------------------------------------- /public/resources/medals/star_8_act.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/star_8_act.png -------------------------------------------------------------------------------- /public/resources/medals/sukl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chef5/PopRun-b/6e9737a6d7741db5848fac495efa0e330f4f97a8/public/resources/medals/sukl.png -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # 跑鸭 2 | 3 | 这是我的毕业设计:“跑鸭”微信小程序-一款基于校园跑步的社交小程序 4 | 技术栈:Laravel+MySQL 5 | 6 | **环境:PHP:7.2~8.0、Laravel: 6.x** 7 | 8 | 如果你是PHP:8.1+,可以切到分支 [php-8.1](https://github.com/Chef5/PopRun-b/tree/php-8.1) 使用,该分支用的`Laravel9` 9 | 10 | - 前端项目:https://github.com/Chef5/PopRun 11 | 12 | ## 一、功能设计 13 | 14 | “跑鸭”微信小程序的核心功能就是:跑步+社交+活动,详细划分如下: 15 | 16 | (1)跑步(首屏):当前位置地图、排行榜(周榜、月榜)、运动路径、实时数据(里程、配速)、随机一言。 17 | 18 | (2)动态圈子:打卡分享、发布分享、热门推荐、点赞评论、消息通知。 19 | 20 | (3)活动广场:线上活动(报名、完赛条件、奖励)、跑步教程。 21 | 22 | (4)个人中心:运动管理、动态管理、设置(通用设置、隐私设置)、勋章墙、等级称号、个人主页、资料编辑。 23 | 24 | **E-R图:** 25 | 26 | 根据功能分析,一共规划出11个实体,形成E-R图: 27 | ![20200618185938.jpeg](http://img.cdn.1zdz.cn/github/readme/poprun/20200618185938.jpeg) 28 | 29 | **数据模型图:** 30 | 31 | 由E-R图,共转换成16张表,数据模型图由Navicat导出 32 | ![20200618191037.jpeg](http://img.cdn.1zdz.cn/github/readme/poprun/20200618191037.jpeg) 33 | 34 | - 接口文档:待整理。 35 | 36 | **目录结构:** 37 | 38 | ``` shell 39 | ├─.vscode #VS Code配置 40 | ├─app #app目录 41 | │ ├─Console #【核心】控制台:定时任务 42 | │ │ └─Commands #命令:定时任务要执行的操作 43 | │ ├─Exceptions #异常抛出类 44 | │ ├─Http #Http控制 45 | │ │ ├─Controllers #【核心】控制器 46 | │ │ │ └─Auth #控制器里进行分类:认证 47 | │ │ └─Middleware #中间件:过滤请求和响应 48 | │ ├─Lib #公共方法:主要写了一个返回参数格式化 49 | │ └─Providers 50 | ├─config #配置文件:主要改了数据库编码配置,支持emoji 51 | ├─database #数据库 52 | │ ├─factories 53 | │ ├─migrations #【核心】数据库迭代生成 54 | │ └─seeds 55 | ├─public #公共资源 56 | │ ├─css 57 | │ ├─js 58 | │ ├─layui #layui引入 59 | │ └─resources #资源 60 | │ ├─images #图片 61 | │ │ ├─2020-01-31 #图片按上传日期分目录管理 62 | │ ├─medals #勋章图片 63 | │ └─userImgs #用户头像 64 | ├─resources 65 | ├─routes #【核心】路由 66 | ├─storage 67 | ├─tests 68 | └─vendor #Laravel依赖 69 | ``` 70 | 71 | ## 二、如何使用 72 | 73 | 要求: 74 | PHP: 7.2~8.0 75 | MySQL: 随便 76 | 77 | > 如果你是PHP:8.1+,使用分支 [php-8.1](https://github.com/Chef5/PopRun-b/tree/php-8.1) 的代码 78 | 79 | **以下步骤一步一步弄,顺序不能乱,通常是能一次性运行起来的!** 80 | 81 | ### 2.1 克隆代码到本地 82 | 83 | ``` shell 84 | git clone https://github.com/Chef5/PopRun-b.git 85 | ``` 86 | 87 | ### 2.2 创建数据库 88 | 89 | 在本地MySQL创建一个数据库,假定数据库名称设置为:`poprun` 90 | 91 | 字符集:utf8mb4 92 | 排序规则:utf8mb4_unicode_ci 93 | 94 | ### 2.3 配置.env 95 | 96 | - 将.env.example更名改为.env 97 | - 设置必要的参数(以下中文部分) 98 | 99 | ``` shell 100 | WX_APPID=微信AppID(小程序ID) 101 | WX_SECRET=微信小程序AppSecret(小程序密钥) 102 | 103 | DB_CONNECTION=mysql 104 | DB_HOST=127.0.0.1 105 | DB_PORT=3306 106 | DB_DATABASE=数据库名称(前面步骤创建的) 107 | DB_USERNAME=数据库用户 108 | DB_PASSWORD=数据库密码 109 | ``` 110 | 111 | ### 2.4 安装依赖、生成key和数据库 112 | 113 | 在根目录执行: 114 | 115 | ``` shell 116 | composer install 117 | php artisan key:generate 118 | php artisan migrate 119 | ``` 120 | 121 | Q: composer install 如果遇到类似这样的报错: 122 | 123 | ``` sh 124 | In PackageManifest.php line 131: 125 | Undefined index: name 126 | 127 | Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1 128 | ``` 129 | 130 | A: 可尝试以下命令: 131 | 132 | ``` sh 133 | composer clear 134 | composer update --ignore-platform-req=ext-sockets 135 | ``` 136 | 137 | ### 2.5 启动运行 138 | 139 | ``` shell 140 | php artisan serve 141 | ``` 142 | 143 | 浏览器能正常打开:http://127.0.0.1:8000/ ,说明你已经成功运行起来了,接下来还要初始一点数据,继续! 144 | 145 | ### 2.6 初始化数据 146 | 147 | 完成以上步骤,在本地浏览器中打开以下链接进行数据初始化 148 | 149 | 初始化数据位置,可以自己修改:`app/Http/Controllers/AdminController.php` 150 | 151 | - 初始化用户等级数据:http://127.0.0.1:8000/api/admin/initData?key=123123&data=honors 152 | - 初始化勋章数据:http://127.0.0.1:8000/api/admin/initData?key=123123&data=medals 153 | 154 | 155 | ### 2.7 创建活动和教程 156 | 157 | 管理密码:123123 158 | 159 | - 创建活动:http://127.0.0.1:8000/addActivity (勋章图片和检索串、勋章名称一一对应,且检索串、勋章名称不能和之前已有值的重复) 160 | 161 | - 创建课程:http://127.0.0.1:8000/addCourse 162 | 163 | Q: 上传出错 164 | A: 请检查是否启动了本地项目 `php artisan serve` 165 | 166 | ### 2.8 其他注意事项 167 | 168 | 注意,本项目是20年我那会大四做的,当时技术有限,或多或少都留下了不少的坑,如果需要自用,请不要喷我哈。 169 | 170 | 本人于2023年2月,根据本文档重新跑了一遍,纠正了一些坑,项目能顺利跑起来,并备注了一些注意事项,可以全局搜索:`// TODO:` 查看。 171 | 172 | ## LICENSE 173 | 174 | [MIT](LICENSE) 175 | -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | /** 2 | * First we will load all of this project's JavaScript dependencies which 3 | * includes Vue and other libraries. It is a great starting point when 4 | * building robust, powerful web applications using Vue and Laravel. 5 | */ 6 | 7 | require('./bootstrap'); 8 | 9 | window.Vue = require('vue'); 10 | 11 | /** 12 | * The following block of code may be used to automatically register your 13 | * Vue components. It will recursively scan this directory for the Vue 14 | * components and automatically register them with their "basename". 15 | * 16 | * Eg. ./components/ExampleComponent.vue -> 17 | */ 18 | 19 | // const files = require.context('./', true, /\.vue$/i) 20 | // files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default)) 21 | 22 | Vue.component('example-component', require('./components/ExampleComponent.vue').default); 23 | 24 | /** 25 | * Next, we will create a fresh Vue application instance and attach it to 26 | * the page. Then, you may begin adding components to this application 27 | * or customize the JavaScript scaffolding to fit your unique needs. 28 | */ 29 | 30 | const app = new Vue({ 31 | el: '#app', 32 | }); 33 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | window._ = require('lodash'); 2 | 3 | /** 4 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support 5 | * for JavaScript based Bootstrap features such as modals and tabs. This 6 | * code may be modified to fit the specific needs of your application. 7 | */ 8 | 9 | try { 10 | window.Popper = require('popper.js').default; 11 | window.$ = window.jQuery = require('jquery'); 12 | 13 | require('bootstrap'); 14 | } catch (e) {} 15 | 16 | /** 17 | * We'll load the axios HTTP library which allows us to easily issue requests 18 | * to our Laravel back-end. This library automatically handles sending the 19 | * CSRF token as a header based on the value of the "XSRF" token cookie. 20 | */ 21 | 22 | window.axios = require('axios'); 23 | 24 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 25 | 26 | /** 27 | * Echo exposes an expressive API for subscribing to channels and listening 28 | * for events that are broadcast by Laravel. Echo and event broadcasting 29 | * allows your team to easily build robust real-time web applications. 30 | */ 31 | 32 | // import Echo from 'laravel-echo'; 33 | 34 | // window.Pusher = require('pusher-js'); 35 | 36 | // window.Echo = new Echo({ 37 | // broadcaster: 'pusher', 38 | // key: process.env.MIX_PUSHER_APP_KEY, 39 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER, 40 | // encrypted: true 41 | // }); 42 | -------------------------------------------------------------------------------- /resources/js/components/ExampleComponent.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 24 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Your password has been reset!', 17 | 'sent' => 'We have e-mailed your password reset link!', 18 | 'token' => 'This password reset token is invalid.', 19 | 'user' => "We can't find a user with that e-mail address.", 20 | 21 | ]; 22 | -------------------------------------------------------------------------------- /resources/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | // Body 2 | $body-bg: #f8fafc; 3 | 4 | // Typography 5 | $font-family-sans-serif: 'Nunito', sans-serif; 6 | $font-size-base: 0.9rem; 7 | $line-height-base: 1.6; 8 | 9 | // Colors 10 | $blue: #3490dc; 11 | $indigo: #6574cd; 12 | $purple: #9561e2; 13 | $pink: #f66d9b; 14 | $red: #e3342f; 15 | $orange: #f6993f; 16 | $yellow: #ffed4a; 17 | $green: #38c172; 18 | $teal: #4dc0b5; 19 | $cyan: #6cb2eb; 20 | -------------------------------------------------------------------------------- /resources/sass/app.scss: -------------------------------------------------------------------------------- 1 | // Fonts 2 | @import url('https://fonts.googleapis.com/css?family=Nunito'); 3 | 4 | // Variables 5 | @import 'variables'; 6 | 7 | // Bootstrap 8 | @import '~bootstrap/scss/bootstrap'; 9 | -------------------------------------------------------------------------------- /resources/views/addCourse.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Pop Run! 跑鸭!创建课程 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 24 | 32 | 33 | 34 | 35 |
36 |
37 |
38 | 41 |
42 | 43 |
44 |
45 |
46 | 49 |
50 | 51 |
52 |
53 | 54 |
55 | 56 |
57 | 58 |

59 |
60 |
61 | 62 |
63 | 65 | 68 |
69 |
70 |
71 | 72 | 131 | 132 | 133 | -------------------------------------------------------------------------------- /resources/views/auth/login.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Login') }}
9 | 10 |
11 |
12 | @csrf 13 | 14 |
15 | 16 | 17 |
18 | 19 | 20 | @error('email') 21 | 22 | {{ $message }} 23 | 24 | @enderror 25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 | 33 | 34 | @error('password') 35 | 36 | {{ $message }} 37 | 38 | @enderror 39 |
40 |
41 | 42 |
43 |
44 |
45 | 46 | 47 | 50 |
51 |
52 |
53 | 54 |
55 |
56 | 59 | 60 | @if (Route::has('password.request')) 61 | 62 | {{ __('Forgot Your Password?') }} 63 | 64 | @endif 65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | @endsection 74 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/confirm.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Confirm Password') }}
9 | 10 |
11 | {{ __('Please confirm your password before continuing.') }} 12 | 13 |
14 | @csrf 15 | 16 |
17 | 18 | 19 |
20 | 21 | 22 | @error('password') 23 | 24 | {{ $message }} 25 | 26 | @enderror 27 |
28 |
29 | 30 |
31 |
32 | 35 | 36 | @if (Route::has('password.request')) 37 | 38 | {{ __('Forgot Your Password?') }} 39 | 40 | @endif 41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | @endsection 50 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/email.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Reset Password') }}
9 | 10 |
11 | @if (session('status')) 12 | 15 | @endif 16 | 17 |
18 | @csrf 19 | 20 |
21 | 22 | 23 |
24 | 25 | 26 | @error('email') 27 | 28 | {{ $message }} 29 | 30 | @enderror 31 |
32 |
33 | 34 |
35 |
36 | 39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | @endsection 48 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/reset.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Reset Password') }}
9 | 10 |
11 |
12 | @csrf 13 | 14 | 15 | 16 |
17 | 18 | 19 |
20 | 21 | 22 | @error('email') 23 | 24 | {{ $message }} 25 | 26 | @enderror 27 |
28 |
29 | 30 |
31 | 32 | 33 |
34 | 35 | 36 | @error('password') 37 | 38 | {{ $message }} 39 | 40 | @enderror 41 |
42 |
43 | 44 |
45 | 46 | 47 |
48 | 49 |
50 |
51 | 52 |
53 |
54 | 57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | @endsection 66 | -------------------------------------------------------------------------------- /resources/views/auth/register.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Register') }}
9 | 10 |
11 |
12 | @csrf 13 | 14 |
15 | 16 | 17 |
18 | 19 | 20 | @error('name') 21 | 22 | {{ $message }} 23 | 24 | @enderror 25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 | 33 | 34 | @error('email') 35 | 36 | {{ $message }} 37 | 38 | @enderror 39 |
40 |
41 | 42 |
43 | 44 | 45 |
46 | 47 | 48 | @error('password') 49 | 50 | {{ $message }} 51 | 52 | @enderror 53 |
54 |
55 | 56 |
57 | 58 | 59 |
60 | 61 |
62 |
63 | 64 |
65 |
66 | 69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | @endsection 78 | -------------------------------------------------------------------------------- /resources/views/auth/verify.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Verify Your Email Address') }}
9 | 10 |
11 | @if (session('resent')) 12 | 15 | @endif 16 | 17 | {{ __('Before proceeding, please check your email for a verification link.') }} 18 | {{ __('If you did not receive the email') }}, 19 |
20 | @csrf 21 | . 22 |
23 |
24 |
25 |
26 |
27 |
28 | @endsection 29 | -------------------------------------------------------------------------------- /resources/views/home.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Dashboard
9 | 10 |
11 | @if (session('status')) 12 | 15 | @endif 16 | 17 | You are logged in! 18 |
19 |
20 |
21 |
22 |
23 | @endsection 24 | -------------------------------------------------------------------------------- /resources/views/layouts/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {{ config('app.name', 'Laravel') }} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 74 | 75 |
76 | @yield('content') 77 |
78 |
79 | 80 | 81 | -------------------------------------------------------------------------------- /resources/views/welcome.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Pop Run! 跑鸭! 8 | 9 | 10 | 11 | 12 | 13 | 65 | 66 | 67 |
68 |
69 |
70 | Pop Run ! 71 |
72 | 75 | 79 |
80 |
81 | 82 | 83 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 16 | }); 17 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 18 | })->describe('Display an inspiring quote'); 19 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | config.php 2 | routes.php 3 | schedule-* 4 | compiled.php 5 | services.json 6 | events.scanned.php 7 | routes.scanned.php 8 | down 9 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/bootstrap.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class))->bootstrap(); 26 | 27 | foreach ($commands as $command) { 28 | $console->call($command); 29 | } 30 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel application. By default, we are compiling the Sass 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix.js('resources/js/app.js', 'public/js') 15 | .sass('resources/sass/app.scss', 'public/css'); 16 | --------------------------------------------------------------------------------