wesmiler пре 2 година
родитељ
комит
738f4bffe1

+ 0 - 0
resources/css/app.css


+ 1 - 0
resources/js/app.js

@@ -0,0 +1 @@
+require('./bootstrap');

+ 28 - 0
resources/js/bootstrap.js

@@ -0,0 +1,28 @@
+window._ = require('lodash');
+
+/**
+ * We'll load the axios HTTP library which allows us to easily issue requests
+ * to our Laravel back-end. This library automatically handles sending the
+ * CSRF token as a header based on the value of the "XSRF" token cookie.
+ */
+
+window.axios = require('axios');
+
+window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
+
+/**
+ * Echo exposes an expressive API for subscribing to channels and listening
+ * for events that are broadcast by Laravel. Echo and event broadcasting
+ * allows your team to easily build robust real-time web applications.
+ */
+
+// import Echo from 'laravel-echo';
+
+// window.Pusher = require('pusher-js');
+
+// window.Echo = new Echo({
+//     broadcaster: 'pusher',
+//     key: process.env.MIX_PUSHER_APP_KEY,
+//     cluster: process.env.MIX_PUSHER_APP_CLUSTER,
+//     forceTLS: true
+// });

+ 28 - 0
resources/lang/en/api.php

@@ -0,0 +1,28 @@
+<?php
+
+return [
+    '1002'=> 'success',
+    '1003'=> 'failed',
+    '1004'=> 'not login',
+    '1005'=> 'Illegal access',
+    '1006'=> 'Illegal operation',
+    '1007'=> 'Save failed',
+    '1008'=> 'Saved successfully',
+    '1009'=> 'not data',
+    '1010'=> 'Data obtained',
+
+    // 登录注册
+    '2001'=> 'Illegal or nonexistent account',
+    '2002'=> 'Login password error',
+    '2003'=> 'Login failed',
+    '2004'=> 'Login successful',
+    '2005'=> 'Registered account has been used',
+    '2006'=> 'Incorrect verification code',
+    '2007'=> 'Account registration failed',
+    '2008'=> 'Account registration succeeded',
+
+    // 语言设置
+    '2101'=> 'Language parameter error',
+    '2102'=> 'Switch language succeeded',
+    '2103'=> 'Failed to switch languages',
+];

+ 19 - 0
resources/lang/en/auth.php

@@ -0,0 +1,19 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Authentication Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines are used during authentication for various
+    | messages that we need to display to the user. You are free to modify
+    | these language lines according to your application's requirements.
+    |
+    */
+
+    'failed' => 'These credentials do not match our records.',
+    'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
+
+];

+ 19 - 0
resources/lang/en/pagination.php

@@ -0,0 +1,19 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Pagination Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines are used by the paginator library to build
+    | the simple pagination links. You are free to change them to anything
+    | you want to customize your views to better match your application.
+    |
+    */
+
+    'previous' => '&laquo; Previous',
+    'next' => 'Next &raquo;',
+
+];

+ 22 - 0
resources/lang/en/passwords.php

@@ -0,0 +1,22 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Password Reset Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines are the default lines which match reasons
+    | that are given by the password broker for a password update attempt
+    | has failed, such as for an invalid token or invalid new password.
+    |
+    */
+
+    'reset' => 'Your password has been reset!',
+    'sent' => 'We have emailed your password reset link!',
+    'throttled' => 'Please wait before retrying.',
+    'token' => 'This password reset token is invalid.',
+    'user' => "We can't find a user with that email address.",
+
+];

+ 152 - 0
resources/lang/en/validation.php

