Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
media-resource
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨昕
media-resource
Commits
12fd5c4f
Commit
12fd5c4f
authored
Mar 25, 2021
by
杨昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改导出Excel格式
parent
3a87688b
Pipeline
#14020
passed with stages
in 4 minutes 39 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
MediasExport.php
app/Exports/MediasExport.php
+0
-1
MediaController.php
app/Http/Controllers/Web/MediaController.php
+8
-2
MediaModel.php
app/Model/MediaModel.php
+0
-1
No files found.
app/Exports/MediasExport.php
View file @
12fd5c4f
...
...
@@ -27,7 +27,6 @@ class MediasExport implements WithHeadings,FromArray
'媒资编号'
,
'视频名称'
,
"永久播放地址"
,
"预览地址"
,
"全屏预览地址"
];
}
...
...
app/Http/Controllers/Web/MediaController.php
View file @
12fd5c4f
...
...
@@ -271,11 +271,17 @@ class MediaController extends Controller
$file
=
$request
->
file
(
'uploadFile'
);
#将文件内容转化为数组
$sheet
=
(
new
MediasImport
)
->
toArray
(
$file
);
$sheet
=
(
new
MediasImport
())
->
toCollection
(
$file
);
$media_ids
=
collect
(
$sheet
[
0
])
->
map
(
function
(
$item
,
$key
){
return
array_first
(
$item
);
})
->
toArray
();
$data
=
[];
if
(
!
empty
(
$sheet
[
0
])){
$media_ids
=
array_column
(
$sheet
[
0
],
'media_id'
);
#批量获取永久播放链接地址
$mediaInfos
=
MediaModel
::
batchGetMediaForverM3u8
(
$request
,
$media_ids
);
...
...
app/Model/MediaModel.php
View file @
12fd5c4f
...
...
@@ -1053,7 +1053,6 @@ class MediaModel extends Eloquent
$url
=
getenv
(
'preview_domain'
)
?
getenv
(
'preview_domain'
)
:
"https://xue.t.eoffcn.com/preview/temp/"
;
$item
[
'preview_url'
]
=
$url
.
"play"
.
'/'
.
$media_num
;
$item
[
'is_full_url'
]
=
$url
.
"player"
.
'/'
.
$media_num
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment