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
94b4b793
Commit
94b4b793
authored
Sep 09, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新数据
parent
059a7bf6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
20 deletions
+19
-20
AmercementService.php
application/index/service/AmercementService.php
+19
-20
No files found.
application/index/service/AmercementService.php
View file @
94b4b793
...
@@ -304,7 +304,6 @@ class AmercementService
...
@@ -304,7 +304,6 @@ class AmercementService
/**
/**
* 更新数据
* 更新数据
* @param $agent_id
* @param $id
* @param $id
* @param $params
* @param $params
* @param $edit_type
* @param $edit_type
...
@@ -315,27 +314,27 @@ class AmercementService
...
@@ -315,27 +314,27 @@ class AmercementService
{
{
switch
(
$edit_type
)
{
switch
(
$edit_type
)
{
case
0
:
case
0
:
if
(
isset
(
$params
[
'img'
])
&&
empty
(
$params
[
'img'
])){
return
[
'code'
=>
200
,
'msg'
=>
'图片至少一张'
];
}
//0编辑
//0编辑
$this
->
updateAmercement
(
$id
,
$params
);
$this
->
updateAmercement
(
$id
,
$params
);
//处理图片
$result_img
=
$this
->
getAmercementImage
(
$id
);
if
(
isset
(
$params
[
'img'
])
&&
!
empty
(
$params
[
'img'
])){
if
(
!
$result_img
){
//处理图片
break
;
$result_img
=
$this
->
getAmercementImage
(
$id
);
}
if
(
!
$result_img
){
$list_img
=
[];
break
;
foreach
(
$result_img
as
$key
=>
$val
)
{
}
$list_img
[]
=
$val
[
'file_name'
];
$list_img
=
[];
}
foreach
(
$result_img
as
$key
=>
$val
)
{
$params_img
=
json_decode
(
$params
[
'img'
],
true
);
$list_img
[]
=
$val
[
'file_name'
];
foreach
(
$params_img
as
$key
=>
$val
)
{
}
if
(
!
in_array
(
$val
,
$list_img
)){
$params_img
=
json_decode
(
$params
[
'img'
],
true
);
$insert
=
[];
foreach
(
$params_img
as
$key
=>
$val
)
{
$insert
[
"file_name"
]
=
$val
;
if
(
!
in_array
(
$val
,
$list_img
)){
$insert
[
"amercement_id"
]
=
$id
;
$insert
=
[];
$this
->
m_amercement_img
->
saveAmercementImg
(
$insert
);
$insert
[
"file_name"
]
=
$val
;
$insert
[
"amercement_id"
]
=
$id
;
$this
->
m_amercement_img
->
saveAmercementImg
(
$insert
);
}
}
}
}
}
break
;
break
;
...
...
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