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
2faff2a3
Commit
2faff2a3
authored
Apr 13, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
楼盘图片编辑
parent
e5c19d11
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
16 deletions
+21
-16
common.php
application/common.php
+17
-0
GHousesImgs.php
application/model/GHousesImgs.php
+4
-16
No files found.
application/common.php
View file @
2faff2a3
...
...
@@ -176,3 +176,19 @@ function tranTime($time_inpute) {
}
return
$str
;
}
/**
* 删除数组中已经存在的值
*
* @param string $string
* @param array $array_str
* @return array
*/
function
del_array_string
(
$string
=
''
,
$array_str
=
[])
{
foreach
(
$array_str
as
$k
=>
$v
)
{
if
(
$v
==
$string
)
{
unset
(
$array_str
[
$k
]);
}
}
return
$array_str
;
}
\ No newline at end of file
application/model/GHousesImgs.php
View file @
2faff2a3
...
...
@@ -107,10 +107,7 @@ class GHousesImgs extends BaseModel
if
(
$slide_show
!=
''
)
{
foreach
(
$slide_show
as
$kk
=>
$vv
)
{
if
(
in_array
(
$v
->
img_name
,
$slide_show
))
{
$img_key
=
array_search
(
$v
->
img_name
,
$params
[
'slide_show'
]);
//根据值查找对应的key
if
(
$img_key
)
{
unset
(
$params
[
'slide_show'
][
$img_key
]);
}
$params
[
'slide_show'
]
=
del_array_string
(
$v
->
img_name
,
$params
[
'slide_show'
]);
}
else
{
$house_img_edit
[
$key
][
'id'
]
=
$v
->
id
;
$house_img_edit
[
$key
][
'img_status'
]
=
1
;
...
...
@@ -130,10 +127,7 @@ class GHousesImgs extends BaseModel
if
(
$plan
!=
''
)
{
foreach
(
$plan
as
$kk
=>
$vv
)
{
if
(
in_array
(
$v
->
img_name
,
$plan
))
{
$img_key
=
array_search
(
$v
->
img_name
,
$params
[
'plan'
]);
//根据值查找对应的key
if
(
$img_key
)
{
unset
(
$params
[
'plan'
][
$img_key
]);
}
$params
[
'plan'
]
=
del_array_string
(
$v
->
img_name
,
$params
[
'plan'
]);
}
else
{
$house_img_edit
[
$key
][
'id'
]
=
$v
->
id
;
$house_img_edit
[
$key
][
'img_status'
]
=
1
;
...
...
@@ -153,10 +147,7 @@ class GHousesImgs extends BaseModel
if
(
$exclusive_img
!=
''
)
{
foreach
(
$exclusive_img
as
$kk
=>
$vv
)
{
if
(
in_array
(
$v
->
img_name
,
$exclusive_img
))
{
$img_key
=
array_search
(
$v
->
img_name
,
$params
[
'exclusive_img'
]);
//根据值查找对应的key
if
(
$img_key
)
{
unset
(
$params
[
'exclusive_img'
][
$img_key
]);
}
$params
[
'exclusive_img'
]
=
del_array_string
(
$v
->
img_name
,
$params
[
'exclusive_img'
]);
}
else
{
$house_img_edit
[
$key
][
'id'
]
=
$v
->
id
;
$house_img_edit
[
$key
][
'img_status'
]
=
1
;
...
...
@@ -250,10 +241,7 @@ class GHousesImgs extends BaseModel
if
(
$exclusive_img
!=
''
)
{
foreach
(
$exclusive_img
as
$kk
=>
$vv
)
{
if
(
in_array
(
$v
->
img_name
,
$exclusive_img
))
{
$img_key
=
array_search
(
$v
->
img_name
,
$params
[
'exclusive_img'
]);
//根据值查找对应的key
if
(
$img_key
)
{
unset
(
$params
[
'exclusive_img'
][
$img_key
]);
}
$params
[
'exclusive_img'
]
=
del_array_string
(
$v
->
img_name
,
$params
[
'exclusive_img'
]);
}
else
{
$house_img_edit
[
$key
][
'id'
]
=
$v
->
id
;
$house_img_edit
[
$key
][
'img_status'
]
=
1
;
...
...
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