-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
server
committed
Sep 9, 2021
0 parents
commit d44ad78
Showing
7,320 changed files
with
1,161,960 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
node_modules | ||
Homestead.yaml | ||
Homestead.json | ||
.env | ||
/.idea/ | ||
/composer.lock | ||
.project | ||
/public/temp/ | ||
/storage/install.lock | ||
.DS_Store | ||
bootstrap/config.php | ||
deploy-*.txt | ||
_delete_.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
|
||
namespace App\Admin\Controller; | ||
|
||
|
||
use Illuminate\Routing\Controller; | ||
use ModStart\Admin\Layout\AdminPage; | ||
use ModStart\Admin\Widget\DashboardItemA; | ||
use ModStart\Admin\Widget\SecurityTooltipBox; | ||
use ModStart\Core\Dao\ModelUtil; | ||
use ModStart\Core\Util\ColorUtil; | ||
use ModStart\Layout\Row; | ||
use Module\AdminManager\Widget\ServerInfoWidget; | ||
use Module\Vendor\Admin\Config\AdminWidgetDashboard; | ||
|
||
class IndexController extends Controller | ||
{ | ||
public function index(AdminPage $page) | ||
{ | ||
$page->pageTitle(L('Dashboard')) | ||
->row(new SecurityTooltipBox()) | ||
->append(new Row(function (Row $row) { | ||
AdminWidgetDashboard::callIcon($row); | ||
})); | ||
AdminWidgetDashboard::call($page); | ||
$page->append(new ServerInfoWidget()); | ||
return $page; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
return [ | ||
"demoId" => config('env.ADMIN_DEMO_USER_ID', 0), | ||
"founderId" => config('env.ADMIN_FOUNDER_ID', 1), | ||
"menu" => [ | ||
] | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
Route::group( | ||
[ | ||
'prefix' => env('ADMIN_PATH', '/admin/'), | ||
'middleware' => ['admin.bootstrap', 'admin.auth'], | ||
'namespace' => '\App\Admin\Controller', | ||
], function () { | ||
|
||
Route::match(['get', 'post'], '', 'IndexController@index'); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
|
||
namespace App\Api\Controller; | ||
|
||
|
||
use Illuminate\Routing\Controller; | ||
use ModStart\Core\View\ResponsiveViewTrait; | ||
|
||
class BaseController extends Controller | ||
{ | ||
use ResponsiveViewTrait; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
<?php | ||
|
||
namespace App\Api\Controller; | ||
|
||
use ModStart\Core\Assets\AssetsUtil; | ||
use ModStart\Core\Input\Response; | ||
use ModStart\Core\Type\TypeUtil; | ||
use ModStart\Core\Util\ConstantUtil; | ||
use Module\Doc\Type\DocType; | ||
use Module\Doc\Type\DocVisit; | ||
use Module\Hire\Type\WorkApplyStatus; | ||
use Module\Hire\Type\WorkGenderType; | ||
use Module\Hire\Type\WorkHeightType; | ||
use Module\Hire\Type\WorkInviteStatus; | ||
use Module\Hire\Type\WorkSalaryCashPeriod; | ||
use Module\Hire\Type\WorkSalaryPeriod; | ||
use Module\Hire\Type\WorkSalaryType; | ||
use Module\Hire\Type\WorkStatus; | ||
use Module\Member\Auth\MemberUser; | ||
use Module\Member\Auth\MemberVip; | ||
use Module\Member\Type\Education; | ||
use Module\Member\Type\Gender; | ||
use Module\Member\Type\MemberMessageStatus; | ||
use Module\MemberCert\Type\CorpStatus; | ||
use Module\MemberCert\Type\IndividualStatus; | ||
use Module\NoteSns\Type\NoteEditorType; | ||
use Module\Question\Api\Controller\QuestionTagController; | ||
use Module\Shop\Type\GoodsSaleStatus; | ||
use Module\Vendor\Cache\LazyValueUtil; | ||
use Module\Vendor\Support\ResponseCodes; | ||
|
||
class ConfigController extends BaseController | ||
{ | ||
public function constant() | ||
{ | ||
$constants = []; | ||
$constants['WorkApplyStatus'] = TypeUtil::dump(WorkApplyStatus::class); | ||
$constants['WorkGenderType'] = TypeUtil::dump(WorkGenderType::class); | ||
$constants['WorkHeightType'] = TypeUtil::dump(WorkHeightType::class); | ||
$constants['WorkInviteStatus'] = TypeUtil::dump(WorkInviteStatus::class); | ||
$constants['WorkSalaryCashPeriod'] = TypeUtil::dump(WorkSalaryCashPeriod::class); | ||
$constants['WorkSalaryPeriod'] = TypeUtil::dump(WorkSalaryPeriod::class); | ||
$constants['WorkSalaryType'] = TypeUtil::dump(WorkSalaryType::class); | ||
$constants['WorkStatus'] = TypeUtil::dump(WorkStatus::class); | ||
$constants['CorpStatus'] = TypeUtil::dump(CorpStatus::class); | ||
$constants['IndividualStatus'] = TypeUtil::dump(IndividualStatus::class); | ||
$constants['Education'] = TypeUtil::dump(Education::class); | ||
$constants['Gender'] = TypeUtil::dump(Gender::class); | ||
$content = []; | ||
$content [] = "// This file is created by " . action('\\' . __CLASS__ . '@constant') . "\n"; | ||
foreach ($constants as $name => $json) { | ||
$content[] = "export const $name = " . json_encode($json, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) . ";"; | ||
} | ||
return Response::raw(join("\n", $content), ['Content-Type' => 'text/plain']); | ||
} | ||
|
||
public function app() | ||
{ | ||
$data = []; | ||
list($view, $_) = $this->viewPaths('index'); | ||
$hash = date('Ymd_His', filemtime($this->viewRealpath($view))); | ||
$data['hashPC'] = 'v' . $hash; | ||
$data['hashLazyValue'] = []; | ||
|
||
$data['user'] = [ | ||
'id' => 0, | ||
'avatar' => AssetsUtil::fixFull('asset/image/avatar.png'), | ||
'avatarMedium' => AssetsUtil::fixFull('asset/image/avatar.png'), | ||
'avatarBig' => AssetsUtil::fixFull('asset/image/avatar.png'), | ||
'nickname' => '', | ||
'username' => '', | ||
'phone' => '', | ||
'phoneVerified' => false, | ||
'email' => '', | ||
'emailVerified' => false, | ||
'vip' => null, | ||
'vipExpire' => null, | ||
]; | ||
if (MemberUser::id()) { | ||
$memberUser = MemberUser::user(); | ||
$data['user']['id'] = $memberUser['id']; | ||
$data['user']['avatar'] = AssetsUtil::fixFull($memberUser['avatar'] ? $memberUser['avatar'] : $data['user']['avatar']); | ||
$data['user']['avatarMedium'] = AssetsUtil::fixFull($memberUser['avatarMedium'] ? $memberUser['avatarMedium'] : $data['user']['avatar']); | ||
$data['user']['avatarBig'] = AssetsUtil::fixFull($memberUser['avatarBig'] ? $memberUser['avatarBig'] : $data['user']['avatar']); | ||
$data['user']['username'] = $memberUser['username']; | ||
$data['user']['nickname'] = empty($memberUser['nickname']) ? null : $memberUser['nickname']; | ||
if (empty($data['user']['nickname'])) { | ||
$data['user']['nickname'] = $data['user']['username']; | ||
} | ||
$data['user']['phone'] = $memberUser['phone']; | ||
$data['user']['phoneVerified'] = !!$memberUser['phoneVerified']; | ||
$data['user']['email'] = $memberUser['email']; | ||
$data['user']['emailVerified'] = !!$memberUser['emailVerified']; | ||
$data['user']['vip'] = MemberVip::get(); | ||
$data['user']['vipExpire'] = $memberUser['vipExpire']; | ||
} | ||
|
||
return Response::jsonSuccessData($data); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
|
||
namespace App\Api\Controller; | ||
|
||
|
||
use Illuminate\Routing\Controller; | ||
use ModStart\Core\Input\InputPackage; | ||
use ModStart\Core\Input\Response; | ||
use ModStart\Core\Util\ArrayUtil; | ||
use Module\Member\Auth\MemberUser; | ||
use Module\Member\Support\MemberLoginCheck; | ||
use Module\Member\Util\MemberUtil; | ||
|
||
class MemberProfileController extends Controller implements MemberLoginCheck | ||
{ | ||
public function basic($data = null) | ||
{ | ||
$input = InputPackage::buildFromInput(); | ||
if (null === $data) { | ||
$data = $input->all(); | ||
} | ||
MemberUtil::update(MemberUser::id(), ArrayUtil::keepKeys($data, ['gender', 'realname', 'signature'])); | ||
return Response::jsonSuccess('保存成功'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
Route::group( | ||
[ | ||
'middleware' => [ | ||
'api.bootstrap', | ||
\Module\Member\Middleware\ApiAuthMiddleware::class, | ||
], | ||
'namespace' => '\App\Api\Controller', | ||
'prefix' => 'api', | ||
], function () { | ||
|
||
Route::match(['get', 'post'], 'config_app', 'ConfigController@app'); | ||
Route::match(['get', 'post'], 'config_constant', 'ConfigController@constant'); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
|
||
namespace App\Console\Commands; | ||
|
||
|
||
use Module\Vendor\Command\BaseDumpDemoDataCommand; | ||
|
||
class DumpDemoDataCommand extends BaseDumpDemoDataCommand | ||
{ | ||
public function handle() | ||
{ | ||
$data = [ | ||
'inserts' => $this->buildInsert( | ||
['config', ['key', 'value'], function ($item) { | ||
return !in_array($item['key'], ['moduleEnableList']); | ||
}], | ||
'article', | ||
'cms_job', | ||
'nav', | ||
'partner', | ||
['case', ['title', 'content', 'cover']], 'case_category', | ||
['news', ['title', 'content', 'cover', 'summary']], 'news_category', | ||
'product', 'product_category', | ||
'landing_page_item' | ||
), | ||
'updates' => $this->buildUpdate( | ||
['landing_page', ['url' => ''], ['title']] | ||
), | ||
]; | ||
$this->buildDump($data); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace App\Console; | ||
|
||
use Illuminate\Console\Scheduling\Schedule; | ||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel; | ||
|
||
class Kernel extends ConsoleKernel | ||
{ | ||
|
||
protected $commands = [ | ||
Commands\DumpDemoDataCommand::class, | ||
]; | ||
|
||
|
||
protected function schedule(Schedule $schedule) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace App\Constant; | ||
|
||
class AppConstant | ||
{ | ||
const APP = 'cms'; | ||
const VERSION = '1.0.0'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
|
||
namespace App\Exceptions; | ||
|
||
use Exception; | ||
use Illuminate\Database\Eloquent\ModelNotFoundException; | ||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; | ||
use ModStart\Core\Exception\ExceptionReportHandleTrait; | ||
use Symfony\Component\HttpKernel\Exception\HttpException; | ||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | ||
|
||
class Handler extends ExceptionHandler | ||
{ | ||
use ExceptionReportHandleTrait; | ||
|
||
|
||
protected $dontReport = [ | ||
HttpException::class, | ||
ModelNotFoundException::class, | ||
]; | ||
|
||
|
||
public function report(Exception $exception) | ||
{ | ||
$this->errorReportCheck($exception); | ||
|
||
parent::report($exception); | ||
} | ||
|
||
|
||
public function render($request, Exception $e) | ||
{ | ||
if ($e instanceof ModelNotFoundException) { | ||
$e = new NotFoundHttpException($e->getMessage(), $e); | ||
} | ||
|
||
return parent::render($request, $e); | ||
} | ||
|
||
|
||
protected function convertExceptionToResponse(Exception $e) | ||
{ | ||
$t = $this->getExceptionResponse($e); | ||
if (null !== $t) { | ||
return $t; | ||
} | ||
if (env('APP_DEBUG', true)) { | ||
return parent::convertExceptionToResponse($e); | ||
} | ||
return response()->view('errors.500', ['exception' => $e], 500); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace App\Http; | ||
|
||
use Illuminate\Foundation\Http\Kernel as HttpKernel; | ||
|
||
class Kernel extends HttpKernel | ||
{ | ||
|
||
protected $middleware = [ | ||
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class, | ||
\Illuminate\Cookie\Middleware\EncryptCookies::class, | ||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, | ||
\Illuminate\Session\Middleware\StartSession::class, | ||
]; | ||
|
||
|
||
protected $routeMiddleware = [ | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace App\Providers; | ||
|
||
use Illuminate\Events\Dispatcher; | ||
use Illuminate\Support\ServiceProvider; | ||
|
||
class AppServiceProvider extends ServiceProvider | ||
{ | ||
|
||
public function boot(Dispatcher $events) | ||
{ | ||
} | ||
|
||
|
||
public function register() | ||
{ | ||
|
||
} | ||
} |
Oops, something went wrong.