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
6ffe499f
Commit
6ffe499f
authored
Jan 22, 2018
by
刘丹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调用接口
parent
d1e4174b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
149 additions
and
10 deletions
+149
-10
houseList.html
application/index/view/houses/houseList.html
+10
-10
houseList.js
public/resource/js/houseList.js
+113
-0
house_template_tpl.html
public/resource/template/house_template_tpl.html
+26
-0
No files found.
application/index/view/houses/houseList.html
View file @
6ffe499f
{layout name="global/frame_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"ho
me
"
/>
<input
type=
"hidden"
class=
"page-load"
id=
"ho
useList
"
/>
<div
id=
"page-content-wrapper"
>
<div
class=
"container"
>
<div
class=
"row"
>
...
...
@@ -25,13 +25,13 @@
<tr>
<td
colspan=
"9"
>
<form
id=
"form_search"
>
<select
class=
"form-control btn2"
>
<option
class=
"successModel"
>
是否显示在首页
</option>
<option>
是
</option>
<option>
否
</option>
<select
class=
"form-control btn2"
id=
"is_carefully_chosen"
>
<option
value=
""
class=
"successModel"
>
是否显示在首页
</option>
<option
value=
"0"
>
是
</option>
<option
value=
"1"
>
否
</option>
</select>
<select
class=
"form-control btn2"
>
<option
class=
"successModel"
>
是否公开
</option>
<select
class=
"form-control btn2"
>
<option
class=
"successModel"
>
C端是否显示
</option>
<option>
是
</option>
<option>
否
</option>
</select>
...
...
@@ -64,9 +64,9 @@
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"admin_num"
placeholder=
"店铺编号"
type=
"text"
value=
""
>
<span
class=
"fore-span ld-Marheight"
>
上传时间:
</span>
<input
class=
"form-control btn
2
ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"start_date"
name=
"start_date"
type=
"date"
>
<input
class=
"form-control btn
4
ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"start_date"
name=
"start_date"
type=
"date"
>
<span
class=
"fore-span ld-Marheight"
>
-
</span>
<input
class=
"form-control btn
2
ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"end_date"
name=
"end_date"
type=
"date"
>
<input
class=
"form-control btn
4
ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"end_date"
name=
"end_date"
type=
"date"
>
<span
class=
"btn btn-default btn3 ld-Marheight"
id=
"search"
>
搜索
</span>
<span
class=
"btn btn-default btn3 ld-Marheight"
id=
"form_search_reset"
>
重置
</span>
...
...
@@ -103,7 +103,7 @@
<a
class=
"btn1 btn-success "
href=
"#modal-process"
data-toggle=
"modal"
data-id=
"77"
onclick=
"alertFollow(this)"
>
设置案场权限人
</a>
<a
class=
"btn1 btn-success "
href=
"#modal-process"
data-toggle=
"modal"
data-id=
"77"
onclick=
"alertFollow(this)"
>
是否独家
</a>
<a
class=
"btn1 btn-success "
href=
"#modal-process"
data-toggle=
"modal"
data-id=
"77"
onclick=
"alertFollow(this)"
>
操作记录
</a>
<a
data-toggle=
"modal"
data-id=
"77"
href=
"#modal-watch"
class=
"btn1 btn-danger add_applies"
>
删除
</a>
<a
data-toggle=
"modal"
data-id=
"77"
href=
"#modal-watch"
class=
"btn1 btn-danger add_applies"
onclick=
"delete_house(4720)"
>
删除
</a>
</td>
</tr>
<tr>
...
...
public/resource/js/houseList.js
0 → 100644
View file @
6ffe499f
/**
* Created by 刘丹 on 2017/12/11.
*/
define
([
'doT'
,
'text!temp/business_district_template_tpl.html'
,
'css!style/home.css'
,
'pagination'
,
'bootstrapJs'
],
function
(
doT
,
template
)
{
business
=
{
pageNo
:
1
,
/*第几页*/
pageSize
:
10
,
/*每页显示多少条*/
id
:
''
,
init
:
function
()
{
//初始化dot
$
(
"body"
).
append
(
template
);
business
.
getList
();
business
.
event
();
},
event
:
function
()
{
$
(
"#search"
).
click
(
function
()
{
business
.
getList
(
1
);
});
$
(
"#reset"
).
click
(
function
()
{
document
.
getElementById
(
"form_search"
).
reset
();
});
$
(
"#modal_add"
).
click
(
function
()
{
$
(
"#title"
).
html
(
'新增商圈'
);
business
.
getRegionsProvince
(
310000
,
310100
,
310101
);
//默认上海,上海,黄浦
});
$
(
"#province"
).
change
(
function
()
{
business
.
getRegionsCity
();
});
$
(
"#city"
).
change
(
function
()
{
business
.
getRegionsDisc
();
});
$
(
document
).
delegate
(
".del_modal"
,
"click"
,
function
()
{
business
.
id
=
$
(
this
).
attr
(
"data-id"
);
});
$
(
document
).
delegate
(
"#confirm_delete"
,
"click"
,
function
()
{
business
.
delBusiness
();
});
$
(
document
).
delegate
(
".is_show"
,
"click"
,
function
()
{
if
(
!
confirm
(
'是否继续?'
))
{
return
;
}
business
.
id
=
$
(
this
).
attr
(
"data-id"
);
var
params
=
{};
params
.
id
=
$
(
this
).
attr
(
"data-id"
);
var
str
=
$
.
trim
(
$
(
this
).
html
());
if
(
str
===
"不显示"
)
{
params
.
type
=
1
;
$
(
this
).
html
(
'显示'
);
}
else
{
params
.
type
=
0
;
$
(
this
).
html
(
'不显示'
);
}
});
},
getList
:
function
(
pageNo
)
{
business
.
pageNo
=
pageNo
;
var
params
=
{};
params
.
pageNo
=
business
.
pageNo
;
params
.
pageSize
=
business
.
pageSize
;
params
.
is_carefully_chosen
=
$
(
'#is_carefully_chosen option:selected'
)
.
val
();
$
.
ajax
({
url
:
'/index/getHouseList.html'
,
//获取列表
type
:
'GET'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
var
temp
=
document
.
getElementById
(
'business_list_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
$
(
"#business_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
/*分页代码*/
$
(
"#pagediv"
).
pagination
({
length
:
data
.
data
.
total
,
current
:
pageNo
,
every
:
business
.
pageSize
,
onClick
:
function
(
el
)
{
business
.
getList
(
el
.
num
.
current
);
}
});
}
});
},
delBusiness
:
function
()
{
$
.
ajax
({
url
:
'/index/delBusinessDistrict.html'
,
type
:
'POST'
,
async
:
true
,
data
:
{
"id"
:
business
.
id
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
business
.
getList
(
1
);
$
(
"#modal-delete"
).
modal
(
'hide'
);
}
else
{
$
(
"#del_msg"
).
html
(
'<span style="color: red">删除失败!</span>'
);
}
}
});
}
};
return
business
;
});
\ No newline at end of file
public/resource/template/house_template_tpl.html
0 → 100644
View file @
6ffe499f
<script
id=
"house_list_tpl"
type=
"text/template"
>
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
class
=
"text-center"
>
<
td
>
[
%=
it
[
item
][
'id'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'title'
]
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
'description'
])
{
%
]
[
%=
it
[
item
][
'description'
]
%
]
[
%
}
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"status"
]
%
]
<
/td
>
<
td
>
<
a
title
=
"编辑"
class
=
"btn btn-success btn-xs"
href
=
"/admin.php/index/roleedit?id=[%= it[item]['id']%].html"
style
=
"margin-right:6px;"
>
编辑
<
/a
>
<
a
title
=
"权限分配"
class
=
"btn btn-info btn-xs"
href
=
"/admin.php/index/access?id=[%= it[item]['id']%].html"
style
=
"margin-right:6px;"
>
权限分配
<
/a
>
<
a
title
=
"成员授权"
class
=
"btn btn-primary btn-xs"
href
=
"/admin.php/index/accessUser?id=[%= it[item]['id']%].html"
style
=
"margin-right:6px;"
>
成员授权
<
/a
>
<
/td
>
<
/tr
>
[
%
}
%
]
[
%
}
else
{
%
]
<
tr
>
<
td
colspan
=
"8"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
/tr
>
[
%
}
%
]
</script>
\ No newline at end of file
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