@@ -0,0 +1,152 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Validation Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines contain the default error messages used by
+    | the validator class. Some of these rules have multiple versions such
+    | as the size rules. Feel free to tweak each of these messages here.
+    |
+    */
+
+    'accepted' => 'The :attribute must be accepted.',
+    'active_url' => 'The :attribute is not a valid URL.',
+    'after' => 'The :attribute must be a date after :date.',
+    'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
+    'alpha' => 'The :attribute may only contain letters.',
+    'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.',
+    'alpha_num' => 'The :attribute may only contain letters and numbers.',
+    'array' => 'The :attribute must be an array.',
+    'before' => 'The :attribute must be a date before :date.',
+    'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
+    'between' => [
+        'numeric' => 'The :attribute must be between :min and :max.',
+        'file' => 'The :attribute must be between :min and :max kilobytes.',
+        'string' => 'The :attribute must be between :min and :max characters.',
+        'array' => 'The :attribute must have between :min and :max items.',
+    ],
+    'boolean' => 'The :attribute field must be true or false.',
+    'confirmed' => 'The :attribute confirmation does not match.',
+    'date' => 'The :attribute is not a valid date.',
+    'date_equals' => 'The :attribute must be a date equal to :date.',
+    'date_format' => 'The :attribute does not match the format :format.',
+    'different' => 'The :attribute and :other must be different.',
+    'digits' => 'The :attribute must be :digits digits.',
+    'digits_between' => 'The :attribute must be between :min and :max digits.',
+    'dimensions' => 'The :attribute has invalid image dimensions.',
+    'distinct' => 'The :attribute field has a duplicate value.',
+    'email' => 'The :attribute must be a valid email address.',
+    'ends_with' => 'The :attribute must end with one of the following: :values.',
+    'exists' => 'The selected :attribute is invalid.',
+    'file' => 'The :attribute must be a file.',
+    'filled' => 'The :attribute field must have a value.',
+    'gt' => [
+        'numeric' => 'The :attribute must be greater than :value.',
+        'file' => 'The :attribute must be greater than :value kilobytes.',
+        'string' => 'The :attribute must be greater than :value characters.',
+        'array' => 'The :attribute must have more than :value items.',
+    ],
+    'gte' => [
+        'numeric' => 'The :attribute must be greater than or equal :value.',
+        'file' => 'The :attribute must be greater than or equal :value kilobytes.',
+        'string' => 'The :attribute must be greater than or equal :value characters.',
+        'array' => 'The :attribute must have :value items or more.',
+    ],
+    'image' => 'The :attribute must be an image.',
+    'in' => 'The selected :attribute is invalid.',
+    'in_array' => 'The :attribute field does not exist in :other.',
+    'integer' => 'The :attribute must be an integer.',
+    'ip' => 'The :attribute must be a valid IP address.',
+    'ipv4' => 'The :attribute must be a valid IPv4 address.',
+    'ipv6' => 'The :attribute must be a valid IPv6 address.',
+    'json' => 'The :attribute must be a valid JSON string.',
+    'lt' => [
+        'numeric' => 'The :attribute must be less than :value.',
+        'file' => 'The :attribute must be less than :value kilobytes.',
+        'string' => 'The :attribute must be less than :value characters.',
+        'array' => 'The :attribute must have less than :value items.',
+    ],
+    'lte' => [
+        'numeric' => 'The :attribute must be less than or equal :value.',
+        'file' => 'The :attribute must be less than or equal :value kilobytes.',
+        'string' => 'The :attribute must be less than or equal :value characters.',
+        'array' => 'The :attribute must not have more than :value items.',
+    ],
+    'max' => [
+        'numeric' => 'The :attribute may not be greater than :max.',
+        'file' => 'The :attribute may not be greater than :max kilobytes.',
+        'string' => 'The :attribute may not be greater than :max characters.',
+        'array' => 'The :attribute may not have more than :max items.',
+    ],
+    'mimes' => 'The :attribute must be a file of type: :values.',
+    'mimetypes' => 'The :attribute must be a file of type: :values.',
+    'min' => [
+        'numeric' => 'The :attribute must be at least :min.',
+        'file' => 'The :attribute must be at least :min kilobytes.',
+        'string' => 'The :attribute must be at least :min characters.',
+        'array' => 'The :attribute must have at least :min items.',
+    ],
+    'multiple_of' => 'The :attribute must be a multiple of :value',
+    'not_in' => 'The selected :attribute is invalid.',
+    'not_regex' => 'The :attribute format is invalid.',
+    'numeric' => 'The :attribute must be a number.',
+    'password' => 'The password is incorrect.',
+    'present' => 'The :attribute field must be present.',
+    'regex' => 'The :attribute format is invalid.',
+    'required' => 'The :attribute field is required.',
+    'required_if' => 'The :attribute field is required when :other is :value.',
+    'required_unless' => 'The :attribute field is required unless :other is in :values.',
+    'required_with' => 'The :attribute field is required when :values is present.',
+    'required_with_all' => 'The :attribute field is required when :values are present.',
+    'required_without' => 'The :attribute field is required when :values is not present.',
+    'required_without_all' => 'The :attribute field is required when none of :values are present.',
+    'same' => 'The :attribute and :other must match.',
+    'size' => [
+        'numeric' => 'The :attribute must be :size.',
+        'file' => 'The :attribute must be :size kilobytes.',
+        'string' => 'The :attribute must be :size characters.',
+        'array' => 'The :attribute must contain :size items.',
+    ],
+    'starts_with' => 'The :attribute must start with one of the following: :values.',
+    'string' => 'The :attribute must be a string.',
+    'timezone' => 'The :attribute must be a valid zone.',
+    'unique' => 'The :attribute has already been taken.',
+    'uploaded' => 'The :attribute failed to upload.',
+    'url' => 'The :attribute format is invalid.',
+    'uuid' => 'The :attribute must be a valid UUID.',
+
+    /*
+    |--------------------------------------------------------------------------
+    | Custom Validation Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | Here you may specify custom validation messages for attributes using the
+    | convention "attribute.rule" to name the lines. This makes it quick to
+    | specify a specific custom language line for a given attribute rule.
+    |
+    */
+
+    'custom' => [
+        'attribute-name' => [
+            'rule-name' => 'custom-message',
+        ],
+    ],
+
+    /*
+    |--------------------------------------------------------------------------
+    | Custom Validation Attributes
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines are used to swap our attribute placeholder
+    | with something more reader friendly such as "E-Mail Address" instead
+    | of "email". This simply helps us make our message more expressive.
+    |
+    */
+
+    'attributes' => [],
+
+];

+ 78 - 0
resources/lang/zh-cn/api.php

@@ -0,0 +1,78 @@
+<?php
+
+return [
+    '1002'=> '操作成功',
+    '1003'=> '操作失败',
+    '1004'=> '未授权',
+    '1005'=> '签名错误',
+    '1006'=> '非法操作',
+    '1007'=> '保存失败',
+    '1008'=> '保存成功',
+    '1009'=> '获取失败',
+    '1010'=> '获取成功',
+    '1011'=> '验证码发送成功',
+    '1012'=> '请求超时',
+    '1013'=> '修改成功',
+    '1014'=> '修改失败',
+    '1015'=> '已经更新过',
+    '1016'=> '更新失败',
+    '1017'=> '更新成功',
+    '1018'=> '请求失败,服务器错误',
+    '1019'=> '设置成功',
+    '1020'=> '设置失败',
+    '1021'=> '参数类型错误',
+    '1022'=> '参数值错误',
+    '1023' => '发布成功',
+    '1024' => '发布失败',
+    '1025' => '删除成功',
+    '1026' => '删除失败',
+    '1027' => '添加成功',
+    '1028' => '添加失败',
+    '1029' => '余额不足,请先充值',
+    '1030' => '支付方式不支持',
+    '1031' => '类型错误',
+    '1032' => '单页文章ID未配置',
+    '1033' => '请选择操作数据',
+    '1034' => '请不要频繁操作,稍后再试',
+
+
+
+    // 登录注册
+    '2001'=> '账号非法或不存在',
+    '2002'=> '登录密码错误',
+    '2003'=> '登录失败',
+    '2004'=> '登录成功',
+    '2005'=> '账号已被使用',
+    '2006'=> '验证码不正确',
+    '2007'=> '注册失败',
+    '2008'=> '注册成功',
+    '2009'=> '手机号码已被使用',
+    '2010'=> '短信验证码发送失败',
+    '2011'=> '短信验证码发送频繁,请60秒后重试',
+    '2012'=> '短信验证码已失效',
+    '2013'=> '短信验证码错误',
+    '2014'=> '缺少参数',
+    '2015'=> '账号已被冻结,请联系客服',
+    '2016'=> '微信授权失败',
+    '2017'=> '账号或已被冻结,请稍后再试或联系客服',
+    '2018'=> '商户账号不可用,请联系客服',
+    '2019'=> '短信接口参数未配置',
+    '2020'=> '短信验证码发送成功',
+    '2021'=> '短信验证码发送失败',
+    '2022'=> '注册成功,请下载并安装APP后登录使用',
+    '2023'=> '您已注册,请下载并安装APP后登录使用',
+    '2024'=> '您的账号或已被冻结,请联系客服',
+    '2025'=> '收款账号不存在或已被冻结,请联系客服',
+    '2026'=> '您到账号余额不足,请先充值或刷新后重试',
+    '2027'=> '您到商户余额不足,请先充值或刷新后重试',
+    '2028'=> '账户处理失败,请刷新后重试',
+    '2029'=> '账户明细处理失败,请刷新后重试',
+    '2030'=> '转账成功',
+    '2031'=> '请先选择或填写充值金额',
+    '2032'=> '请先选择充值支付方式',
+    '2033'=> '充值订单提交失败',
+    '2034'=> '充值订单提交成功,调起支付',
+
+
+
+];

