Commit bae3e6ca by 杨昕

优化媒资

parent 85864390
Pipeline #14098 passed with stages
in 2 minutes 36 seconds
...@@ -31,19 +31,19 @@ class MediaController extends Controller ...@@ -31,19 +31,19 @@ class MediaController extends Controller
// php 特殊字符转义,实现字符串安全存入数据库, // php 特殊字符转义,实现字符串安全存入数据库,
SrsHookValidate::srsHookCallback($request,[ // SrsHookValidate::srsHookCallback($request,[
'media_name' => '', // 'media_name' => '',
'username' => '', // 'username' => '',
'page' => 'integer', // 'page' => 'integer',
'media_id' => '', // 'media_id' => '',
'description' => '', // 'description' => '',
'sort' => '', // 'sort' => '',
'page_size' => 'integer', // 'page_size' => 'integer',
'start_time' => 'date', // 'start_time' => 'date',
'end_time' => 'date', // 'end_time' => 'date',
'category_id' => '', // 'category_id' => '',
'appid' => '' // 'appid' => ''
]); // ]);
$medias = MediaModel::mediaList($request); $medias = MediaModel::mediaList($request);
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace App\Http\Middleware; namespace App\Http\Middleware;
use App\Exceptions\ControllerException; use App\Exceptions\ControllerException;
use App\Model\MediaCategoryModel;
use Closure; use Closure;
use Illuminate\Http\Response; use Illuminate\Http\Response;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
...@@ -34,6 +35,13 @@ class ApiMiddleware ...@@ -34,6 +35,13 @@ class ApiMiddleware
$user = Auth::user(); $user = Auth::user();
if ($request->category_id){
$mediaCatg = MediaCategoryModel::where("_id",$request->category_id)->first();
$request->replace(array_merge($request->all(),['catetory_name'=>$mediaCatg->name]));
}
if (isset($user->mis_uid)){ if (isset($user->mis_uid)){
$request->replace(array_merge($request->all(),['mis_uid'=>$user->mis_uid])); $request->replace(array_merge($request->all(),['mis_uid'=>$user->mis_uid]));
} }
......
...@@ -25,7 +25,9 @@ ...@@ -25,7 +25,9 @@
</div> </div>
<ul class="nav-menu list-unstyled d-flex flex-md-row align-items-md-center"> <ul class="nav-menu list-unstyled d-flex flex-md-row align-items-md-center">
<!-- Expand--> <!-- Expand-->
{{--<li class="nav-item d-flex align-items-center full_scr_exp"><a class="nav-link" href="#"><img src=" {{ asset('xadmin/img/expand.png')}}" ')}}onclick="toggleFullScreen(document.body)" class="img-fluid" alt=""></a></li>--}} @if(\Illuminate\Support\Facades\Request::Input("category_id"))
<li class="nav-item d-flex"><a class="nav-link" href="javascript:;">当前店铺为:{{\Illuminate\Support\Facades\Request::all()['catetory_name']}}</a></li>
@endif
<!-- Search--> <!-- Search-->
{{--<li class="nav-item d-flex align-items-center"><a id="search" class="nav-link" href="#"><i class="icon-search"></i></a></li> {{--<li class="nav-item d-flex align-items-center"><a id="search" class="nav-link" href="#"><i class="icon-search"></i></a></li>
<li class="nav-item d-flex align-items-center"> <li class="nav-item d-flex align-items-center">
...@@ -256,6 +258,7 @@ ...@@ -256,6 +258,7 @@
</header> </header>
<script> <script>
function logout() { function logout() {
$.removeCookie('media_category_id') $.removeCookie('media_category_id')
$.removeCookie('appid') $.removeCookie('appid')
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
@include('admin.common.commonMedia') @include('admin.common.commonMedia')
<script src="{{ asset('xadmin/extra/datepicker/js/moment.js')}}"></script> {{--<script src="{{ asset('xadmin/extra/datepicker/js/moment.js')}}"></script>--}}
<body> <body>
<!--==================================================== <!--====================================================
...@@ -275,35 +275,6 @@ ...@@ -275,35 +275,6 @@
}); });
} }
updateConfig();
function updateConfig() {
var options = {};
options.locale = {
// direction: $('#rtl').is(':checked') ? 'rtl' : 'ltr',
// format: 'MM/DD/YYYY HH:mm',
format: 'YYYY/MM/DD',
separator: ' - ',
applyLabel: '确定',
cancelLabel: '取消',
fromLabel: 'From',
toLabel: 'To',
customRangeLabel: 'Custom',
daysOfWeek: ['日', '一', '二', '三', '四', '五','六'],
monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
firstDay: 1,
autoApply:false,
};
$('#endDate').daterangepicker(options, function(start, end) {
console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') );
});
}
</script> </script>
......
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