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
6d53df59
Commit
6d53df59
authored
Jan 31, 2018
by
zfc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
授权
parent
dfc8dbda
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
141 additions
and
31 deletions
+141
-31
Agent.php
application/index/controller/Agent.php
+2
-0
Auth.php
application/index/controller/Auth.php
+22
-1
agent.html
application/index/view/agent/agent.html
+1
-1
save_agent.html
application/index/view/agent/save_agent.html
+29
-11
auth_rule_box.html
application/index/view/auth/auth_rule_box.html
+5
-2
role_edit.html
application/index/view/auth/role_edit.html
+7
-4
AuthGroup.php
application/model/AuthGroup.php
+6
-0
route.php
application/route.php
+2
-1
role_edit.js
public/resource/js/role_edit.js
+26
-3
save_agent.js
public/resource/js/save_agent.js
+27
-7
agent_template_tpl.html
public/resource/template/agent_template_tpl.html
+1
-1
get_auth_list_template_tpl.html
public/resource/template/get_auth_list_template_tpl.html
+13
-0
No files found.
application/index/controller/Agent.php
View file @
6d53df59
...
@@ -91,6 +91,8 @@ class Agent extends Basic
...
@@ -91,6 +91,8 @@ class Agent extends Basic
}
}
/*
/*
* 新增or修改or查看
* 新增or修改or查看
* $group_id !=0为查看
* $group_id !=0为查看
...
...
application/index/controller/Auth.php
View file @
6d53df59
...
@@ -47,6 +47,10 @@ class Auth extends Basic
...
@@ -47,6 +47,10 @@ class Auth extends Basic
return
view
(
'accessUser'
);
return
view
(
'accessUser'
);
}
}
/**
* 角色列表接口
* @return \think\Response
*/
public
function
getAuth
()
{
public
function
getAuth
()
{
$data
[
'status'
]
=
200
;
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
''
;
$data
[
'msg'
]
=
''
;
...
@@ -56,11 +60,28 @@ class Auth extends Basic
...
@@ -56,11 +60,28 @@ class Auth extends Basic
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$auth_group
=
New
AuthGroup
();
$auth_group
=
New
AuthGroup
();
$where
=
'status <> 0'
;
$where
=
'status <> 0'
;
$data
[
'list'
]
=
$auth_group
->
getList
(
$pageNo
,
$pageSize
,
''
,
'*'
,
$where
);
$data
[
'list'
]
=
$auth_group
->
getList
(
$pageNo
,
$pageSize
,
'
id desc
'
,
'*'
,
$where
);
$data
[
'total'
]
=
$auth_group
->
getTotal
(
$where
);
$data
[
'total'
]
=
$auth_group
->
getTotal
(
$where
);
return
$this
->
response
(
200
,
''
,
$data
);
return
$this
->
response
(
200
,
''
,
$data
);
}
}
/**
* 角色列表接口无分页
* @return \think\Response
*/
public
function
getAuth2
()
{
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
''
;
$params
=
$this
->
request
->
param
();
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$auth_group
=
New
AuthGroup
();
$where
=
'status <> 0'
;
$data
[
'list'
]
=
$auth_group
->
getList2
(
'id desc'
,
'id,title'
,
$where
);
return
$this
->
response
(
200
,
''
,
$data
);
}
/**
/**
* 角色编辑
* 角色编辑
*/
*/
...
...
application/index/view/agent/agent.html
View file @
6d53df59
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
<th>
用户名
</th>
<th>
用户名
</th>
<th>
手机号
</th>
<th>
手机号
</th>
<th>
门店名
</th>
<th>
门店名
</th>
<th>
地址
</th>
<th>
区域
</th>
<th>
注册时间
</th>
<th>
注册时间
</th>
<th>
状态
</th>
<th>
状态
</th>
<th>
操作
</th>
<th>
操作
</th>
...
...
application/index/view/agent/save_agent.html
View file @
6d53df59
...
@@ -23,7 +23,16 @@
...
@@ -23,7 +23,16 @@
<div
class=
"col-md-4"
>
<div
class=
"col-md-4"
>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
><i
class=
"fa fa-envelope"
></i></span>
<span
class=
"input-group-addon"
><i
class=
"fa fa-envelope"
></i></span>
<input
type=
"email"
class=
"form-control"
name=
"shop"
value=
""
placeholder=
"填写门店ID"
>
<input
type=
"number"
class=
"form-control"
name=
"store_id"
value=
""
placeholder=
"填写门店ID"
>
</div>
</div>
</div>
<div
class=
"form-group item_email "
>
<label
class=
"col-md-2 control-label"
><sup>
*
</sup>
区域ID
</label>
<div
class=
"col-md-4"
>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
><i
class=
"fa fa-envelope"
></i></span>
<input
type=
"number"
class=
"form-control"
id=
"district_id"
name=
"district_id"
value=
""
placeholder=
"填写区域ID"
>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -33,7 +42,7 @@
...
@@ -33,7 +42,7 @@
<div
class=
"col-md-4"
>
<div
class=
"col-md-4"
>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
><i
class=
"fa fa-phone"
></i></span>
<span
class=
"input-group-addon"
><i
class=
"fa fa-phone"
></i></span>
<input
type=
"number"
class=
"form-control"
name=
"
mobil
e"
value=
""
placeholder=
"填写手机号"
>
<input
type=
"number"
class=
"form-control"
name=
"
phon
e"
value=
""
placeholder=
"填写手机号"
>
</div>
</div>
</div>
</div>
...
@@ -79,15 +88,24 @@
...
@@ -79,15 +88,24 @@
</div>
</div>
<div
class=
"form-group item_depend_flag "
>
<div
class=
"form-group item_pid "
>
<label
class=
"col-md-2 control-label"
>
人物角色
</label>
<div
class=
"col-md-4"
>
<select
class=
"form-control"
name=
"auth_group_id"
id=
"auth_group_id"
>
</select>
</div>
</div>
</div>
<div
class=
"form-group item_allow_admin "
>
<div
class=
"form-group item_allow_admin "
>
<label
for=
"allow_admin"
class=
"col-md-2 control-label"
>
是否允许访问后台
</label>
<label
class=
"col-md-2 control-label"
>
是否允许访问后台
</label>
<div
class=
"col-md-4"
>
<div
class=
"col-md-4"
>
<select
name=
"admin_off"
id=
"allow_admin"
class=
"form-control"
>
<select
name=
"admin_off"
id=
"admin_off"
class=
"form-control"
>
<option
value=
""
>
请选择
</option>
<option
value=
"0"
>
允许
</option>
<option
value=
"0"
>
不允许
</option>
<option
value=
"1"
>
不允许
</option>
<option
value=
"1"
>
允许
</option>
</select>
</select>
</div>
</div>
</div>
</div>
...
@@ -95,16 +113,16 @@
...
@@ -95,16 +113,16 @@
<div
class=
"form-group item_description "
>
<div
class=
"form-group item_description "
>
<label
class=
"col-md-2 control-label"
>
个人说明
</label>
<label
class=
"col-md-2 control-label"
>
个人说明
</label>
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
<textarea
name=
"
description
"
class=
"form-control"
length=
"120"
rows=
"5"
></textarea>
<textarea
name=
"
remarks"
id=
"remarks
"
class=
"form-control"
length=
"120"
rows=
"5"
></textarea>
<p
class=
"help-block"
><i
class=
"fa fa-info-circle color-info1"
></i>
请填写个人说明
</p>
</div>
<p
class=
"help-block"
><i
class=
"fa fa-info-circle color-info1"
></i>
请填写个人说明
</p>
</div>
</div>
</div>
<div
class=
"form-group item_status "
>
<div
class=
"form-group item_status "
>
<label
for=
"status"
class=
"col-md-2 control-label"
>
状态
</label>
<label
for=
"status"
class=
"col-md-2 control-label"
>
状态
</label>
<div
class=
"col-md-4"
>
<div
class=
"col-md-4"
>
<select
name=
"status"
id=
"status"
class=
"form-control"
>
<select
name=
"status"
id=
"status"
class=
"form-control"
>
<option
value=
"
"
>
请选择
</option>
<option
value=
"0"
>
禁用
</option>
<option
value=
"
0"
>
正常
</option>
<option
value=
"1"
selected=
""
>
正常
</option>
<option
value=
"1"
>
冻结
</option>
<option
value=
"2"
>
待验证
</option>
<option
value=
"2"
>
离职
</option>
</select>
</select>
</div>
</div>
</div>
<hr>
</div>
<hr>
...
...
application/index/view/auth/auth_rule_box.html
View file @
6d53df59
...
@@ -20,7 +20,8 @@
...
@@ -20,7 +20,8 @@
<div
class=
"col-md-4"
>
<div
class=
"col-md-4"
>
<input
type=
"hidden"
value=
""
name=
"id"
id=
"id"
class=
"form-control"
>
<input
type=
"hidden"
value=
""
name=
"id"
id=
"id"
class=
"form-control"
>
</div>
</div>
<div
class=
"col-md-5 help-block"
><i
class=
"fa fa-info-circle color-info1"
></i>
ID
</div></div>
<div
class=
"col-md-5 help-block"
><i
class=
"fa fa-info-circle color-info1"
></i>
ID
</div>
</div>
<div
class=
"form-group item_title "
>
<div
class=
"form-group item_title "
>
...
@@ -28,7 +29,8 @@
...
@@ -28,7 +29,8 @@
<div
class=
"col-md-4"
>
<div
class=
"col-md-4"
>
<input
type=
"text"
value=
""
name=
"title"
class=
"form-control"
>
<input
type=
"text"
value=
""
name=
"title"
class=
"form-control"
>
</div>
</div>
<div
class=
"col-md-5 help-block"
><i
class=
"fa fa-info-circle color-info1"
></i>
用于后台显示的配置标题
</div></div>
<div
class=
"col-md-5 help-block"
><i
class=
"fa fa-info-circle color-info1"
></i>
用于后台显示的配置标题
</div>
</div>
<div
class=
"form-group item_depend_flag "
>
<div
class=
"form-group item_depend_flag "
>
<div
class=
"form-group item_pid "
>
<div
class=
"form-group item_pid "
>
...
@@ -40,6 +42,7 @@
...
@@ -40,6 +42,7 @@
</div>
</div>
</div>
</div>
</div>
<div
class=
"form-group item_name "
>
<div
class=
"form-group item_name "
>
<label
class=
"col-md-2 control-label"
>
链接
</label>
<label
class=
"col-md-2 control-label"
>
链接
</label>
...
...
application/index/view/auth/role_edit.html
View file @
6d53df59
{layout name="global/frame_tpl" /}
{layout name="global/frame_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"role_edit"
/>
<input
type=
"hidden"
class=
"page-load"
id=
"role_edit"
/>
<input
type=
"hidden"
name=
"id"
value=
""
/>
<div
id=
"page-content-wrapper"
>
<div
id=
"page-content-wrapper"
>
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"col-lg-10 col-lg-offset-0"
>
<div
class=
"col-lg-10 col-lg-offset-0"
>
<div
class=
"builder-tabs builder-form-tabs"
>
<div
class=
"builder-tabs builder-form-tabs"
>
<ul
class=
"nav nav-tabs"
>
<ul
class=
"nav nav-tabs"
>
<li
class=
"active"
><a
href=
"/admin.php/index/roleedit/1.html"
>
角色信息
</a></li>
<li
class=
"active"
><a
href=
"/admin.php/index/roleedit/1.html"
>
角色信息
</a></li>
<li
class=
""
><a
href=
"/admin.php/index/access/1.html"
>
权限分配
</a></li>
<li
id=
"li2"
class=
""
><a
href=
"/admin.php/index/access/1.html"
>
权限分配
</a></li>
<li
class=
""
><a
href=
"/admin.php/index/accessUser/1.html"
>
成员授权
</a></li>
<li
id=
"li3"
class=
""
><a
href=
"/admin.php/index/accessUser/1.html"
>
成员授权
</a></li>
</ul>
</ul>
<div
class=
"form-group"
></div>
<div
class=
"form-group"
></div>
</div>
</div>
...
@@ -18,7 +20,7 @@
...
@@ -18,7 +20,7 @@
<fieldset>
<fieldset>
<!-- <input type="hidden" name="id" value="3">-->
<!-- <input type="hidden" name="id" value="3">-->
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
for=
"title"
class=
"col-md-2 control-label"
>
名称:
</label>
<label
class=
"col-md-2 control-label"
>
名称:
</label>
<div
class=
"col-md-10"
>
<div
class=
"col-md-10"
>
<input
type=
"text"
class=
"form-control"
name=
"title"
placeholder=
"创建的角色名称"
value=
""
>
<input
type=
"text"
class=
"form-control"
name=
"title"
placeholder=
"创建的角色名称"
value=
""
>
<span
class=
"material-input"
></span>
<span
class=
"material-input"
></span>
...
@@ -34,7 +36,8 @@
...
@@ -34,7 +36,8 @@
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<div
class=
"col-md-12 col-md-offset-2"
>
<div
class=
"col-md-12 col-md-offset-2"
>
<div
class=
"col-md-3"
><button
class=
"btn btn-block btn-primary submit ajax-post"
type=
"submit"
target-form=
"form-builder"
>
确定
</button></div>
<div
class=
"col-md-3"
>
<a
class=
"btn btn-block btn-primary submit ajax-post"
id=
"submit"
>
确定
</a></div>
<div
class=
"col-md-3"
><button
class=
"btn btn-block btn-default return"
onclick=
"javascript:history.back(-1);return false;"
>
返回
</button></div>
<div
class=
"col-md-3"
><button
class=
"btn btn-block btn-default return"
onclick=
"javascript:history.back(-1);return false;"
>
返回
</button></div>
</div>
</div>
</div>
</div>
...
...
application/model/AuthGroup.php
View file @
6d53df59
...
@@ -186,6 +186,12 @@ class AuthGroup extends BaseModel
...
@@ -186,6 +186,12 @@ class AuthGroup extends BaseModel
->
page
(
$pageNo
)
->
page
(
$pageNo
)
->
select
();
->
select
();
}
}
public
function
getList2
(
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
return
$this
->
field
(
$field
)
->
where
(
$params
)
->
order
(
$order_
)
->
select
();
}
/**
/**
*检查重复
*检查重复
*
*
...
...
application/route.php
View file @
6d53df59
...
@@ -80,6 +80,7 @@ Route::group('index', [
...
@@ -80,6 +80,7 @@ Route::group('index', [
//权限管理
//权限管理
'classList'
=>
[
'index/auth/classList'
,[
'method'
=>
'get'
]],
//分类列表
'classList'
=>
[
'index/auth/classList'
,[
'method'
=>
'get'
]],
//分类列表
'getAuth'
=>
[
'index/auth/getAuth'
,
[
'method'
=>
'get'
]],
//角色列表
'getAuth'
=>
[
'index/auth/getAuth'
,
[
'method'
=>
'get'
]],
//角色列表
'getAuth2'
=>
[
'index/auth/getAuth2'
,
[
'method'
=>
'get'
]],
//角色列表2无分页
'roleedit'
=>
[
'index/auth/roleEdit'
,
[
'method'
=>
'get'
]],
//--编辑角色页面
'roleedit'
=>
[
'index/auth/roleEdit'
,
[
'method'
=>
'get'
]],
//--编辑角色页面
'access'
=>
[
'index/auth/access'
,
[
'method'
=>
'get'
]],
//--权限分配角色页面
'access'
=>
[
'index/auth/access'
,
[
'method'
=>
'get'
]],
//--权限分配角色页面
'updateAccess'
=>
[
'index/auth/updateAccess'
,
[
'method'
=>
'post'
]],
//--编辑角色权限【接口】
'updateAccess'
=>
[
'index/auth/updateAccess'
,
[
'method'
=>
'post'
]],
//--编辑角色权限【接口】
...
@@ -97,7 +98,7 @@ Route::group('index', [
...
@@ -97,7 +98,7 @@ Route::group('index', [
'agent'
=>
[
'index/agent/agent'
,
[
'method'
=>
'get'
]],
//列表
'agent'
=>
[
'index/agent/agent'
,
[
'method'
=>
'get'
]],
//列表
'saveAgentIndex'
=>
[
'index/agent/saveAgentIndex'
,
[
'method'
=>
'get'
]],
//列表
'saveAgentIndex'
=>
[
'index/agent/saveAgentIndex'
,
[
'method'
=>
'get'
]],
//列表
'AgentList'
=>
[
'index/agent/AgentList'
,
[
'method'
=>
'get'
]],
//列表
'AgentList'
=>
[
'index/agent/AgentList'
,
[
'method'
=>
'get'
]],
//列表
'saveAgent'
=>
[
'index/agent/saveAgent'
,
[
'method'
=>
'
ge
t'
]],
//列表
'saveAgent'
=>
[
'index/agent/saveAgent'
,
[
'method'
=>
'
pos
t'
]],
//列表
'updateStatus'
=>
[
'index/agent/updateStatus'
,
[
'method'
=>
'get'
]],
//列表
'updateStatus'
=>
[
'index/agent/updateStatus'
,
[
'method'
=>
'get'
]],
//列表
'updateRole'
=>
[
'index/agent/updateRole'
,
[
'method'
=>
'get'
]],
//列表
'updateRole'
=>
[
'index/agent/updateRole'
,
[
'method'
=>
'get'
]],
//列表
...
...
public/resource/js/role_edit.js
View file @
6d53df59
...
@@ -10,21 +10,44 @@ define (['doT', 'css!style/home.css','pagination','bootstrapJs'], function (doT,
...
@@ -10,21 +10,44 @@ define (['doT', 'css!style/home.css','pagination','bootstrapJs'], function (doT,
},
},
event
:
function
()
{
event
:
function
()
{
$
(
"#sss"
).
click
(
function
(){
$
(
"#submit"
).
click
(
function
(){
var
par
=
{}
par
.
id
=
$
(
"input[name = id]"
).
val
();
par
.
title
=
$
(
"input[name =title]"
).
val
();
par
.
description
=
$
(
"input[name =description]"
).
val
();
$
.
ajax
({
url
:
'/index/addAuth'
,
data
:
par
,
type
:
'post'
,
async
:
true
,
dataType
:
'json'
,
success
:
function
(
data
)
{
alert
(
data
.
msg
);
console
.
log
(
data
);
}
});
});
});
},
},
getList
:
function
(){
getList
:
function
(){
//ajax
//ajax
var
id
=
getUrlParam
(
'id'
);
var
id
=
getUrlParam
(
'id'
);
//判断是否有id参数
if
(
!
id
){
$
(
"#li2"
).
hide
();
$
(
"#li3"
).
hide
();
return
false
;
}
$
.
ajax
({
$
.
ajax
({
url
:
'/index/addAuth/group_id/'
+
id
,
url
:
'/index/addAuth/group_id/'
+
id
,
type
:
'post'
,
type
:
'post'
,
async
:
true
,
async
:
true
,
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
$
(
"input[name = title]"
).
val
(
data
.
data
.
title
);
$
(
"input[name = id]"
).
val
(
data
.
data
.
id
);
$
(
"#description"
).
val
(
data
.
data
.
description
);
$
(
"input[name = title]"
).
val
(
data
.
data
.
title
);
$
(
"#description"
).
val
(
data
.
data
.
description
);
}
}
})
})
...
...
public/resource/js/save_agent.js
View file @
6d53df59
define
([
'doT'
,
''
,
'css!style/home.css'
,
'bootstrapJs'
],
function
(
doT
,
template
)
{
define
([
'doT'
,
'
text!temp/get_auth_list_template_tpl.html
'
,
'css!style/home.css'
,
'bootstrapJs'
],
function
(
doT
,
template
)
{
aagent
=
{
aagent
=
{
init
:
function
()
{
init
:
function
()
{
//初始化dot
//初始化dot
...
@@ -14,9 +14,16 @@ define (['doT', '', 'css!style/home.css','bootstrapJs'], function (doT, template
...
@@ -14,9 +14,16 @@ define (['doT', '', 'css!style/home.css','bootstrapJs'], function (doT, template
par
.
name
=
$
(
"input[name = name]"
).
val
();
par
.
name
=
$
(
"input[name = name]"
).
val
();
par
.
store_id
=
$
(
"input[name = store_id]"
).
val
();
par
.
store_id
=
$
(
"input[name = store_id]"
).
val
();
par
.
phone
=
$
(
"input[name = phone]"
).
val
();
par
.
phone
=
$
(
"input[name = phone]"
).
val
();
par
.
admin_off
=
$
(
"input[name = admin_off]"
).
val
();
if
(
par
.
phone
==
''
){
alert
(
'手机号必填!'
);
return
false
;
}
par
.
admin_off
=
$
(
"#admin_off"
).
val
();
par
.
district_id
=
$
(
'#district_id'
).
val
();
par
.
sex
=
$
(
"input[name =sex]:checked"
).
val
();
par
.
sex
=
$
(
"input[name =sex]:checked"
).
val
();
par
.
remarks
=
$
(
"input[name =remarks]"
).
val
();
par
.
remarks
=
$
(
"#remarks"
).
val
();
par
.
auth_group_id
=
$
(
"#auth_group_id"
).
val
();
par
.
status
=
$
(
"#status"
).
val
();
$
.
ajax
({
$
.
ajax
({
url
:
'/index/saveAgent'
,
url
:
'/index/saveAgent'
,
data
:
par
,
data
:
par
,
...
@@ -35,14 +42,24 @@ define (['doT', '', 'css!style/home.css','bootstrapJs'], function (doT, template
...
@@ -35,14 +42,24 @@ define (['doT', '', 'css!style/home.css','bootstrapJs'], function (doT, template
},
},
getList
:
function
(){
getList
:
function
(){
$
.
ajax
({
url
:
'/index/getAuth2'
,
type
:
'GET'
,
async
:
true
,
dataType
:
'json'
,
success
:
function
(
data
)
{
var
temp
=
document
.
getElementById
(
'get_auth_list'
).
innerHTML
;
var
doTempl
=
doT
.
template
(
temp
);
$
(
"#auth_group_id"
).
html
(
doTempl
(
data
.
data
.
list
));
//赋值
}
});
var
id
=
getUrlParam
(
'id'
);
var
id
=
getUrlParam
(
'id'
);
//判断是否有id参数
//判断是否有id参数
if
(
!
id
){
if
(
!
id
){
return
false
;
return
false
;
}
}
$
.
ajax
({
$
.
ajax
({
url
:
'/index/
updateAuthRule
/group_id/'
+
id
,
url
:
'/index/
saveAgent
/group_id/'
+
id
,
type
:
'post'
,
type
:
'post'
,
async
:
true
,
async
:
true
,
dataType
:
'json'
,
dataType
:
'json'
,
...
@@ -51,8 +68,10 @@ define (['doT', '', 'css!style/home.css','bootstrapJs'], function (doT, template
...
@@ -51,8 +68,10 @@ define (['doT', '', 'css!style/home.css','bootstrapJs'], function (doT, template
$
(
"input[name = phone]"
).
val
(
data
.
data
.
phone
);
$
(
"input[name = phone]"
).
val
(
data
.
data
.
phone
);
$
(
"input[name = name]"
).
val
(
data
.
data
.
name
);
$
(
"input[name = name]"
).
val
(
data
.
data
.
name
);
$
(
"input[name = store_id]"
).
val
(
data
.
data
.
store_id
);
$
(
"input[name = store_id]"
).
val
(
data
.
data
.
store_id
);
$
(
"input[name = remarks]"
).
val
(
data
.
data
.
remarks
);
$
(
"#admin_off"
).
val
(
data
.
data
.
admin_off
);
$
(
"#remarks"
).
val
(
data
.
data
.
remarks
);
$
(
"#status"
).
val
(
data
.
data
.
status
);
$
(
"#auth_group_id"
).
val
(
data
.
data
.
auth_group_id
);
if
(
data
.
data
.
sex
==
'0'
){
if
(
data
.
data
.
sex
==
'0'
){
$
(
"#sex0"
).
attr
(
'checked'
,
true
);
$
(
"#sex0"
).
attr
(
'checked'
,
true
);
}
else
if
(
data
.
data
.
sex
==
'1'
){
}
else
if
(
data
.
data
.
sex
==
'1'
){
...
@@ -69,3 +88,4 @@ define (['doT', '', 'css!style/home.css','bootstrapJs'], function (doT, template
...
@@ -69,3 +88,4 @@ define (['doT', '', 'css!style/home.css','bootstrapJs'], function (doT, template
}
}
return
aagent
;
return
aagent
;
});
});
public/resource/template/agent_template_tpl.html
View file @
6d53df59
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<
td
>
[
%=
it
[
item
][
"status"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"status"
]
%
]
<
/td
>
<!--<
td
><
span
class
=
"fa fa-check text-success"
><
/span></
td
>-->
<!--<
td
><
span
class
=
"fa fa-check text-success"
><
/span></
td
>-->
<
td
>
<
td
>
<
a
style
=
"margin-right:6px;"
href
=
"/index/
authRuleBo
x.html?id=[%= it[item]['id'] %]"
class
=
"btn btn-primary btn-xs"
title
=
"编辑"
>
编辑
<
/a
>
<
a
style
=
"margin-right:6px;"
href
=
"/index/
saveAgentInde
x.html?id=[%= it[item]['id'] %]"
class
=
"btn btn-primary btn-xs"
title
=
"编辑"
>
编辑
<
/a
>
<
a
style
=
"margin-right:6px;"
href
=
""
class
=
"btn btn-warning btn-xs ajax-get confirm"
title
=
"禁用"
>
禁用
<
/a
>
<
a
style
=
"margin-right:6px;"
href
=
""
class
=
"btn btn-warning btn-xs ajax-get confirm"
title
=
"禁用"
>
禁用
<
/a
>
<
/td
>
<
/td
>
<
/tr
>
<
/tr
>
...
...
public/resource/template/get_auth_list_template_tpl.html
0 → 100644
View file @
6d53df59
<script
id=
"get_auth_list"
type=
"text/template"
>
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
<
option
value
=
"[%= it[item]['id'] %]"
>
[
%=
it
[
item
][
"title"
]
%
]
<
/option
>
[
%
}
%
]
[
%
}
%
]
</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