Commit 58876bf4 by 杨昕

添加控制权限页面

parent fdf2f6e1
Pipeline #10760 passed with stages
in 40 seconds
......@@ -32,6 +32,7 @@ class MediaController extends Controller
'page_size' => 'integer',
'start_time' => 'date',
'end_time' => 'date',
'category_id' => ''
]);
$medias = MediaModel::mediaList($request);
......@@ -43,6 +44,7 @@ class MediaController extends Controller
'media_name' => $request->media_name,
'media_id' => $request->media_id,
'STATUS' => ['启用','停用'],
'category_id' => $request->category_id
]);
}
......@@ -157,4 +159,13 @@ class MediaController extends Controller
}
/**
*
* @param Request $request
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function media_command(){
return view('admin.control');
}
}
......@@ -15,6 +15,7 @@ class MediaRoute extends AuthenRoute
public function map(Registrar $router,$callback){
parent::map($router,function() use ($router){
$router->resource('media_model','MediaController');
$router->get('media_command','MediaController@media_command');
});
}
......
......@@ -63,14 +63,16 @@ class MediaModel extends Eloquent
$aggregate[]['$match']['_id'] = $request->media_id;
}
if (isset($request->category_id) && !empty($request->category_id)){
$aggregate[]['$match']['media_type_id'] = $request->category_id;
}
// $aggregate[]['$match']['_id'] = 'mda-864371b9a82d1e21';
if (isset($request->media_name) && !empty($request->media_name)){
$aggregate[]['$match']['media_name'] = ['$regex' => addslashes($request->media_name) ];
}
if (isset($request->username) && !empty($request->username)){
$aggregate[]['$match']['username'] = $request->username;
}
......@@ -80,18 +82,12 @@ class MediaModel extends Eloquent
}
if (isset($request->start_time)&& !empty($request->start_time)){
$start_time = new UTCDateTime(strtotime($request->start_time) * 1000);
$aggregate[]['$match']['start_time'] = ['$gt' => $start_time ];
}
if (isset($request->end_time)&& !empty($request->end_time)){
$end_time = new UTCDateTime(strtotime($request->end_time) * 1000);;
$aggregate[]['$match']['end_time'] = ['$lt' => $end_time ];
}
......
......@@ -15,11 +15,11 @@
"pid": 0,
"name": "媒体资源上传",
"icon": "",
"link": "/manager",
"slug": "manager",
"link": "/media_command",
"slug": "media_command",
"description": "",
"show": 1,
"sort": 2,
"key_name": "manager_media",
"key_name": "media_command",
"son": []
}]
\ No newline at end of file
<!DOCTYPE html>
<html>
@include('admin.common.commonMedia')
<body>
<!--====================================================
MAIN NAVBAR
======================================================-->
@include('admin.common.header')
<!--====================================================
PAGE CONTENT
======================================================-->
<div class="page-content d-flex align-items-stretch">
<!--***** SIDE NAVBAR *****-->
@include('admin.common.left')
<div class="content-inner">
<div class="control">
模块开发中
</div>
</div>
</div>
<!--Global Javascript -->
@include('admin.common.foot')
<style>
.control{
text-align: center;
line-height: 200px;
min-height: 200px;
font-size: 20px;
}
</style>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment