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
ad2f2122
Commit
ad2f2122
authored
Oct 11, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
bf820544
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
93 additions
and
0 deletions
+93
-0
LookShop.php
application/index/controller/LookShop.php
+24
-0
route.php
application/route.php
+1
-0
whitelist.js
public/resource/js/whitelist.js
+35
-0
whitelist_template_tpl.html
public/resource/template/whitelist_template_tpl.html
+33
-0
No files found.
application/index/controller/LookShop.php
View file @
ad2f2122
...
...
@@ -307,4 +307,27 @@ class LookShop extends Basic
{
return
view
(
"/look_shop/whitelist"
);
}
public
function
deleteWhitelist
()
{
$params
=
$this
->
params
;
/* $params = array(
"id" => 1,
);*/
if
(
!
isset
(
$params
[
"id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$id
=
$params
[
"id"
];
$aLookShopWhitelistModel
=
new
ALookShopWhitelist
();
$where_
[
"id"
]
=
$id
;
$update_
[
"is_del"
]
=
1
;
$is_ok
=
$aLookShopWhitelistModel
->
updateWhitelist
(
$where_
,
$update_
);
if
(
$is_ok
>
0
){
return
$this
->
response
(
"200"
,
"success"
);
}
else
{
return
$this
->
response
(
"101"
,
"修改失败"
);
}
}
}
\ No newline at end of file
application/route.php
View file @
ad2f2122
...
...
@@ -615,6 +615,7 @@ Route::group('index', [
'getWhitelist'
=>
[
'index/LookShop/getWhitelist'
,
[
'method'
=>
'get'
]],
'addWhitelist'
=>
[
'index/LookShop/addWhitelist'
,
[
'method'
=>
'post'
]],
'setAgentLookNum'
=>
[
'index/LookShop/setAgentLookNum'
,
[
'method'
=>
'get | post'
]],
'deleteWhitelist'
=>
[
'index/LookShop/deleteWhitelist'
,
[
'method'
=>
'get | post'
]],
]);
...
...
public/resource/js/whitelist.js
View file @
ad2f2122
...
...
@@ -36,6 +36,19 @@ define(['doT', 'text!temp/whitelist_template_tpl.html', 'css!style/home.css', 'b
params
.
submit_agent_id
=
user_info_obj
.
id
;
whitelist
.
upLookShop
(
params
);
});
$
(
"#confirm_delete"
).
click
(
function
(){
var
params
=
{};
params
.
id
=
$
(
"#delete_agent_id"
).
val
();
if
(
!
params
.
id
||
params
.
id
==
null
)
{
alert
(
"要删除的经纪人id不能为空"
);
return
false
;
}
whitelist
.
deleteLookShop
(
params
);
});
$
(
"#search"
).
click
(
function
()
{
var
params
=
{};
var
name
=
$
(
"#name"
).
val
();
...
...
@@ -63,6 +76,9 @@ define(['doT', 'text!temp/whitelist_template_tpl.html', 'css!style/home.css', 'b
$
(
document
).
delegate
(
".up_look_shop"
,
"click"
,
function
()
{
$
(
"#up_agent_id"
).
val
(
$
(
this
).
attr
(
"data-agent_id"
));
});
$
(
document
).
delegate
(
".delete_look_shop"
,
"click"
,
function
()
{
$
(
"#delete_agent_id"
).
val
(
$
(
this
).
attr
(
"data-id"
));
});
$
(
document
).
delegate
(
".phone_jia"
,
"click"
,
function
()
{
/*手机检索姓名*/
...
...
@@ -163,6 +179,7 @@ define(['doT', 'text!temp/whitelist_template_tpl.html', 'css!style/home.css', 'b
dataType
:
'json'
,
success
:
function
(
data
)
{
$
(
"#modal-add-do"
).
modal
(
'hide'
);
if
(
data
.
code
==
"101"
)
{
alert
(
data
.
msg
);
return
false
;
...
...
@@ -202,6 +219,24 @@ define(['doT', 'text!temp/whitelist_template_tpl.html', 'css!style/home.css', 'b
$
(
obj
).
parent
().
hide
();
$
(
"#agents_list"
).
html
(
''
);
return
;
},
deleteLookShop
:
function
(
params
)
{
$
.
ajax
({
url
:
'/admin.php/index/deleteWhitelist'
,
type
:
'POST'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
$
(
"#modal-delete"
).
modal
(
'hide'
);
if
(
data
.
code
==
"101"
)
{
alert
(
data
.
msg
);
return
false
;
}
whitelist
.
getWhitelist
();
}
});
}
};
return
whitelist
...
...
public/resource/template/whitelist_template_tpl.html
View file @
ad2f2122
...
...
@@ -13,6 +13,10 @@
data
-
agent_id
=
"[%= it[item]['agent_id'] %]"
>
升级查看铺数
<
/a
>
<
a
class
=
"btn1 btn-success delete_look_shop"
href
=
"#modal-delete"
data
-
toggle
=
"modal"
data
-
id
=
"[%= it[item]['id'] %]"
>
删除
<
/a
>
<
/td
>
<
/tr
>
[
%
}
%
]
...
...
@@ -23,6 +27,35 @@
[
%
}
%
]
</script>
<!-- /#wrapper -->
<!-- /#删除模态框 -->
<div
class=
"modal fade"
id=
"modal-delete"
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"
>
删除白名单
</h4>
</div>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
>
<input
type=
"hidden"
value=
""
id=
"delete_agent_id"
/>
确认删除吗?
</div>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary"
id=
"confirm_delete"
>
确认
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- /#wrapper -->
<!-- /#删除模态框 -->
<div
class=
"modal fade"
id=
"modal-up"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
...
...
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