+ 19 - 0
resources/lang/zh-cn/auth.php

@@ -0,0 +1,19 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Authentication Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines are used during authentication for various
+    | messages that we need to display to the user. You are free to modify
+    | these language lines according to your application's requirements.
+    |
+    */
+
+    'failed' => 'These credentials do not match our records.',
+    'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
+
+];

+ 19 - 0
resources/lang/zh-cn/pagination.php

@@ -0,0 +1,19 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Pagination Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines are used by the paginator library to build
+    | the simple pagination links. You are free to change them to anything
+    | you want to customize your views to better match your application.
+    |
+    */
+
+    'previous' => '&laquo; Previous',
+    'next' => 'Next &raquo;',
+
+];

+ 22 - 0
resources/lang/zh-cn/passwords.php

@@ -0,0 +1,22 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Password Reset Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines are the default lines which match reasons
+    | that are given by the password broker for a password update attempt
+    | has failed, such as for an invalid token or invalid new password.
+    |
+    */
+
+    'reset' => 'Your password has been reset!',
+    'sent' => 'We have emailed your password reset link!',
+    'throttled' => 'Please wait before retrying.',
+    'token' => 'This password reset token is invalid.',
+    'user' => "We can't find a user with that email address.",
+
+];

+ 152 - 0
resources/lang/zh-cn/validation.php

