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
f00a8f73
Commit
f00a8f73
authored
Jan 31, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加商铺图片修改
parent
c0626aa1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
28 deletions
+24
-28
GHousesImgs.php
application/model/GHousesImgs.php
+24
-28
No files found.
application/model/GHousesImgs.php
View file @
f00a8f73
...
...
@@ -30,51 +30,47 @@ class GHousesImgs extends BaseModel
$insert_img
=
array
();
//1列表页封面图
if
(
$params
[
'cover'
])
{
$insert_img
[
'0'
][
'house_id'
]
=
$house_id
;
$insert_img
[
'0'
][
'img_type'
]
=
1
;
$insert_img
[
'0'
][
'img_name'
]
=
$params
[
'cover'
][
'0'
];
$insert_img
[
'0'
][
'create_time'
]
=
$params
[
'create_time'
];
$insert_img
[
'0'
][
'update_time'
]
=
$params
[
'update_time'
];
$count
=
count
(
$insert_img
)
+
1
;
$insert_img
[
$count
][
'house_id'
]
=
$house_id
;
$insert_img
[
$count
][
'img_type'
]
=
1
;
$insert_img
[
$count
][
'img_name'
]
=
$params
[
'cover'
][
'0'
];
$insert_img
[
$count
][
'create_time'
]
=
$params
[
'create_time'
];
$insert_img
[
$count
][
'update_time'
]
=
$params
[
'update_time'
];
$count
++
;
}
//2详情页轮播图
if
(
$params
[
'slide_show'
])
{
foreach
(
$params
[
'slide_show'
]
as
$k
=>
$v
)
{
$k
+=
$count
;
$insert_img
[
$k
][
'house_id'
]
=
$house_id
;
$insert_img
[
$k
][
'img_type'
]
=
2
;
$insert_img
[
$k
][
'img_name'
]
=
$v
;
$insert_img
[
$k
][
'create_time'
]
=
$params
[
'create_time'
];
$insert_img
[
$k
][
'update_time'
]
=
$params
[
'update_time'
];
}
if
(
count
(
$insert_img
)
>
0
)
{
$count
=
count
(
$insert_img
)
+
1
;
$insert_img
[
$count
][
'house_id'
]
=
$house_id
;
$insert_img
[
$count
][
'img_type'
]
=
2
;
$insert_img
[
$count
][
'img_name'
]
=
$v
;
$insert_img
[
$count
][
'create_time'
]
=
$params
[
'create_time'
];
$insert_img
[
$count
][
'update_time'
]
=
$params
[
'update_time'
];
$count
++
;
}
}
//3楼层平面图
if
(
$params
[
'plan'
])
{
foreach
(
$params
[
'plan'
]
as
$kk
=>
$vv
)
{
$
kk
+=
$count
;
$insert_img
[
$
kk
][
'house_id'
]
=
$house_id
;
$insert_img
[
$
kk
][
'img_type'
]
=
3
;
$insert_img
[
$
kk
][
'img_name'
]
=
$vv
;
$insert_img
[
$
kk
][
'create_time'
]
=
$params
[
'cre
ate_time'
];
$
insert_img
[
$kk
][
'update_time'
]
=
$params
[
'update_time'
]
;
$
insert_img
[
$count
][
'house_id'
]
=
$house_id
;
$insert_img
[
$
count
][
'img_type'
]
=
3
;
$insert_img
[
$
count
][
'img_name'
]
=
$vv
;
$insert_img
[
$
count
][
'create_time'
]
=
$params
[
'create_time'
]
;
$insert_img
[
$
count
][
'update_time'
]
=
$params
[
'upd
ate_time'
];
$
count
++
;
}
}
//4独家合同
if
(
$params
[
'exclusive_img'
])
{
foreach
(
$params
[
'exclusive_img'
]
as
$kk
=>
$vv
)
{
$
kk
+=
$count
;
$insert_img
[
$
kk
][
'house_id'
]
=
$house_id
;
$insert_img
[
$
kk
][
'img_type'
]
=
4
;
$insert_img
[
$
kk
][
'img_name'
]
=
$vv
;
$insert_img
[
$
kk
][
'create_time'
]
=
$params
[
'cre
ate_time'
];
$
insert_img
[
$kk
][
'update_time'
]
=
$params
[
'update_time'
]
;
$
insert_img
[
$count
][
'house_id'
]
=
$house_id
;
$insert_img
[
$
count
][
'img_type'
]
=
4
;
$insert_img
[
$
count
][
'img_name'
]
=
$vv
;
$insert_img
[
$
count
][
'create_time'
]
=
$params
[
'create_time'
]
;
$insert_img
[
$
count
][
'update_time'
]
=
$params
[
'upd
ate_time'
];
$
count
++
;
}
}
...
...
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