Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
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
hujun
tl_estate
Commits
a53dbaaf
Commit
a53dbaaf
authored
Jul 23, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片删除
parent
eec8f663
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
StoreFee.php
application/api_broker/controller/StoreFee.php
+3
-1
StoreFeeService.php
application/api_broker/service/StoreFeeService.php
+4
-3
StoreFee.php
application/index/controller/StoreFee.php
+3
-1
No files found.
application/api_broker/controller/StoreFee.php
View file @
a53dbaaf
...
...
@@ -125,10 +125,12 @@ class StoreFee extends Basic
return
$this
->
response
(
$code
,
'参数错误'
);
}
$result
=
$this
->
service_
->
delImg
(
$this
->
params
);
$result
=
$this
->
service_
->
delImg
(
$this
->
params
[
'id_string'
]
);
if
(
$result
[
'status'
]
!=
'fail'
)
{
$code
=
200
;
}
else
{
$msg
=
$result
[
'msg'
];
}
return
$this
->
response
(
$code
,
$msg
);
...
...
application/api_broker/service/StoreFeeService.php
View file @
a53dbaaf
...
...
@@ -151,10 +151,9 @@ class StoreFeeService
public
function
delImg
(
$id_string
)
{
$image_array
=
explode
(
','
,
$id_string
);
$result
[
'status'
]
=
'fail'
;
$result
[
'msg'
]
=
''
;
if
(
!
is_array
(
$image_array
))
{
if
(
!
is_array
(
$image_array
)
&&
!
is_numeric
(
$id_string
)
)
{
$result
[
'msg'
]
=
'参数错误'
;
return
$result
;
}
...
...
@@ -163,12 +162,14 @@ class StoreFeeService
$num
=
0
;
$path
=
ROOT_PATH
.
'public/'
;
foreach
(
$img_data
as
$v
)
{
$num
+=
$this
->
imgModel
->
editData
([
'i
s_del
'
=>
1
],
$v
[
'id'
]);
$num
+=
$this
->
imgModel
->
editData
([
'i
mg_status
'
=>
1
],
$v
[
'id'
]);
@
unlink
(
$path
.
'static/chat_image/'
.
$v
[
'img_name'
]);
}
if
(
$num
)
{
$result
[
'status'
]
=
'successful'
;
}
else
{
$result
[
'msg'
]
=
'删除失败'
;
}
return
$result
;
}
...
...
application/index/controller/StoreFee.php
View file @
a53dbaaf
...
...
@@ -440,10 +440,12 @@ class StoreFee extends Basic
}
$service_
=
new
StoreFeeService
();
$result
=
$service_
->
delImg
(
$this
->
params
);
$result
=
$service_
->
delImg
(
$this
->
params
[
'id_string'
]
);
if
(
$result
[
'status'
]
!=
'fail'
)
{
$code
=
200
;
}
else
{
$msg
=
$result
[
'msg'
];
}
return
$this
->
response
(
$code
,
$msg
);
...
...
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