Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Cong.Zhao
/
musician-api.hikoon.com
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
0641e5a6
...
0641e5a6d736038d60b7cb12cb028491e558dfd9
authored
2022-08-26 17:29:43 +0800
by
wei.feng
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加字段
1 parent
3e70ae39
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
app/Http/Controllers/OpenApi/SongController.php
app/Models/Legal/Song.php
app/Http/Controllers/OpenApi/SongController.php
View file @
0641e5a
...
...
@@ -101,7 +101,7 @@ class SongController extends Controller
public
function
coverFiles
(
$song_files
)
:
array
{
$files_need
=
[
'mp3_url'
,
'accompany_mp3_url'
,
'cover_url'
,
'wav_url'
,
'accompany_wav_url'
];
$files_need
=
[
'mp3_url'
,
'accompany_mp3_url'
,
'
lyric_url'
,
'
cover_url'
,
'wav_url'
,
'accompany_wav_url'
];
$files_arr
=
[];
foreach
(
$song_files
as
$file
)
{
switch
(
$file
[
'type'
])
{
...
...
@@ -111,6 +111,9 @@ class SongController extends Controller
case
2
:
$files_arr
[
'accompany_mp3_url'
]
=
$file
[
'url'
];
break
;
case
3
:
$files_arr
[
'lyric_url'
]
=
$file
[
'url'
];
break
;
case
4
:
$files_arr
[
'cover_url'
]
=
$file
[
'url'
];
break
;
...
...
app/Models/Legal/Song.php
View file @
0641e5a
...
...
@@ -14,7 +14,7 @@ class Song extends BaseModel
{
use
HasFactory
,
SoftDeletes
;
protected
static
$file_only
=
[
1
,
2
,
4
,
11
,
12
];
protected
static
$file_only
=
[
1
,
2
,
3
,
4
,
11
,
12
];
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
...
...
Please
register
or
sign in
to post a comment