@@ -0,0 +1,152 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Validation Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines contain the default error messages used by
+    | the validator class. Some of these rules have multiple versions such
+    | as the size rules. Feel free to tweak each of these messages here.
+    |
+    */
+
+    'accepted' => 'The :attribute must be accepted.',
+    'active_url' => 'The :attribute is not a valid URL.',
+    'after' => 'The :attribute must be a date after :date.',
+    'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
+    'alpha' => 'The :attribute may only contain letters.',
+    'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.',
+    'alpha_num' => 'The :attribute may only contain letters and numbers.',
+    'array' => 'The :attribute must be an array.',
+    'before' => 'The :attribute must be a date before :date.',
+    'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
+    'between' => [
+        'numeric' => 'The :attribute must be between :min and :max.',
+        'file' => 'The :attribute must be between :min and :max kilobytes.',
+        'string' => 'The :attribute must be between :min and :max characters.',
+        'array' => 'The :attribute must have between :min and :max items.',
+    ],
+    'boolean' => 'The :attribute field must be true or false.',
+    'confirmed' => 'The :attribute confirmation does not match.',
+    'date' => 'The :attribute is not a valid date.',
+    'date_equals' => 'The :attribute must be a date equal to :date.',
+    'date_format' => 'The :attribute does not match the format :format.',
+    'different' => 'The :attribute and :other must be different.',
+    'digits' => 'The :attribute must be :digits digits.',
+    'digits_between' => 'The :attribute must be between :min and :max digits.',
+    'dimensions' => 'The :attribute has invalid image dimensions.',
+    'distinct' => 'The :attribute field has a duplicate value.',
+    'email' => 'The :attribute must be a valid email address.',
+    'ends_with' => 'The :attribute must end with one of the following: :values.',
+    'exists' => 'The selected :attribute is invalid.',
+    'file' => 'The :attribute must be a file.',
+    'filled' => 'The :attribute field must have a value.',
+    'gt' => [
+        'numeric' => 'The :attribute must be greater than :value.',
+        'file' => 'The :attribute must be greater than :value kilobytes.',
+        'string' => 'The :attribute must be greater than :value characters.',
+        'array' => 'The :attribute must have more than :value items.',
+    ],
+    'gte' => [
+        'numeric' => 'The :attribute must be greater than or equal :value.',
+        'file' => 'The :attribute must be greater than or equal :value kilobytes.',
+        'string' => 'The :attribute must be greater than or equal :value characters.',
+        'array' => 'The :attribute must have :value items or more.',
+    ],
+    'image' => 'The :attribute must be an image.',
+    'in' => 'The selected :attribute is invalid.',
+    'in_array' => 'The :attribute field does not exist in :other.',
+    'integer' => 'The :attribute must be an integer.',
+    'ip' => 'The :attribute must be a valid IP address.',
+    'ipv4' => 'The :attribute must be a valid IPv4 address.',
+    'ipv6' => 'The :attribute must be a valid IPv6 address.',
+    'json' => 'The :attribute must be a valid JSON string.',
+    'lt' => [
+        'numeric' => 'The :attribute must be less than :value.',
+        'file' => 'The :attribute must be less than :value kilobytes.',
+        'string' => 'The :attribute must be less than :value characters.',
+        'array' => 'The :attribute must have less than :value items.',
+    ],
+    'lte' => [
+        'numeric' => 'The :attribute must be less than or equal :value.',
+        'file' => 'The :attribute must be less than or equal :value kilobytes.',
+        'string' => 'The :attribute must be less than or equal :value characters.',
+        'array' => 'The :attribute must not have more than :value items.',
+    ],
+    'max' => [
+        'numeric' => 'The :attribute may not be greater than :max.',
+        'file' => 'The :attribute may not be greater than :max kilobytes.',
+        'string' => 'The :attribute may not be greater than :max characters.',
+        'array' => 'The :attribute may not have more than :max items.',
+    ],
+    'mimes' => 'The :attribute must be a file of type: :values.',
+    'mimetypes' => 'The :attribute must be a file of type: :values.',
+    'min' => [
+        'numeric' => 'The :attribute must be at least :min.',
+        'file' => 'The :attribute must be at least :min kilobytes.',
+        'string' => 'The :attribute must be at least :min characters.',
+        'array' => 'The :attribute must have at least :min items.',
+    ],
+    'multiple_of' => 'The :attribute must be a multiple of :value',
+    'not_in' => 'The selected :attribute is invalid.',
+    'not_regex' => 'The :attribute format is invalid.',
+    'numeric' => 'The :attribute must be a number.',
+    'password' => 'The password is incorrect.',
+    'present' => 'The :attribute field must be present.',
+    'regex' => 'The :attribute format is invalid.',
+    'required' => 'The :attribute field is required.',
+    'required_if' => 'The :attribute field is required when :other is :value.',
+    'required_unless' => 'The :attribute field is required unless :other is in :values.',
+    'required_with' => 'The :attribute field is required when :values is present.',
+    'required_with_all' => 'The :attribute field is required when :values are present.',
+    'required_without' => 'The :attribute field is required when :values is not present.',
+    'required_without_all' => 'The :attribute field is required when none of :values are present.',
+    'same' => 'The :attribute and :other must match.',
+    'size' => [
+        'numeric' => 'The :attribute must be :size.',
+        'file' => 'The :attribute must be :size kilobytes.',
+        'string' => 'The :attribute must be :size characters.',
+        'array' => 'The :attribute must contain :size items.',
+    ],
+    'starts_with' => 'The :attribute must start with one of the following: :values.',
+    'string' => 'The :attribute must be a string.',
+    'timezone' => 'The :attribute must be a valid zone.',
+    'unique' => 'The :attribute has already been taken.',
+    'uploaded' => 'The :attribute failed to upload.',
+    'url' => 'The :attribute format is invalid.',
+    'uuid' => 'The :attribute must be a valid UUID.',
+
+    /*
+    |--------------------------------------------------------------------------
+    | Custom Validation Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | Here you may specify custom validation messages for attributes using the
+    | convention "attribute.rule" to name the lines. This makes it quick to
+    | specify a specific custom language line for a given attribute rule.
+    |
+    */
+
+    'custom' => [
+        'attribute-name' => [
+            'rule-name' => 'custom-message',
+        ],
+    ],
+
+    /*
+    |--------------------------------------------------------------------------
+    | Custom Validation Attributes
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines are used to swap our attribute placeholder
+    | with something more reader friendly such as "E-Mail Address" instead
+    | of "email". This simply helps us make our message more expressive.
+    |
+    */
+
+    'attributes' => [],
+
+];

