切换导航条
此项目
正在载入...
登录
景龙
/
xingqiu
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
差异文件
浏览文件
作者
zhangwei
6 years ago
提交
f9cff35d4ff6616a29e30f76b35dbaa907882758
2 个父辈
1874ae07
f89335ba
Merge branch 'master' of
http://114.215.101.231:8099/jinglong/xingqiu
隐藏空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
87 行增加
和
1 行删除
app/portal/controller/AdminRegionGalleryController.php
app/portal/controller/RegionController.php
public/themes/admin_simpleboot3/portal/admin_region_gallery/add.html
public/themes/admin_simpleboot3/portal/admin_region_gallery/edit.html
public/themes/simpleboot3_mobile/portal/region/get_gallery_detail.html
app/portal/controller/AdminRegionGalleryController.php
查看文件 @
f9cff35
...
...
@@ -98,6 +98,15 @@ class AdminRegionGalleryController extends AdminBaseController
}
}
//移动相册
if
(
!
empty
(
$data
[
'm_photo_names'
])
&&
!
empty
(
$data
[
'm_photo_urls'
]))
{
$data
[
'post'
][
'more'
][
'm_photos'
]
=
[];
foreach
(
$data
[
'm_photo_urls'
]
as
$key
=>
$url
)
{
$photoUrl
=
cmf_asset_relative_url
(
$url
);
array_push
(
$data
[
'post'
][
'more'
][
'm_photos'
],
[
"url"
=>
$photoUrl
,
"name"
=>
$data
[
'm_photo_names'
][
$key
]]);
}
}
if
(
!
empty
(
$data
[
'file_names'
])
&&
!
empty
(
$data
[
'file_urls'
]))
{
$data
[
'post'
][
'more'
][
'files'
]
=
[];
foreach
(
$data
[
'file_urls'
]
as
$key
=>
$url
)
{
...
...
@@ -171,6 +180,7 @@ class AdminRegionGalleryController extends AdminBaseController
$portalPostModel
=
new
PortalPostModel
();
//pc相册
if
(
!
empty
(
$data
[
'photo_names'
])
&&
!
empty
(
$data
[
'photo_urls'
]))
{
$data
[
'post'
][
'more'
][
'photos'
]
=
[];
foreach
(
$data
[
'photo_urls'
]
as
$key
=>
$url
)
{
...
...
@@ -178,6 +188,15 @@ class AdminRegionGalleryController extends AdminBaseController
array_push
(
$data
[
'post'
][
'more'
][
'photos'
],
[
"url"
=>
$photoUrl
,
"name"
=>
$data
[
'photo_names'
][
$key
]]);
}
}
//移动相册
if
(
!
empty
(
$data
[
'm_photo_names'
])
&&
!
empty
(
$data
[
'm_photo_urls'
]))
{
$data
[
'post'
][
'more'
][
'm_photos'
]
=
[];
foreach
(
$data
[
'm_photo_urls'
]
as
$key
=>
$url
)
{
$photoUrl
=
cmf_asset_relative_url
(
$url
);
array_push
(
$data
[
'post'
][
'more'
][
'm_photos'
],
[
"url"
=>
$photoUrl
,
"name"
=>
$data
[
'm_photo_names'
][
$key
]]);
}
}
if
(
!
empty
(
$data
[
'file_names'
])
&&
!
empty
(
$data
[
'file_urls'
]))
{
$data
[
'post'
][
'more'
][
'files'
]
=
[];
...
...
app/portal/controller/RegionController.php
查看文件 @
f9cff35
...
...
@@ -236,6 +236,7 @@ class RegionController extends HomeBaseController
if
(
$res
){
$more
=
json_decode
(
$res
[
'more'
],
true
);
$res
[
'image_url'
]
=
isset
(
$more
[
'photos'
])
&&
!
empty
(
$more
[
'photos'
])
?
$more
[
'photos'
]
:
''
;
$res
[
'm_image_url'
]
=
isset
(
$more
[
'm_photos'
])
&&
!
empty
(
$more
[
'm_photos'
])
?
$more
[
'm_photos'
]
:
''
;
}
$this
->
assign
(
'res'
,
$res
);
return
$this
->
fetch
();
...
...
public/themes/admin_simpleboot3/portal/admin_region_gallery/add.html
查看文件 @
f9cff35
...
...
@@ -15,6 +15,18 @@
<
a
href
=
"javascript:(function(){$('#saved-image{id}').remove();})();"
>
移除
<
/a
>
<
/li
>
</script>
<!--移动相册-->
<script
type=
"text/html"
id=
"m_photos-item-tpl"
>
<
li
id
=
"m_saved-image{id}"
>
<
input
id
=
"m_photo-{id}"
type
=
"hidden"
name
=
"m_photo_urls[]"
value
=
"{filepath}"
>
<
input
class
=
"form-control"
id
=
"m_photo-{id}-name"
type
=
"text"
name
=
"m_photo_names[]"
value
=
"{name}"
style
=
"width: 200px;"
title
=
"图片名称"
>
<
img
id
=
"m_photo-{id}-preview"
src
=
"{url}"
style
=
"height:36px;width: 36px;"
onclick
=
"imagePreviewDialog(this.src);"
>
<
a
href
=
"javascript:uploadOneImage('图片上传','#m_photo-{id}');"
>
替换
<
/a
>
<
a
href
=
"javascript:(function(){$('#m_saved-image{id}').remove();})();"
>
移除
<
/a
>
<
/li
>
</script>
<script
type=
"text/html"
id=
"files-item-tpl"
>
<
li
id
=
"saved-file{id}"
>
<
input
id
=
"file-{id}"
type
=
"hidden"
name
=
"file_urls[]"
value
=
"{filepath}"
>
...
...
@@ -54,6 +66,17 @@
</td>
</tr>
<tr>
<th>
移动相册
<span
class=
"form-required"
>
*
</span></th>
<td>
<ul
id=
"m_photos"
class=
"pic-list list-unstyled form-inline"
></ul>
<a
href=
"javascript:uploadMultiImage('图片上传','#m_photos','m_photos-item-tpl');"
class=
"btn btn-default btn-sm"
>
选择图片
</a>
<div
style=
"margin-top:30px;"
>
<span
class=
"form-required"
>
图片参考尺寸:420*740
</span>
</div>
</td>
</tr>
<tr>
<th>
权重
</th>
<td>
<input
class=
"form-control"
type=
"number"
name=
"post[weigh]"
value=
"0"
>
...
...
public/themes/admin_simpleboot3/portal/admin_region_gallery/edit.html
查看文件 @
f9cff35
...
...
@@ -15,6 +15,19 @@
<
a
href
=
"javascript:(function(){$('#saved-image{id}').remove();})();"
>
移除
<
/a
>
<
/li
>
</script>
<!--移动端相册-->
<script
type=
"text/html"
id=
"m_photos-item-tpl"
>
<
li
id
=
"m_saved-image{id}"
>
<
input
id
=
"m_photo-{id}"
type
=
"hidden"
name
=
"m_photo_urls[]"
value
=
"{filepath}"
>
<
input
class
=
"form-control"
id
=
"m_photo-{id}-name"
type
=
"text"
name
=
"m_photo_names[]"
value
=
"{name}"
style
=
"width: 200px;"
title
=
"图片名称"
>
<
img
id
=
"m_photo-{id}-preview"
src
=
"{url}"
style
=
"height:36px;width: 36px;"
onclick
=
"imagePreviewDialog(this.src);"
>
<
a
href
=
"javascript:uploadOneImage('图片上传','#m_photo-{id}');"
>
替换
<
/a
>
<
a
href
=
"javascript:(function(){$('#m_saved-image{id}').remove();})();"
>
移除
<
/a
>
<
/li
>
</script>
<script
type=
"text/html"
id=
"files-item-tpl"
>
<
li
id
=
"saved-file{id}"
>
<
input
id
=
"file-{id}"
type
=
"hidden"
name
=
"file_urls[]"
value
=
"{filepath}"
>
...
...
@@ -77,6 +90,36 @@
</td>
</tr>
<tr>
<th>
移动相册
<span
class=
"form-required"
>
*
</span></th>
<td>
<ul
id=
"m_photos"
class=
"pic-list list-unstyled form-inline"
>
<notempty
name=
"post.more.m_photos"
>
<foreach
name=
"post.more.m_photos"
item=
"vo"
>
<php>
$img_url=cmf_get_image_preview_url($vo['url']);
</php>
<li
id=
"m_saved-image{$key}"
>
<input
id=
"m_photo-{$key}"
type=
"hidden"
name=
"m_photo_urls[]"
value=
"{$vo.url}"
>
<input
class=
"form-control"
id=
"m_photo-{$key}-name"
type=
"text"
name=
"m_photo_names[]"
value=
"{$vo.name|default=''}"
style=
"width: 200px;"
title=
"图片名称"
>
<img
id=
"m_photo-{$key}-preview"
src=
"{:cmf_get_image_preview_url($vo['url'])}"
style=
"height:36px;width: 36px;"
onclick=
"parent.imagePreviewDialog(this.src);"
>
<a
href=
"javascript:uploadOneImage('图片上传','#m_photos-{$key}');"
>
替换
</a>
<a
href=
"javascript:(function(){$('#m_saved-image{$key}').remove();})();"
>
移除
</a>
</li>
</foreach>
</notempty>
</ul>
<a
href=
"javascript:uploadMultiImage('图片上传','#m_photos','m_photos-item-tpl');"
class=
"btn btn-sm btn-default"
>
选择图片
</a>
<div
style=
"margin-top:30px;"
>
<span
class=
"form-required"
>
图片参考尺寸:420*740
</span>
</div>
</td>
</tr>
<tr>
<th>
权重
</th>
<td>
<input
class=
"form-control"
type=
"number"
name=
"post[weigh]"
value=
"{$post.weigh}"
>
...
...
public/themes/simpleboot3_mobile/portal/region/get_gallery_detail.html
查看文件 @
f9cff35
...
...
@@ -48,7 +48,7 @@
<body>
<div
class=
"index_fourth swiper-container"
>
<ul
class=
"swiper-wrapper"
>
<volist
name=
"res['image_url']"
id=
"vo"
>
<volist
name=
"res['
m_
image_url']"
id=
"vo"
>
<li
class=
"swiper-slide"
>
<!-- <img src="__TMPL__/public/assets/images/cicon_43@2x.png" alt=""> -->
<img
src=
"{:cmf_get_image_url($vo.url)}"
alt=
""
/>
...
...
请
注册
或
登录
后发表评论