Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
newShopBack
Project
Project
Details
Activity
Releases
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
newshop
newShopBack
Commits
a6d7be71
Commit
a6d7be71
authored
Nov 28, 2019
by
郭勇志
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
返回信息修改&文件夹不存在创建
parent
1f82f35d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
BranchController.php
backend/controllers/v1/branch/BranchController.php
+2
-1
UploadFiles.php
backend/helpers/UploadFiles.php
+3
-0
No files found.
backend/controllers/v1/branch/BranchController.php
View file @
a6d7be71
...
@@ -671,7 +671,8 @@ class BranchController extends BaseController
...
@@ -671,7 +671,8 @@ class BranchController extends BaseController
(
$key
+
1
)
=>
$_branchModel
->
errors
(
$key
+
1
)
=>
$_branchModel
->
errors
];
];
@
unlink
(
$fileInfo
[
'INFO'
][
0
]);
@
unlink
(
$fileInfo
[
'INFO'
][
0
]);
throw
new
HttpException
(
"422"
,
json_encode
(
$returnInfo
));
Yii
::
$app
->
response
->
statusCode
=
422
;
return
$returnInfo
;
}
}
}
}
$transaction
->
commit
();
$transaction
->
commit
();
...
...
backend/helpers/UploadFiles.php
View file @
a6d7be71
...
@@ -49,6 +49,9 @@ class UploadFiles extends Model
...
@@ -49,6 +49,9 @@ class UploadFiles extends Model
$rtn
=
''
;
$rtn
=
''
;
$func
=
clone
(
new
Func
);
$func
=
clone
(
new
Func
);
if
(
$this
->
validate
())
{
if
(
$this
->
validate
())
{
if
(
!
file_exists
(
UPLOAD_FILE_PATH
))
{
@
mkdir
(
UPLOAD_FILE_PATH
,
0777
);
}
if
(
is_array
(
$this
->
uploadFiles
))
{
if
(
is_array
(
$this
->
uploadFiles
))
{
foreach
(
$this
->
uploadFiles
as
$file
)
{
foreach
(
$this
->
uploadFiles
as
$file
)
{
$randomName
=
$func
::
create_guid
();
$randomName
=
$func
::
create_guid
();
...
...
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