mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-11-28 06:04:01 +00:00
【程序目录】增加获取系统当前版本号
This commit is contained in:
parent
8e1325bf9e
commit
817f304692
@ -44,4 +44,21 @@ class PublicController
|
||||
{
|
||||
return app('json')->success(getWorkerManUrl());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前系统版本
|
||||
* @return array
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
$version_arr = [];
|
||||
$curent_version = @file(app()->getRootPath() . '.version');
|
||||
|
||||
foreach ($curent_version as $val) {
|
||||
list($k, $v) = explode('=', $val);
|
||||
$version_arr[$k] = $v;
|
||||
}
|
||||
return app('json')->success($version_arr);
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,6 +30,8 @@ Route::group(function () {
|
||||
Route::get('captcha_pro', 'Login/captcha')->name('')->option(['real_name' => '获取验证码']);
|
||||
//获取客服数据
|
||||
Route::get('get_workerman_url', 'PublicController/getWorkerManUrl')->option(['real_name' => '获取客服数据']);
|
||||
//获取系统当前版本号
|
||||
Route::get('get_version', 'PublicController/getVersion')->option(['real_name' => '获取系统当前版本号']);
|
||||
//测试
|
||||
Route::get('index', 'Test/index')->option(['real_name' => '测试地址']);
|
||||
})->middleware(AllowOriginMiddleware::class);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user