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
7e3f3535
Commit
7e3f3535
authored
Sep 05, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片异常处理
parent
56356a6a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
HouseService.php
application/index/service/HouseService.php
+7
-1
GHousesImgs.php
application/model/GHousesImgs.php
+11
-6
No files found.
application/index/service/HouseService.php
View file @
7e3f3535
...
...
@@ -76,7 +76,13 @@ class HouseService
if
(
$data
[
'id'
]
==
''
)
{
$house_img
->
add
(
$data
,
$house_id
);
//只记录新增图片
}
else
{
$house_img
->
edit
(
$data
,
$house_id
);
//编辑图片
$image_result
=
$house_img
->
edit
(
$data
,
$house_id
);
//编辑图片
if
(
$image_result
[
'status'
]
==
'fail'
)
{
$result
[
'status'
]
=
'fail'
;
$result
[
'msg'
]
=
'编辑图片失败,'
.
$validate
->
getError
();
return
$result
;
}
}
//案场权限人
...
...
application/model/GHousesImgs.php
View file @
7e3f3535
...
...
@@ -78,13 +78,10 @@ class GHousesImgs extends BaseModel
*
* @param $params
* @param $house_id
* @return array|false
* @throws \Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @return mixed
*/
public
function
edit
(
$params
,
$house_id
)
{
try
{
//编辑图片
$house_img_data
=
$this
->
field
(
'id,img_name,img_type'
)
->
where
(
'img_status <> 1 AND house_id = '
.
$house_id
)
->
select
();
...
...
@@ -169,8 +166,16 @@ class GHousesImgs extends BaseModel
}
}
$this
->
add
(
$params
,
$house_id
);
return
$this
->
saveAll
(
$house_img_edit
);
$this
->
saveAll
(
$house_img_edit
);
$result
[
'status'
]
=
'successful'
;
}
catch
(
\Exception
$e
)
{
$result
[
'status'
]
=
'fail'
;
$result
[
'msg'
]
=
$e
->
getMessage
();
}
return
$result
;
}
/****** zw start *******/
...
...
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