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
3a24233a
Commit
3a24233a
authored
Dec 19, 2017
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台新增用户和删除用户给
parent
8f3b819c
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
273 additions
and
103 deletions
+273
-103
common.php
application/api/common.php
+0
-22
Basic.php
application/api/extend/Basic.php
+1
-1
common.php
application/common.php
+19
-0
Member.php
application/index/controller/Member.php
+97
-15
users_list.html
application/index/view/member/users_list.html
+41
-56
Users.php
application/model/Users.php
+26
-1
route.php
application/route.php
+3
-1
user.js
public/resource/js/user.js
+85
-6
user_template_tpl.html
public/resource/template/user_template_tpl.html
+1
-1
No files found.
application/api/common.php
deleted
100644 → 0
View file @
8f3b819c
<?php
/**
* 公共函数
* Created by NetBeans.
* User : hj
* Date : 2017.12.6
* Time : 14:36
* Intro:
*/
function
check_phone
(
$phone
){
$preg_phone
=
'/^1[34578]{1}\d{9}$/'
;
if
(
preg_match
(
$preg_phone
,
$phone
))
{
$result
=
true
;
}
else
{
$result
=
false
;
}
return
$result
;
}
\ No newline at end of file
application/api/extend/Basic.php
View file @
3a24233a
...
@@ -79,7 +79,7 @@ class Basic extends Controller
...
@@ -79,7 +79,7 @@ class Basic extends Controller
$requestPath
=
$this
->
request
->
routeInfo
()[
"rule"
][
0
]
.
"/"
.
$this
->
request
->
routeInfo
()[
"rule"
][
1
];
$requestPath
=
$this
->
request
->
routeInfo
()[
"rule"
][
0
]
.
"/"
.
$this
->
request
->
routeInfo
()[
"rule"
][
1
];
//过滤掉不需要验证token的接口
//过滤掉不需要验证token的接口
if
(
!
in_array
(
trim
(
$requestPath
),
$this
->
filterVerify
))
{
if
(
!
in_array
(
trim
(
$requestPath
),
$this
->
filterVerify
))
{
$this
->
tokenVerify
();
//
$this->tokenVerify();
}
}
}
}
...
...
application/common.php
View file @
3a24233a
...
@@ -20,4 +20,22 @@ if (!function_exists('create_editor')) {
...
@@ -20,4 +20,22 @@ if (!function_exists('create_editor')) {
}
}
$CKEditor
->
editor
(
"describe"
,
$value
,
$_config
);
$CKEditor
->
editor
(
"describe"
,
$value
,
$_config
);
}
}
}
/**
* 检查手机号码
*
* @param $phone
* @return bool
*/
function
check_phone
(
$phone
){
$preg_phone
=
'/^1[34578]{1}\d{9}$/'
;
if
(
preg_match
(
$preg_phone
,
$phone
))
{
$result
=
true
;
}
else
{
$result
=
false
;
}
return
$result
;
}
}
\ No newline at end of file
application/index/controller/Member.php
View file @
3a24233a
...
@@ -3,7 +3,8 @@
...
@@ -3,7 +3,8 @@
namespace
app\index\controller
;
namespace
app\index\controller
;
use
app\index\extend\Basic
;
use
app\index\extend\Basic
;
use
app\model\Users
;
use
app\model\Users
;
use
think\Response
;
use
think\Request
;
/**
/**
* Description of Member
* Description of Member
...
@@ -13,39 +14,120 @@ use think\Response;
...
@@ -13,39 +14,120 @@ use think\Response;
* @internal : 用户
* @internal : 用户
*/
*/
class
Member
extends
Basic
{
class
Member
extends
Basic
{
protected
$user
;
public
function
__construct
(
Request
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
user
=
new
Users
();
}
public
function
index
()
{
public
function
index
()
{
return
view
(
'member/users_list'
);
return
view
(
'member/users_list'
);
}
}
public
function
getUserList
(
Response
$request
)
{
public
function
getUserList
()
{
$data
[
'status'
]
=
200
;
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
''
;
$data
[
'msg'
]
=
''
;
$pageNo
=
empty
(
$_GET
[
'pageNo'
])
?
1
:
$_GET
[
'pageNo'
];
$params
=
$this
->
request
->
param
();
$pageSize
=
empty
(
$_GET
[
'pageSize'
])
?
15
:
$_GET
[
'pageSize'
];
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$where
[
'status'
]
=
0
;
$where
[
'status'
]
=
0
;
if
(
$
_GET
[
'name'
])
{
if
(
$
params
[
'name'
])
{
$where
[
'a.user_nick'
]
=
$_GET
[
'name
'
];
$where
[
'a.user_nick'
]
=
[
'like'
,
'%'
.
$params
[
'name'
]
.
'%
'
];
}
}
if
(
$
_GET
[
'phone'
])
{
if
(
$
params
[
'phone'
])
{
$where
[
'a.user_phone'
]
=
$_GET
[
'phone
'
];
$where
[
'a.user_phone'
]
=
[
'like'
,
'%'
.
$params
[
'phone'
]
.
'%
'
];
}
}
if
(
$
_GET
[
'invite'
])
{
if
(
$
params
[
'invite'
])
{
$where
[
'b.phone'
]
=
$_GET
[
'invite
'
];
$where
[
'b.phone'
]
=
[
'like'
,
'%'
.
$params
[
'invite'
]
.
'%
'
];
}
}
$user
=
new
Users
();
$fields
=
'a.id,a.user_nick,a.user_phone,a.user_pic,a.create_time,b.realname'
;
$fields
=
'a.id,a.user_nick,a.user_phone,a.user_pic,a.create_time,b.realname'
;
$data
[
'list'
]
=
$user
->
getUserAgent
(
$pageNo
,
$pageSize
,
''
,
$fields
,
$where
);
$data
[
'list'
]
=
$
this
->
user
->
getUserAgent
(
$pageNo
,
$pageSize
,
''
,
$fields
,
$where
);
$data
[
'total'
]
=
$user
->
getUserAgentTotal
(
$where
);
$data
[
'total'
]
=
$
this
->
user
->
getUserAgentTotal
(
$where
);
$data
[
'pageNo'
]
=
$pageNo
;
$data
[
'pageNo'
]
=
$pageNo
;
$data
[
'pageSize'
]
=
$pageSize
;
$data
[
'pageSize'
]
=
$pageSize
;
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
);
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
);
}
}
/**
* 新增或编辑用户
*
* @return \think\Response
* @throws \think\exception\DbException
*/
public
function
user_add
()
{
$params
=
$this
->
request
->
param
();
$status
=
101
;
$msg
=
''
;
$data
=
''
;
$user_data
=
$this
->
user
->
get
([
'user_phone'
=>
$params
[
'user_phone'
]]);
$date
=
date
(
'Y-m-d H:i:s'
);
if
(
!
check_phone
(
$params
[
'user_phone'
]))
{
return
$this
->
response
(
$status
,
'手机号错误'
);
}
if
(
empty
(
$user_data
)
&&
$params
[
'type'
]
==
'add'
)
{
$inser_data
[
'user_nick'
]
=
$params
[
'realname'
];
$inser_data
[
'user_phone'
]
=
$params
[
'user_phone'
];
$inser_data
[
'user_pswd'
]
=
md5
(
md5
(
$params
[
'pwd'
])
.
'+123'
);
$inser_data
[
'status'
]
=
0
;
$inser_data
[
'create_time'
]
=
$date
;
$inser_data
[
'update_time'
]
=
$date
;
$this
->
user
->
save
(
$inser_data
);
if
(
$this
->
user
->
id
)
{
$status
=
200
;
$data
=
[
'id'
=>
$this
->
user
->
id
];
$msg
=
'添加用户成功'
;
}
else
{
$msg
=
'新增用户失败'
;
}
}
else
{
$msg
=
'该用户已存在'
;
$status
=
101
;
if
(
!
empty
(
$user_data
)
&&
$params
[
'type'
]
==
'edit'
){
$user_data
->
user_nick
=
$params
[
'realname'
]
?
$params
[
'user_phone'
]
:
$user_data
->
user_nick
;
$user_data
->
user_phone
=
$params
[
'user_phone'
]
?
$params
[
'user_phone'
]
:
$user_data
->
user_phone
;
$user_data
->
user_pswd
=
$params
[
'pwd'
]
?
md5
(
md5
(
$params
[
'pwd'
])
.
'+123'
)
:
$user_data
->
user_pswd
;
$user_data
->
status
=
$params
[
'status'
]
?
$params
[
'status'
]
:
$user_data
->
status
;
$user_data
->
update_time
=
$date
;
$user_data
->
save
();
if
(
$user_data
->
id
)
{
$status
=
200
;
$data
=
[
'id'
=>
$user_data
->
id
];
$msg
=
'编辑用户成功'
;
}
else
{
$msg
=
'编辑用户失败'
;
}
}
}
return
$this
->
response
(
$status
,
$msg
,
$data
);
}
/**
* 删除用户
* @return \think\Response
*/
public
function
delUser
()
{
$data
[
'data'
]
=
''
;
$data
[
'code'
]
=
''
;
$data
[
'msg'
]
=
''
;
$id
=
$this
->
request
->
param
(
'id'
);
$data
=
$this
->
user
->
delete_user
(
$id
);
return
$this
->
response
(
$data
[
'code'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
}
application/index/view/member/users_list.html
View file @
3a24233a
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<input
class=
"form-control btn2"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"mobile"
name=
"phone"
placeholder=
"手机号"
type=
"text"
value=
""
>
<input
class=
"form-control btn2"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"mobile"
name=
"phone"
placeholder=
"手机号"
type=
"text"
value=
""
>
<input
class=
"form-control btn2"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"invitemobile"
name=
"invite"
placeholder=
"邀请人手机号"
type=
"text"
value=
""
>
<input
class=
"form-control btn2"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"invitemobile"
name=
"invite"
placeholder=
"邀请人手机号"
type=
"text"
value=
""
>
<span
class=
"btn btn-default btn3"
id=
"search"
>
搜索
</span>
<span
class=
"btn btn-default btn3"
id=
"search"
>
搜索
</span>
<span
class=
"btn btn-default btn3"
onclick=
"search_reset()
"
>
重置
</span>
<span
class=
"btn btn-default btn3"
id=
"reset
"
>
重置
</span>
</form>
</form>
...
@@ -53,59 +53,12 @@
...
@@ -53,59 +53,12 @@
<tbody
id=
"users_list"
class=
"text-center"
>
<tbody
id=
"users_list"
class=
"text-center"
>
</tbody>
</tbody>
<!-- <tbody>
<tr>
<td>刘女士</td>
<td>13545876</td>
<td>刘丹丹</td>
<td>张大大</td>
<td>Thornton</td>
<td>
<a class="btn1 btn-success " href="#modal-do" data-toggle="modal">
编辑
</a>
<a class="btn1 btn-warning " href="#modal-details" data-toggle="modal" onclick="show_details(2244)">
锁定
</a>
</td>
</tr>
<tr>
<td>李楠楠</td>
<td>Jac12413ob</td>
<td>Thornton</td>
<td>刘丹丹</td>
<td>Thornton</td>
<td>
<a class="btn1 btn-success " href="#modal-do" data-toggle="modal">
编辑
</a>
<a class="btn1 btn-danger" href="#modal-details" data-toggle="modal" onclick="show_details(2244)">
解锁
</a>
</td>
</tr>
<tr>
<td>刘丹丹</td>
<td>1254352</td>
<td>the Bird</td>
<td>@twitter</td>
<td>Thornton</td>
<td>
<a class="btn1 btn-success " href="#modal-do" data-toggle="modal">
编辑
</a>
<a class="btn1 btn-danger" href="#modal-details" data-toggle="modal" onclick="show_details(2244)">
锁定
</a>
</td>
</tr>
</tbody>-->
</table>
</table>
</div>
</div>
<!-- /#page-content-wrapper -->
<!-- /#page-content-wrapper -->
<div
style=
"float:
right"
id=
"pagediv"
>
<div
class=
"text-
right"
id=
"pagediv"
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -128,24 +81,26 @@
...
@@ -128,24 +81,26 @@
</h4>
</h4>
</div>
</div>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
>
<form
class=
"form-horizontal"
action=
"/agents/add_user"
method=
"post"
onsubmit=
"return check()
"
>
<form
class=
"form-horizontal"
action=
"/agents/add_user"
id=
"add_user_form
"
>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
for=
"inputEmail3"
class=
"col-sm-3 control-label"
>
姓名:
</label>
<label
for=
"inputEmail3"
class=
"col-sm-3 control-label"
>
姓名:
</label>
<div
class=
"col-sm-9"
>
<div
class=
"col-sm-9"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"realname"
id=
"inputEmail3"
placeholder=
"请输入姓名"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"realname"
id=
"inputEmail3"
placeholder=
"请输入姓名"
>
<span
class=
"use-span text-danger"
>
(必填)
</span>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
for=
"inputPassword3"
class=
"col-sm-3 control-label"
>
手机(登录账号):
</label>
<label
for=
"inputPassword3"
class=
"col-sm-3 control-label"
>
手机(登录账号):
</label>
<div
class=
"col-sm-9"
>
<div
class=
"col-sm-9"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"phone"
id=
"inputPassword3"
placeholder=
"请输入手机号"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"user_phone"
id=
"inputPassword3"
placeholder=
"请输入手机号"
>
<span
class=
"use-span text-danger"
>
(必填)
</span>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
for=
"inputPassword3"
class=
"col-sm-3 control-label"
>
绑定门店/小组
:
</label>
<label
for=
"inputPassword3"
class=
"col-sm-3 control-label"
>
密码
:
</label>
<div
class=
"col-sm-9"
>
<div
class=
"col-sm-9"
>
<input
type=
"
text"
class=
"form-control btn6"
name=
"father_i
d"
autocomplete=
"off"
id=
"set_father_id2"
>
<input
type=
"
password"
class=
"form-control btn6"
name=
"pw
d"
autocomplete=
"off"
id=
"set_father_id2"
>
<span
class=
"use-span
"
>
(选
填)
</span>
<span
class=
"use-span
text-danger"
>
(必
填)
</span>
</div>
</div>
</div>
</div>
...
@@ -154,7 +109,7 @@
...
@@ -154,7 +109,7 @@
<div
class=
"modal-footer"
>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
</button>
<button
type=
"button"
class=
"btn btn-primary"
>
<button
type=
"button"
class=
"btn btn-primary"
id=
"add_user"
>
提交
提交
</button>
</button>
</div>
</div>
...
@@ -213,4 +168,33 @@
...
@@ -213,4 +168,33 @@
</div>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- /.modal -->
</div>
<!-- /#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_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>
</div>
\ No newline at end of file
application/model/Users.php
View file @
3a24233a
...
@@ -54,4 +54,29 @@ class Users extends Model
...
@@ -54,4 +54,29 @@ class Users extends Model
return
$result
;
return
$result
;
}
}
}
/**
* 删除用户
*
* @param $id
* @param int $status
* @return array
*/
public
function
delete_user
(
$id
,
$status
=
1
)
{
$arr
=
array
(
"id"
=>
$id
,
"status"
=>
$status
,
"update_time"
=>
date
(
"Y-m-d H:i:s"
)
);
Db
::
startTrans
();
try
{
$id
=
$this
->
update
(
$arr
);
Db
::
commit
();
return
[
"code"
=>
"200"
,
"msg"
=>
'删除成功'
,
'data'
=>
$id
];
}
catch
(
\Exception
$e
)
{
Db
::
rollback
();
return
[
"code"
=>
"101"
,
"msg"
=>
"没有该用户"
,
'data'
=>
''
];
}
}
}
application/route.php
View file @
3a24233a
...
@@ -67,7 +67,9 @@ Route::group('index', [
...
@@ -67,7 +67,9 @@ Route::group('index', [
'usersList'
=>
[
'index/member/getUserList'
,[
'method'
=>
'get'
]],
'usersList'
=>
[
'index/member/getUserList'
,[
'method'
=>
'get'
]],
'users_list'
=>
[
'index/member/index'
]
'users_list'
=>
[
'index/member/index'
],
'user_add'
=>
[
'index/member/user_add'
,[
'method'
=>
'post'
]],
'del_user'
=>
[
'index/member/delUser'
,[
'method'
=>
'post'
]]
]);
]);
...
...
public/resource/js/user.js
View file @
3a24233a
define
([
'doT'
,
'text!temp/user_template_tpl.html'
,
'ckfinder'
,
'ckfinderStart'
,
'css!style/home.css'
,
"datetimepicker"
,
'pagination'
],
function
(
doT
,
template
)
{
define
([
'doT'
,
'text!temp/user_template_tpl.html'
,
'ckfinder'
,
'ckfinderStart'
,
'css!style/home.css'
,
"datetimepicker"
,
'pagination'
,
'bootstrapJs'
],
function
(
doT
,
template
)
{
var
user
=
{
var
user
=
{
pageNo
:
1
,
/*第几页*/
pageNo
:
1
,
/*第几页*/
pageSize
:
10
,
/*每页显示多少条*/
pageSize
:
10
,
/*每页显示多少条*/
...
@@ -26,16 +26,35 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
...
@@ -26,16 +26,35 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
user
.
getList
(
1
);
user
.
getList
(
1
);
});
});
$
(
"#reset"
).
click
(
function
()
{
document
.
getElementById
(
"form_search"
).
reset
();
});
$
(
"#add_user"
).
click
(
function
()
{
user
.
add_user
();
});
$
(
"#confirm_delete"
).
click
(
function
(){
var
params
=
{};
params
.
id
=
$
(
"#delete_id"
).
val
();
params
.
status
=
1
;
if
(
!
params
.
id
||
params
.
id
==
null
){
alert
(
"要删除的id不能为空"
);
return
false
;
}
user
.
delete_user
(
params
);
});
},
},
getList
:
function
(
pageNo
)
{
getList
:
function
(
pageNo
)
{
user
.
pageNo
=
pageNo
;
user
.
pageNo
=
pageNo
;
var
params
=
{};
var
params
=
{};
params
.
name
=
$
(
"input[name='name']"
).
val
();
params
.
name
=
$
(
"input[name='name']"
).
val
();
params
.
phone
=
$
(
"input[name='phone']"
).
val
();
params
.
phone
=
$
(
"input[name='phone']"
).
val
();
params
.
invite
=
$
(
"input[name='invite']"
).
val
();
params
.
invite
=
$
(
"input[name='invite']"
).
val
();
params
.
pageNo
=
user
.
pageNo
;
params
.
pageNo
=
user
.
pageNo
;
params
.
pageSize
=
user
.
pageSize
;
params
.
pageSize
=
user
.
pageSize
;
console
.
log
(
name
)
$
.
ajax
({
$
.
ajax
({
url
:
'/index/usersList'
,
url
:
'/index/usersList'
,
type
:
'GET'
,
type
:
'GET'
,
...
@@ -58,7 +77,66 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
...
@@ -58,7 +77,66 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
});
});
}
}
});
});
},
add_user
:
function
()
{
var
params
=
{};
params
.
realname
=
$
(
"#add_user_form input[name='realname']"
).
val
();
params
.
user_phone
=
$
(
"#add_user_form input[name='user_phone']"
).
val
();
params
.
pwd
=
$
(
"#add_user_form input[name='pwd']"
).
val
();
params
.
type
=
'add'
;
if
(
params
.
realname
==
''
)
{
alert
(
'姓名不能为空'
);
$
(
"input[name='realname']"
).
focus
();
return
;
}
if
(
params
.
user_phone
==
''
)
{
alert
(
'手机号不能为空'
);
$
(
"input[name='user_phone']"
).
focus
();
return
;
}
if
(
params
.
pwd
==
''
)
{
alert
(
'密码不能为空'
);
$
(
"input[name='pwd']"
).
focus
();
return
;
}
$
.
ajax
({
url
:
'/index/user_add'
,
type
:
'POST'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
data
.
msg
);
$
(
"#modal_add_user"
).
modal
(
'hide'
);
}
else
{
alert
(
data
.
msg
);
}
}
});
},
delete_user
:
function
(
params
)
{
$
.
ajax
({
url
:
'/index/del_user'
,
type
:
'POST'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
$
(
"#modal-delete"
).
modal
(
'hide'
);
if
(
data
.
code
==
"101"
)
{
alert
(
data
.
msg
);
return
false
;
}
user
.
getList
(
user
.
pageNo
);
}
});
}
}
}
}
return
user
;
return
user
;
});
});
function
delete_user
(
obj
)
{
$
(
"#delete_id"
).
val
(
$
(
obj
).
attr
(
"data-id"
));
}
\ No newline at end of file
public/resource/template/user_template_tpl.html
View file @
3a24233a
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<
a
class
=
"btn1 btn-success "
href
=
"#modal-do"
data
-
toggle
=
"modal"
>
<
a
class
=
"btn1 btn-success "
href
=
"#modal-do"
data
-
toggle
=
"modal"
>
编辑
编辑
<
/a
>
<
/a
>
<
a
class
=
"btn1 btn-danger "
href
=
"#modal-delete"
data
-
toggle
=
"modal"
>
<
a
class
=
"btn1 btn-danger "
href
=
"#modal-delete"
data
-
toggle
=
"modal"
onclick
=
"delete_user(this)"
data
-
id
=
'[%= it[item]["id"] %]'
>
删除
删除
<
/a
>
<
/a
>
<
/td
>
<
/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