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
be5533d5
Commit
be5533d5
authored
Jan 30, 2018
by
zfc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑
parent
f1efa662
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
20 deletions
+17
-20
save_agent.html
application/index/view/agent/save_agent.html
+1
-1
save_agent.js
public/resource/js/save_agent.js
+16
-19
No files found.
application/index/view/agent/save_agent.html
View file @
be5533d5
...
...
@@ -84,7 +84,7 @@
<div
class=
"form-group item_allow_admin "
>
<label
for=
"allow_admin"
class=
"col-md-2 control-label"
>
是否允许访问后台
</label>
<div
class=
"col-md-4"
>
<select
name=
"a
llow_admin
"
id=
"allow_admin"
class=
"form-control"
>
<select
name=
"a
dmin_off
"
id=
"allow_admin"
class=
"form-control"
>
<option
value=
""
>
请选择
</option>
<option
value=
"0"
>
不允许
</option>
<option
value=
"1"
>
允许
</option>
...
...
public/resource/js/save_agent.js
View file @
be5533d5
...
...
@@ -14,9 +14,9 @@ define (['doT', '', 'css!style/home.css','bootstrapJs'], function (doT, template
par
.
name
=
$
(
"input[name = name]"
).
val
();
par
.
store_id
=
$
(
"input[name = store_id]"
).
val
();
par
.
phone
=
$
(
"input[name = phone]"
).
val
();
par
.
store_id
=
$
(
"input[name = store_id]"
).
val
();
par
.
pid
=
$
(
"#pid"
).
val
();
par
.
admin_off
=
$
(
"input[name = admin_off]"
).
val
();
par
.
sex
=
$
(
"input[name =sex]:checked"
).
val
();
par
.
remarks
=
$
(
"input[name =remarks]"
).
val
();
$
.
ajax
({
url
:
'/index/saveAgent'
,
data
:
par
,
...
...
@@ -35,18 +35,12 @@ define (['doT', '', 'css!style/home.css','bootstrapJs'], function (doT, template
},
getList
:
function
(){
$
.
ajax
({
url
:
'/index/classList/type/1'
,
type
:
'GET'
,
async
:
true
,
dataType
:
'json'
,
success
:
function
(
data
)
{
var
temp
=
document
.
getElementById
(
'auth_class_tpl'
).
innerHTML
;
var
doTempl
=
doT
.
template
(
temp
);
$
(
"#pid"
).
html
(
doTempl
(
data
.
data
));
//赋值
}
});
var
id
=
getUrlParam
(
'id'
);
//判断是否有id参数
if
(
!
id
){
return
false
;
}
$
.
ajax
({
url
:
'/index/updateAuthRule/group_id/'
+
id
,
type
:
'post'
,
...
...
@@ -54,14 +48,17 @@ define (['doT', '', 'css!style/home.css','bootstrapJs'], function (doT, template
dataType
:
'json'
,
success
:
function
(
data
)
{
$
(
"input[name = id]"
).
val
(
data
.
data
.
id
);
$
(
"input[name =
title]"
).
val
(
data
.
data
.
titl
e
);
$
(
"input[name =
phone]"
).
val
(
data
.
data
.
phon
e
);
$
(
"input[name = name]"
).
val
(
data
.
data
.
name
);
$
(
"input[name = sort]"
).
val
(
data
.
data
.
sort
);
$
(
"#pid"
).
val
(
data
.
data
.
pid
);
if
(
data
.
data
.
is_menu
==
0
){
$
(
"#is_menu2"
).
attr
(
'checked'
,
true
);
$
(
"input[name = store_id]"
).
val
(
data
.
data
.
store_id
);
$
(
"input[name = remarks]"
).
val
(
data
.
data
.
remarks
);
if
(
data
.
data
.
sex
==
'0'
){
$
(
"#sex0"
).
attr
(
'checked'
,
true
);
}
else
if
(
data
.
data
.
sex
==
'1'
){
$
(
"#sex1"
).
attr
(
'checked'
,
true
);
}
else
{
$
(
"#
is_menu1
"
).
attr
(
'checked'
,
true
);
$
(
"#
sex2
"
).
attr
(
'checked'
,
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