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
b3e485e7
Commit
b3e485e7
authored
Aug 31, 2018
by
xinyuandu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商铺图库
parent
aacfcb59
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
96 additions
and
75 deletions
+96
-75
picture_show.html
application/index/view/picture/picture_show.html
+19
-17
pictureShow.js
public/resource/js/pictureShow.js
+77
-58
No files found.
application/index/view/picture/picture_show.html
View file @
b3e485e7
...
@@ -29,23 +29,23 @@
...
@@ -29,23 +29,23 @@
</div>
</div>
<div
class=
"panel-body"
>
<div
class=
"panel-body"
>
<div
class=
"table-responsive"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<thead>
<thead>
<tr>
<tr>
<td
colspan=
"10"
>
<td
colspan=
"10"
>
<form
id=
"form_search"
>
<form
id=
"form_search"
>
<div
class=
"col-xs-1
2 ld-Marheight p-a-0"
>
<div
class=
"col-xs-1
1 ld-Marheight p-a-0"
>
<select
class=
"form-control btn2"
id=
"
shop
_type"
>
<select
class=
"form-control btn2"
id=
"
yetai
_type"
>
<option
value=
"-1"
>
业态标签
</option>
<option
value=
"-1"
>
业态标签
</option>
<option
value=
"0"
>
商场美食
</option>
<!--
<option value="0">商场美食</option>
<option
value=
"1"
>
临街餐饮
</option>
<option value="1">临街餐饮</option>
-->
</select>
</select>
<select
class=
"form-control btn2"
id=
"
yt
_type"
>
<select
class=
"form-control btn2"
id=
"
p
_type"
>
<option
value=
"-1"
>
图片类型
</option>
<option
value=
"-1"
>
图片类型
</option>
<
option
value=
"0"
>
人群
图
</option>
<
!--<option value="0">室外
图</option>
<option value="1">室内图</option>
<option value="1">室内图</option>
<option
value=
"2"
>
室外图
</option
>
<option value="2">
人群图</option>--
>
</select>
</select>
<span
class=
"btn btn-info btn3 "
id=
"search"
>
筛选
</span>
<span
class=
"btn btn-info btn3 "
id=
"search"
>
筛选
</span>
</div>
</div>
...
@@ -61,12 +61,6 @@
...
@@ -61,12 +61,6 @@
</tr>
</tr>
</thead>
</thead>
<tbody
class=
"text-center"
id=
"picture_list"
></tbody>
<tbody
class=
"text-center"
id=
"picture_list"
></tbody>
<tr>
<th>
111
</th><th>
111
</th>
<th>
111
</th>
<th>
111
</th>
<th>
111
</th>
</tr>
</table>
</table>
</div>
</div>
<!-- /#page-content-wrapper -->
<!-- /#page-content-wrapper -->
...
@@ -149,6 +143,14 @@
...
@@ -149,6 +143,14 @@
<h4
class=
"modal-title"
>
查看
</h4>
<h4
class=
"modal-title"
>
查看
</h4>
</div>
</div>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
>
<div
class=
"col-xs-12 picture-area p-a-0"
>
<div
class=
"col-xs-3 p-a-0"
>
<label>
创建时间:
</label>
</div>
<div
class=
"col-xs-9 p-a-0"
>
<span
id=
"creat_time"
></span>
</div>
</div>
<div
class=
"col-xs-12 picture-area p-a-0"
>
<div
class=
"col-xs-12 picture-area p-a-0"
>
<div
class=
"col-xs-3 p-a-0"
>
<div
class=
"col-xs-3 p-a-0"
>
<label>
图片类型:
</label>
<label>
图片类型:
</label>
...
@@ -157,7 +159,7 @@
...
@@ -157,7 +159,7 @@
<span
id=
"picture_type_show"
></span>
<span
id=
"picture_type_show"
></span>
</div>
</div>
</div>
</div>
<div
class=
"col-xs-12 yetai-area p-a-0"
>
<div
class=
"col-xs-12 yetai-area p-a-0
yetai_is_show
"
>
<div
class=
"col-xs-3 p-a-0"
>
<div
class=
"col-xs-3 p-a-0"
>
<label>
业态标签:
</label>
<label>
业态标签:
</label>
</div>
</div>
...
@@ -177,7 +179,7 @@
...
@@ -177,7 +179,7 @@
<input class="btn btn-default" type="file" id="file_input" class="" data-limittop="10" /> -->
<!--修改上传文件的最大数字-->
<input class="btn btn-default" type="file" id="file_input" class="" data-limittop="10" /> -->
<!--修改上传文件的最大数字-->
<!--<button class="btn btn-default">选择图片</button>
<!--<button class="btn btn-default">选择图片</button>
</div>-->
</div>-->
<div
class=
"col-xs-12 img_area"
>
<div
class=
"col-xs-12 img_area
_show
"
>
</div>
</div>
</div>
</div>
...
...
public/resource/js/pictureShow.js
View file @
b3e485e7
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* time : 2018/08/30
* time : 2018/08/30
* about : 商铺图库
* about : 商铺图库
*/
*/
define
([
'doT'
,
'text!temp/p
honelist
_template_tpl.html'
,
'css!style/home.css'
,
'ckfinder'
,
'ckfinderStart'
,
'pagination'
,
'bootstrapJs'
],
function
(
doT
,
template
)
{
define
([
'doT'
,
'text!temp/p
icture_add
_template_tpl.html'
,
'css!style/home.css'
,
'ckfinder'
,
'ckfinderStart'
,
'pagination'
,
'bootstrapJs'
],
function
(
doT
,
template
)
{
picture
=
{
picture
=
{
pageNo
:
1
,
/*第几页*/
pageNo
:
1
,
/*第几页*/
pageSize
:
10
,
/*每页显示多少条*/
pageSize
:
10
,
/*每页显示多少条*/
...
@@ -19,21 +19,18 @@ define (['doT', 'text!temp/phonelist_template_tpl.html', 'css!style/home.css','c
...
@@ -19,21 +19,18 @@ define (['doT', 'text!temp/phonelist_template_tpl.html', 'css!style/home.css','c
init
:
function
()
{
init
:
function
()
{
//初始化dot
//初始化dot
$
(
"body"
).
append
(
template
);
$
(
"body"
).
append
(
template
);
picture
.
getList
();
picture
.
event
();
picture
.
event
();
picture
.
getYetai
(
$
(
'#yetai_type'
),
$
(
'#p_type'
),
false
)
picture
.
getList
(
1
);
},
},
event
:
function
()
{
event
:
function
()
{
$
(
"#search"
).
click
(
function
()
{
$
(
"#search"
).
click
(
function
()
{
picture
.
getList
(
1
);
picture
.
getList
(
1
);
});
});
/*
$("#reset").click(function () {//重置
$("#reset").click(function () {//重置
document.getElementById("form_search").reset();
document.getElementById("form_search").reset();
});
});*/
$
(
'#add_picture'
).
click
(
function
(){
});
$
(
document
).
delegate
(
"#confirm_delete"
,
"click"
,
function
(
e
)
{
$
(
document
).
delegate
(
"#confirm_delete"
,
"click"
,
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
...
@@ -42,9 +39,18 @@ define (['doT', 'text!temp/phonelist_template_tpl.html', 'css!style/home.css','c
...
@@ -42,9 +39,18 @@ define (['doT', 'text!temp/phonelist_template_tpl.html', 'css!style/home.css','c
picture
.
delBusiness
();
picture
.
delBusiness
();
});
});
$
(
document
).
on
(
'click'
,
'.is_show'
,
function
(
e
){
picture
.
getDataByParams
(
e
.
target
.
dataset
.
id
);
});
$
(
'#modal-show'
).
on
(
'show.bs.modal'
,
function
(){
picture
.
getYetai
(
$
(
'#yetai_id'
),
$
(
'#leased'
),
true
);
});
$
(
'#modal'
).
on
(
'show.bs.modal'
,
function
(){
$
(
'#modal'
).
on
(
'show.bs.modal'
,
function
(){
picture
.
getYetai
();
picture
.
getYetai
(
$
(
'#yetai_id'
),
$
(
'#leased'
),
true
);
});
});
$
(
'#modal'
).
on
(
'hide.bs.modal'
,
function
(){
$
(
'#modal'
).
on
(
'hide.bs.modal'
,
function
(){
$
(
'#yetai_id'
).
empty
();
$
(
'#yetai_id'
).
empty
();
});
});
...
@@ -129,64 +135,64 @@ define (['doT', 'text!temp/phonelist_template_tpl.html', 'css!style/home.css','c
...
@@ -129,64 +135,64 @@ define (['doT', 'text!temp/phonelist_template_tpl.html', 'css!style/home.css','c
var
params
=
{};
var
params
=
{};
params
.
pageNo
=
picture
.
pageNo
;
params
.
pageNo
=
picture
.
pageNo
;
params
.
pageSize
=
picture
.
pageSize
;
params
.
pageSize
=
picture
.
pageSize
;
params
.
type
=
$
(
'#shop_type option:selected'
).
val
();
params
.
img_type
=
$
(
'#p_type option:selected'
).
val
()
==
-
1
?
''
:
$
(
'#p_type option:selected'
).
val
();
params
.
yetai
=
$
(
'#yt_type option:selected'
).
val
();
if
(
params
.
img_type
==
2
){
params
.
label
=
''
;
}
else
{
params
.
label
=
$
(
'#yetai_type option:selected'
).
val
()
==-
1
?
''
:
$
(
'#yetai_type option:selected'
).
html
();
}
$
.
ajax
({
$
.
ajax
({
url
:
'/
index/bindPhone
List'
,
//获取列表
url
:
'/
api/getImageDepot
List'
,
//获取列表
type
:
'GET'
,
type
:
'GET'
,
async
:
true
,
async
:
true
,
data
:
params
,
data
:
params
,
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
var
temp
=
document
.
getElementById
(
'p
honelist_list
_tpl'
).
innerHTML
;
var
temp
=
document
.
getElementById
(
'p
icture_add_template
_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
var
doTtmpl
=
doT
.
template
(
temp
);
$
(
"#p
honelist
_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
$
(
"#p
icture
_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
/*分页代码*/
/*分页代码*/
add_page
(
data
.
data
.
total
,
pageNo
,
picture
.
pageSize
,
picture
.
getList
);
add_page
(
data
.
data
.
total
,
pageNo
,
picture
.
pageSize
,
picture
.
getList
);
$
(
"#pagediv"
).
pagination
({
length
:
data
.
data
.
total
,
current
:
pageNo
,
every
:
picture
.
pageSize
,
onClick
:
function
(
el
)
{
picture
.
getList
(
el
.
num
.
current
);
}
});
}
}
});
});
},
},
//查看功能获取数据
//查看功能获取数据
getDataByParams
:
function
(){
getDataByParams
:
function
(
id
){
var
params
=
{};
var
url
=
''
;
$
.
ajax
({
$
.
ajax
({
url
:
url
,
//获取列表
url
:
'/api/getImageDepotById'
,
//获取列表
type
:
'GET'
,
type
:
'GET'
,
async
:
true
,
async
:
true
,
data
:
params
,
data
:
{
'id'
:
id
}
,
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
var
img_type
=
''
;
var
img_label
=
''
;
var
image_show
=
""
;
image_show
+=
'<image width:100% src="'
+
data
.
data
.
list
.
img_file_path
+
'/'
+
data
.
data
.
list
.
img_name
+
'">"</image>'
;
if
(
data
.
data
.
list
.
img_type
==
0
){
img_type
=
"室外图"
;
}
else
if
(
data
.
data
.
list
.
img_type
==
1
){
img_type
=
"室内图"
;
}
else
{
$
(
'#yetai_is_show'
).
hide
();
img_type
=
"人群图"
;
}
$
(
'#picture_type_show'
).
text
();
$
(
'#picture_type_show'
).
text
();
var
str_yetai
=
''
;
$
(
'#creat_time'
).
text
(
data
.
data
.
list
.
create_time
);
$
.
each
(
data
.
data
.
yetai
,
function
(
i
,
item
)
{
$
(
'#picture_type_show'
).
text
(
img_type
);
if
(
item
!=
'全部'
){
$
(
'#yetai_id_show'
).
text
(
data
.
data
.
list
.
label
);
str_yetai
+=
'<div class="col-xs-3" style="padding:0px;text-align:center;margin:8px 0px;">'
;
$
(
'.img_area_show'
).
append
(
image_show
);
str_yetai
+=
' <div class="yetai_checkbox" style="width:80px;border:1px solid black ; background-color : #ffffff;" >'
+
item
+
'</div>'
;
str_yetai
+=
'</div>'
;
}
else
{
str_yetai
+=
'<div class="col-xs-3" style="padding:0px;text-align:center;margin:8px 0px;">'
;
str_yetai
+=
' <div class="yetai_checkbox" style="width:80px;border:1px solid black ; background-color : #ffffff;" >'
+
全部
+
'</div>'
;
str_yetai
+=
'</div>'
;
}
});
$
(
'#yetai_id_show'
).
append
(
tag
);
}
}
});
});
},
},
//获取业态
//获取业态
getYetai
:
function
()
{
getYetai
:
function
(
$yetai
,
$pt
,
isModal
)
{
$
.
ajax
({
$
.
ajax
({
url
:
'/api/getImageTypeLabel'
,
url
:
'/api/getImageTypeLabel'
,
type
:
'GET'
,
type
:
'GET'
,
...
@@ -198,9 +204,31 @@ define (['doT', 'text!temp/phonelist_template_tpl.html', 'css!style/home.css','c
...
@@ -198,9 +204,31 @@ define (['doT', 'text!temp/phonelist_template_tpl.html', 'css!style/home.css','c
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
var
str_yetai
=
''
;
var
str_yetai
=
''
;
var
img_type
=
'<option value="-1">图片类型</option>'
;
var
img_type
=
''
;
$
(
'#yetai_id'
).
empty
();
if
(
isModal
)
{
$
(
'#leased'
).
empty
();
$yetai
.
empty
();
$pt
.
empty
();
//加载业态标签
$
.
each
(
data
.
data
.
label_type
,
function
(
i
,
item
)
{
if
(
item
!=
'全部'
){
str_yetai
+=
'<div class="col-xs-3" style="padding:0px;text-align:center;margin:8px 0px;">'
;
str_yetai
+=
' <div class="yetai_checkbox" id="'
+
i
+
'" style="width:80px;border:1px solid black ; background-color : #ffffff;" >'
+
item
+
'</div>'
;
str_yetai
+=
'</div>'
;
}
else
{
str_yetai
+=
'<div class="col-xs-3" style="padding:0px;text-align:center;margin:8px 0px;">'
;
str_yetai
+=
' <div class="yetai_checkbox" style="width:80px;border:1px solid black ; background-color : #ffffff;" >全部</div>'
;
str_yetai
+=
'</div>'
;
}
});
}
else
{
$
.
each
(
data
.
data
.
label_type
,
function
(
i
,
item
)
{
str_yetai
+=
'<option value="'
+
i
+
'">'
;
str_yetai
+=
item
;
str_yetai
+=
'</option>'
;
});
}
//加载图片类型下拉框
//加载图片类型下拉框
$
.
each
(
data
.
data
.
img_type
,
function
(
i
,
item
)
{
$
.
each
(
data
.
data
.
img_type
,
function
(
i
,
item
)
{
if
(
item
){
if
(
item
){
...
@@ -209,20 +237,9 @@ define (['doT', 'text!temp/phonelist_template_tpl.html', 'css!style/home.css','c
...
@@ -209,20 +237,9 @@ define (['doT', 'text!temp/phonelist_template_tpl.html', 'css!style/home.css','c
img_type
+=
'</option>'
;
img_type
+=
'</option>'
;
}
}
});
});
//加载业态标签
$
.
each
(
data
.
data
.
label_type
,
function
(
i
,
item
)
{
$yetai
.
append
(
str_yetai
);
if
(
item
!=
'全部'
){
$pt
.
append
(
img_type
);
str_yetai
+=
'<div class="col-xs-3" style="padding:0px;text-align:center;margin:8px 0px;">'
;
str_yetai
+=
' <div class="yetai_checkbox" id="'
+
i
+
'" style="width:80px;border:1px solid black ; background-color : #ffffff;" >'
+
item
+
'</div>'
;
str_yetai
+=
'</div>'
;
}
else
{
str_yetai
+=
'<div class="col-xs-3" style="padding:0px;text-align:center;margin:8px 0px;">'
;
str_yetai
+=
' <div class="yetai_checkbox" style="width:80px;border:1px solid black ; background-color : #ffffff;" >全部</div>'
;
str_yetai
+=
'</div>'
;
}
});
$
(
'#yetai_id'
).
append
(
str_yetai
);
$
(
'#leased'
).
append
(
img_type
);
}
}
}
}
});
});
...
@@ -248,8 +265,10 @@ define (['doT', 'text!temp/phonelist_template_tpl.html', 'css!style/home.css','c
...
@@ -248,8 +265,10 @@ define (['doT', 'text!temp/phonelist_template_tpl.html', 'css!style/home.css','c
if
(
picture
.
lastPicture
){
if
(
picture
.
lastPicture
){
alert
(
"图片上传成功"
);
alert
(
"图片上传成功"
);
picture
.
lastPicture
=
false
;
picture
.
lastPicture
=
false
;
window
.
location
.
href
=
'/index/pictureShow'
;
}
}
}
}
}
}
});
});
...
...
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