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
0588f021
Commit
0588f021
authored
Jan 24, 2018
by
刘丹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
列表 接口
parent
fc2accb5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
218 additions
and
21 deletions
+218
-21
houseList.html
application/index/view/houses/houseList.html
+32
-16
home.css
public/resource/css/home.css
+73
-0
qdao-sha.png
public/resource/image/qdao-sha.png
+0
-0
houseList.js
public/resource/js/houseList.js
+108
-0
house_template_tpl.html
public/resource/template/house_template_tpl.html
+5
-5
No files found.
application/index/view/houses/houseList.html
View file @
0588f021
...
...
@@ -156,20 +156,35 @@
</div>
<!-- /.modal -->
</div>
<!--设置案场权限人-->
<div
id=
"modal_panf1"
>
<div
class=
"modal_con"
>
<div
class=
"modal-header"
>
<button
class=
"close"
data-dismiss=
"modal"
type=
"button"
>
×
</button>
<h3>
设置案场权限人
</h3>
</div>
<form
action=
"/Houseinfos/agent_prv"
method=
"POST"
id=
"submit_agent"
>
<div
class=
"jian_class"
><input
type=
"hidden"
value=
"59"
><input
name=
"phone[]"
placeholder=
"请输入"
type=
"tel"
style=
"margin-left: 10px;float: left"
class=
"phone_add"
><ul
class=
"phone_list1"
></ul><img
src=
"/mobile4.0/images/qdao-sha.png"
class=
"jian"
></div>
<img
src=
"/mobile4.0/images/jia2@2x.png"
class=
"jia"
onclick=
"jiabox()"
>
<input
type=
"hidden"
name=
"houseinfos_id"
class=
"houseinfos_id"
value=
"4720"
>
</form>
<div
class=
"modal-footer"
>
<button
class=
"btn"
id=
"modal_hide1"
>
关闭
</button>
<button
class=
"btn btn-primary"
type=
"submit"
id=
"edituserbtnid6"
>
保存
</button>
</div>
</div>
<div
class=
"modal fade"
id=
"modal-anch"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
id=
"myModalLabel"
>
设置案场权限人
</h4>
</div>
<div
class=
"modal-body"
>
<form
action=
"/Houseinfos/agent_prv"
method=
"POST"
id=
"submit_agent"
>
<div
class=
"jian_class"
>
<input
name=
"phone[]"
placeholder=
"请输入"
type=
"tel"
value=
""
class=
"phone_jia"
>
<!--号码匹配名字-->
<ul
class=
"phone_list"
></ul>
</div>
<img
src=
"/resource/image/jia2@2x.png"
class=
"jia"
>
<input
type=
"hidden"
name=
"houseinfos_id"
class=
"houseinfos_id"
>
</form>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary"
id=
"submit_follow"
>
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
\ No newline at end of file
public/resource/css/home.css
View file @
0588f021
...
...
@@ -107,3 +107,75 @@ body{
width
:
110px
;
height
:
80px
;
}
.jia
{
width
:
17px
;
height
:
17px
;
margin-left
:
10px
;
margin-top
:
7px
;
}
.jian
{
width
:
12px
;
height
:
16px
;
margin-left
:
-16px
;
float
:
left
;
margin-top
:
9px
;
}
.jian_class
{
display
:
block
;
margin
:
0
auto
;
margin-top
:
20px
;
}
.phone_list1
{
width
:
185px
;
color
:
#3c3c3c
;
height
:
auto
;
background
:
#Fff
;
border
:
1px
solid
#d0d0d0
;
border-top
:
none
;
margin
:
0
0
0
0
;
padding-left
:
10px
;
float
:
left
;
margin-left
:
-187px
;
margin-top
:
26px
;
}
.phone_list1
li
{
width
:
100%
;
height
:
30px
;
font-size
:
14px
;
float
:
left
;
line-height
:
30px
;
list-style
:
none
;
background
:
#FFFFff
;
}
.phone_list
{
width
:
167px
;
color
:
#3c3c3c
;
height
:
auto
;
background
:
#Fff
;
border
:
1px
solid
#d0d0d0
;
border-top
:
none
;
margin
:
0
0
0
0
;
float
:
left
;
padding-left
:
10px
;
margin-left
:
-167px
;
margin-top
:
26px
;
}
.phone_list
li
{
width
:
100%
;
height
:
30px
;
font-size
:
14px
;
float
:
left
;
line-height
:
30px
;
list-style
:
none
;
background
:
#FFFFff
;
}
.phone_jia
{
width
:
167px
;
float
:
left
;
}
.phone_add
{
width
:
188px
;
}
.phone_name
{
margin-left
:
4px
;
}
\ No newline at end of file
public/resource/image/qdao-sha.png
0 → 100644
View file @
0588f021
1.15 KB
public/resource/js/houseList.js
View file @
0588f021
...
...
@@ -7,11 +7,21 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','pagin
pageNo
:
1
,
/*第几页*/
pageSize
:
10
,
/*每页显示多少条*/
id
:
''
,
valueCurrent
:
''
,
ajaxObj
:
''
,
stopstatus
:
true
,
ldHtml
:
$
(
'.phone_list'
),
boxphoto
:
''
,
init
:
function
()
{
//初始化dot
$
(
"body"
).
append
(
template
);
business
.
getList
();
business
.
event
();
business
.
resetLoad
();
business
.
loadMain
();
},
event
:
function
()
{
$
(
"#search"
).
click
(
function
()
{
...
...
@@ -43,7 +53,31 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','pagin
$
(
document
).
delegate
(
"#confirm_delete"
,
"click"
,
function
()
{
business
.
delBusiness
();
});
$
(
document
).
delegate
(
".jia"
,
"click"
,
function
()
{
//加号
business
.
jiabox
();
});
$
(
document
).
delegate
(
".addphone"
,
"click"
,
function
()
{
//加号
business
.
addphone
(
this
);
});
$
(
document
).
on
(
'input'
,
'.phone_jia,.phone_add'
,
function
(
e
)
{
//搜索手机号码
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
_this
.
next
().
css
(
"display"
,
"block"
);
valueCurrent
=
_this
.
val
();
if
(
valueCurrent
!=
''
){
business
.
resetLoad
(
1
);
business
.
loadMain
(
valueCurrent
,
_this
.
next
());
}
else
{
business
.
ldHtml
.
html
(
''
);
return
false
;
}
});
$
(
document
).
delegate
(
".is_show"
,
"click"
,
function
()
{
if
(
!
confirm
(
'是否继续?'
))
{
return
;
...
...
@@ -61,6 +95,80 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','pagin
}
});
},
resetLoad
:
function
(){
//手机号
if
(
business
.
ajaxObj
){
business
.
ajaxObj
.
abort
();
}
business
.
ldHtml
.
html
(
''
);
business
.
stopstatus
=
true
;
},
loadMain
:
function
(
phone
,
obj
)
{
//手机号
business
.
ajaxObj
=
$
.
ajax
({
type
:
"GET"
,
url
:
'/index/getBroker_new'
,
data
:
{
'phone'
:
phone
},
timeout
:
10000
,
dataType
:
"json"
,
beforeSend
:
function
()
{
},
success
:
function
(
data
)
{
if
(
data
.
code
===
200
){
var
_html
=
''
;
$
.
each
(
data
.
data
,
function
(
i
,
data
)
{
_html
+=
'<li class="addphone"><span class="id">'
+
data
[
'id'
]
+
'-</span><span class="phone_name">'
+
data
[
'name'
]
+
'</span><span class="phone_span">-</span><span class="phone-phone">'
+
data
[
'phone'
]
+
'</span> </li>'
;
});
obj
.
html
(
_html
);
}
},
error
:
function
()
{
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
"timeout"
)
{
//处理超时的逻辑
alert
(
"请求超时"
);
}
}
});
},
addphone
:
function
(
obj
){
var
phone_name
=
$
(
obj
).
find
(
".phone_name"
).
html
();
console
.
log
(
phone_name
);
var
phone_phone
=
$
(
obj
).
find
(
".phone-phone"
).
html
();
var
phone_span
=
$
(
obj
).
find
(
".phone_span"
).
html
();
var
id
=
$
(
obj
).
find
(
".id"
).
html
();
$
(
obj
).
parent
().
prev
().
val
(
id
+
phone_name
+
phone_span
+
phone_phone
);
$
(
obj
).
parent
().
hide
();
business
.
ldHtml
.
html
(
''
);
return
false
;
},
jiabox
:
function
()
{
business
.
boxphoto
=
'<input name="phone[]" placeholder="请输入" type="tel" style="margin-left: 10px;float: left" class="phone_add">'
+
'<ul class="phone_list1"></ul>'
+
'<img src="/resource/image/qdao-sha.png" class="jian">'
;
$
(
".jian_class"
).
append
(
business
.
boxphoto
);
//写入
business
.
jianbox
();
},
// jiabox_data:function (id,name,phone) {
// business.boxphoto = '<input name="phone[]" placeholder="请输入" value='+name+'-'+phone+' type="tel" style="margin-left: 10px;float: left" class="phone_add">' +
// '<ul class="phone_list1"></ul>'+
// '<img src="/resource/image/qdao-sha.png" class="jian" onclick="jianbox()"><input type="hidden" value="'+id+'">';
// $(".jian_class").append(business.boxphoto);//写入
// business.jianbox();
//},
jianbox
:
function
()
{
$
(
".jian"
).
click
(
function
()
{
$
(
this
).
prev
().
prev
().
remove
();
$
(
this
).
prev
().
remove
();
$
(
this
).
remove
();
});
},
getList
:
function
(
pageNo
)
{
business
.
pageNo
=
pageNo
;
var
params
=
{};
...
...
public/resource/template/house_template_tpl.html
View file @
0588f021
...
...
@@ -41,11 +41,11 @@
<
/td
>
<
td
>
<
a
class
=
"btn1 btn-success "
href
=
"/admin.php/index/houseEdit?id=[%= it[item]['id']%].html"
data
-
toggle
=
"modal"
data
-
id
=
"77"
onclick
=
"alertFollow(this)"
>
编辑
<
/a
>
<
a
class
=
"btn1 btn-success is_show"
href
=
"#modal-process"
data
-
toggle
=
"modal"
data
-
id
=
"77"
onclick
=
"alertFollow(this)"
>
推荐至首页
<
/a
>
<
a
class
=
"btn1 btn-success
modal_anch"
href
=
"#modal_panf1
"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
设置案场权限人
<
/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
class
=
"btn1 btn-success "
href
=
"/admin.php/index/houseEdit?id=[%= it[item]['id']%].html"
data
-
toggle
=
"modal"
data
-
id
=
"77"
>
编辑
<
/a
>
<
a
class
=
"btn1 btn-success is_show"
href
=
"#modal-process"
data
-
toggle
=
"modal"
data
-
id
=
"77"
>
推荐至首页
<
/a
>
<
a
class
=
"btn1 btn-success
"
data
-
target
=
"#modal-anch
"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
设置案场权限人
<
/a
>
<
a
class
=
"btn1 btn-success "
href
=
"#modal-process"
data
-
toggle
=
"modal"
data
-
id
=
"77"
>
是否独家
<
/a
>
<
a
class
=
"btn1 btn-success "
href
=
"#modal-process"
data
-
toggle
=
"modal"
data
-
id
=
"77"
>
操作记录
<
/a
>
<
a
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
href
=
"#modal-delete"
class
=
"btn1 btn-danger add_applies del_modal"
>
删除
<
/a
>
<
/td
>
...
...
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