+ 2 - 0
resources/views/templates/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

Разлика између датотеке није приказан због своје велике величине
+ 132 - 0
resources/views/welcome.blade.php


+ 27 - 0
routes/api.php

@@ -0,0 +1,27 @@
+<?php
+
+use Illuminate\Http\Request;
+use Illuminate\Support\Facades\Route;
+
+/*
+|--------------------------------------------------------------------------
+| API Routes
+|--------------------------------------------------------------------------
+|
+| Here is where you can register API routes for your application. These
+| routes are loaded by the RouteServiceProvider within a group which
+| is assigned the "api" middleware group. Enjoy building your API!
+|
+*/
+
+Route::middleware('auth:api')->get('/user', function (Request $request) {
+    return $request->user();
+});
+
+// 授权登陆
+Route::post('/login', [\App\Http\Controllers\Api\LoginController::class, 'login']);
+Route::post('/register', [\App\Http\Controllers\Api\LoginController::class, 'register']);
+Route::post('/sendmsm', [\App\Http\Controllers\Api\LoginController::class, 'sendmsm']);
+
+// 测试
+Route::match(['get','post'],'/test/check', [\App\Http\Controllers\Api\TestController::class, 'check']);

+ 18 - 0
routes/channels.php

@@ -0,0 +1,18 @@
+<?php
+
+use Illuminate\Support\Facades\Broadcast;
+
+/*
+|--------------------------------------------------------------------------
+| Broadcast Channels
+|--------------------------------------------------------------------------
+|
+| Here you may register all of the event broadcasting channels that your
+| application supports. The given channel authorization callbacks are
+| used to check if an authenticated user can listen to the channel.
+|
+*/
+
+Broadcast::channel('App.Models.User.{id}', function ($user, $id) {
+    return (int) $user->id === (int) $id;
+});

