Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
fenzhan_zsb
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
esf
fenzhan_zsb
Commits
0e425f50
Commit
0e425f50
authored
Aug 05, 2020
by
zhangkuanguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bug-img-cover-delete' into tmp-8-5
parents
d5dc2e9e
963f994b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
sell.php
new_admincp/applications/zsb/controllers/sell.php
+8
-2
pic_model.php
new_admincp/applications/zsb/models/pic_model.php
+11
-2
No files found.
new_admincp/applications/zsb/controllers/sell.php
View file @
0e425f50
...
...
@@ -2761,8 +2761,14 @@ class Sell extends MY_Controller {
$pic1
=
reset
(
$imageUrlArr
);
$pic1
=
preg_match
(
"#\?#"
,
$pic1
)
?
substr
(
$pic1
,
0
,
strpos
(
$pic1
,
'?'
))
:
$pic1
;
}
}
else
{
// 封面 房源 360 都不存在图片 获取小区封面图 如果不存在封面图则房源封面图为空
//查找小区的封面图
$this
->
block_model
->
set_select_fields
(
array
(
'b_img'
));
$block
=
$this
->
block_model
->
find_by_id
(
$blockid
);
$pic1
=
(
isset
(
$block
[
'b_img'
])
&&
$block
[
'b_img'
])
?
$block
[
'b_img'
]
:
''
;
}
//加载业务模块
$this
->
load
->
model
(
'pic_model'
);
$houseRelationPicInfo
=
$this
->
pic_model
->
get_house_pic
(
'1'
,
$house_id
);
...
...
new_admincp/applications/zsb/models/pic_model.php
View file @
0e425f50
...
...
@@ -1003,8 +1003,17 @@ class Pic_model extends MY_Model {
{
$this
->
db
->
where
(
'sort'
,
$sort
);
}
return
$this
->
db
->
get
(
$uploadtable
)
->
result_array
();
$housePic
=
$this
->
db
->
get
(
$uploadtable
)
->
result_array
();
// 增加与封面图相同格式的图片地址(封面地址不包含?之后的数据)
foreach
(
$housePic
as
&
$item
)
{
// 判断是否存在filename字段,防止程序出错
if
(
isset
(
$item
[
'filename'
])
&&
$item
[
'filename'
])
{
$subLength
=
strpos
(
$item
[
'filename'
],
'?'
);
$item
[
'img_url'
]
=
$subLength
?
substr
(
$item
[
'filename'
],
0
,
$subLength
)
:
$item
[
'filename'
];
}
}
return
$housePic
;
}
/**
...
...
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