+ 19 - 0
routes/console.php

@@ -0,0 +1,19 @@
+<?php
+
+use Illuminate\Foundation\Inspiring;
+use Illuminate\Support\Facades\Artisan;
+
+/*
+|--------------------------------------------------------------------------
+| Console Routes
+|--------------------------------------------------------------------------
+|
+| This file is where you may define all of your Closure based console
+| commands. Each Closure is bound to a command instance allowing a
+| simple approach to interacting with each command's IO methods.
+|
+*/
+
+Artisan::command('inspire', function () {
+    $this->comment(Inspiring::quote());
+})->purpose('Display an inspiring quote');

+ 140 - 0
routes/web.php

@@ -0,0 +1,140 @@
+<?php
+// +----------------------------------------------------------------------
+// | LARAVEL8.0 框架 [ LARAVEL ][ RXThinkCMF ]
+// +----------------------------------------------------------------------
+// | 版权所有 2017~2021 LARAVEL研发中心
+// +----------------------------------------------------------------------
+// | 官方网站: http://www.laravel.cn
+// +----------------------------------------------------------------------
+// | Author: laravel开发员 <laravel.qq.com>
+// +----------------------------------------------------------------------
+
+use App\Http\Controllers\Admin\ActionLogController;
+use App\Http\Controllers\Admin\AdController;
+use App\Http\Controllers\Admin\AdSortController;
+use App\Http\Controllers\Admin\CityController;
+use App\Http\Controllers\Admin\ConfigController;
+use App\Http\Controllers\Admin\ConfigGroupController;
+use App\Http\Controllers\Admin\IndexController;
+use App\Http\Controllers\Admin\LayoutController;
+use App\Http\Controllers\Admin\LoginLogController;
+use App\Http\Controllers\Admin\MemberController;
+use App\Http\Controllers\Admin\MemberLevelController;
+use App\Http\Controllers\Admin\MenuController;
+use App\Http\Controllers\Admin\NoticeController;
+use App\Http\Controllers\Admin\PositionController;
+use App\Http\Controllers\Admin\RoleController;
+use App\Http\Controllers\Admin\UploadController;
+use App\Http\Controllers\Admin\UserController;
+use Illuminate\Support\Facades\Route;
+use App\Http\Controllers\Admin\LoginController;
+
+/*
+|--------------------------------------------------------------------------
+| Web Routes
+|--------------------------------------------------------------------------
+|
+| Here is where you can register web routes for your application. These
+| routes are loaded by the RouteServiceProvider within a group which
+| contains the "web" middleware group. Now create something great!
+|
+*/
+
+Route::get('/', function () {
+    return message('1005','403');
+});
+
+// 上传文件
+Route::post('/upload/uploadImage', [UploadController::class, 'uploadImage']);
+Route::post('/upload/uploadBase64', [UploadController::class, 'uploadBase64']);
+
+// 系统登录
+Route::get('/captcha', [LoginController::class, 'captcha'])->name('captcha');
+Route::post('/login', [LoginController::class, 'login']);
+Route::get('/logout', [LoginController::class, 'logout']);
+
+// 系统主页
+
+Route::post('/index/data', [IndexController::class, 'indexData']);
+Route::post('/index/clearCache', [IndexController::class, 'clearCache']);
+Route::get('/index/getMenuList', [IndexController::class, 'getMenuList']);
+Route::get('/index/getUserInfo', [IndexController::class, 'getUserInfo']);
+Route::post('/index/updateUserInfo', [IndexController::class, 'updateUserInfo']);
+Route::post('/index/updatePwd', [IndexController::class, 'updatePwd']);
+
+// 用户管理
+Route::get('/user/index', [UserController::class, 'index']);
+Route::get('/user/info', [UserController::class, 'info']);
+Route::post('/user/edit', [UserController::class, 'edit']);
+Route::post('/user/delete', [UserController::class, 'delete']);
+Route::post('/user/status', [UserController::class, 'status']);
+Route::post('/user/resetPwd', [UserController::class, 'resetPwd']);
+
+// 角色管理
+Route::get('/role/index', [RoleController::class, 'index']);
+Route::get('/role/info', [RoleController::class, 'info']);
+Route::post('/role/edit', [RoleController::class, 'edit']);
+Route::post('/role/delete', [RoleController::class, 'delete']);
+Route::get('/role/getRoleList', [RoleController::class, 'getRoleList']);
+Route::get('/role/getPermissionList', [RoleController::class, 'getPermissionList']);
+Route::post('/role/savePermission', [RoleController::class, 'savePermission']);
+
+// 菜单管理
+Route::get('/menu/index', [MenuController::class, 'index']);
+Route::get('/menu/info', [MenuController::class, 'info']);
+Route::post('/menu/edit', [MenuController::class, 'edit']);
+Route::post('/menu/delete', [MenuController::class, 'delete']);
+
+// 部门管理
+Route::get('/city/index', [CityController::class, 'index']);
+Route::get('/city/info', [CityController::class, 'info']);
+Route::post('/city/edit', [CityController::class, 'edit']);
+Route::post('/city/delete', [CityController::class, 'delete']);
+
+// 配置分组管理
+Route::get('/configgroup/index', [ConfigGroupController::class, 'index']);
+Route::get('/configgroup/info', [ConfigGroupController::class, 'info']);
+Route::post('/configgroup/edit', [ConfigGroupController::class, 'edit']);
+Route::post('/configgroup/delete', [ConfigGroupController::class, 'delete']);
+
+// 配置管理
+Route::get('/config/index', [ConfigController::class, 'index']);
+Route::get('/config/info', [ConfigController::class, 'info']);
+Route::post('/config/edit', [ConfigController::class, 'edit']);
+Route::post('/config/delete', [ConfigController::class, 'delete']);
+
+// 通知公告管理
+Route::get('/notice/index', [NoticeController::class, 'index']);
+Route::get('/notice/info', [NoticeController::class, 'info']);
+Route::post('/notice/edit', [NoticeController::class, 'edit']);
+Route::post('/notice/delete', [NoticeController::class, 'delete']);
+Route::post('/notice/status', [NoticeController::class, 'status']);
+Route::post('/notice/setIsTop', [NoticeController::class, 'setIsTop']);
+
+// 广告管理
+Route::get('/ad/index', [AdController::class, 'index']);
+Route::get('/ad/info', [AdController::class, 'info']);
+Route::post('/ad/edit', [AdController::class, 'edit']);
+Route::post('/ad/delete', [AdController::class, 'delete']);
+
+// 会员等级
+Route::get('/memberlevel/index', [MemberLevelController::class, 'index']);
+Route::get('/memberlevel/info', [MemberLevelController::class, 'info']);
+Route::post('/memberlevel/edit', [MemberLevelController::class, 'edit']);
+Route::post('/memberlevel/delete', [MemberLevelController::class, 'delete']);
+Route::get('/memberlevel/getMemberLevelList', [MemberLevelController::class, 'getMemberLevelList']);
+
+// 会员管理
+Route::get('/member/index', [MemberController::class, 'index']);
+Route::get('/member/info', [MemberController::class, 'info']);
+Route::post('/member/edit', [MemberController::class, 'edit']);
+Route::post('/member/delete', [MemberController::class, 'delete']);
+Route::post('/member/status', [MemberController::class, 'status']);
+
+// 登录日志
+Route::get('/loginlog/index', [LoginLogController::class, 'index']);
+Route::post('/loginlog/delete', [LoginLogController::class, 'delete']);
+
+// 操作日志
+Route::get('/actionlog/index', [ActionLogController::class, 'index']);
+Route::post('/actionlog/delete', [ActionLogController::class, 'delete']);