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
75772249
Commit
75772249
authored
May 17, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑经纪人更换手机号处理
parent
031d9cc9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
9 deletions
+16
-9
Agent.php
application/index/controller/Agent.php
+15
-9
agent.js
public/resource/js/agent.js
+1
-0
No files found.
application/index/controller/Agent.php
View file @
75772249
...
...
@@ -125,15 +125,11 @@ class Agent extends Basic
return
$this
->
response
(
101
,
'门店id为空!'
);
}
$
password
=
$m_agent
->
verifyUser
(
'password'
,
''
,
[
'phone'
=>
$this
->
params
[
'phone'
]]);
$
num
=
0
;
//判断重复手机号
//新增或者编辑数据
if
(
empty
(
$this
->
params
[
'id'
]))
{
//判断name是否重复
if
(
!
empty
(
$password
))
{
return
$this
->
response
(
101
,
'手机号重复'
);
}
$num
=
$m_agent
->
getListDistrictTotal
([
'phone'
=>
$this
->
params
[
'phone'
]]);
$data
[
'create_time'
]
=
date
(
'Y-m-d H:i:s'
,
time
());
$data
[
'update_time'
]
=
date
(
'Y-m-d H:i:s'
,
time
());
...
...
@@ -141,16 +137,26 @@ class Agent extends Basic
$data
[
'password'
]
=
md5
(
substr
(
$this
->
params
[
'phone'
],
-
6
));
//默认号码后6位
$data
[
'auth_group_id'
]
=
5
;
}
else
{
$agent_data
=
$m_agent
->
verifyUser
(
'phone,password'
,
''
,
[
'id'
=>
$this
->
params
[
'id'
]]);
if
(
$agent_data
[
'phone'
]
!=
$this
->
params
[
'phone'
])
{
$num
=
$m_agent
->
getListDistrictTotal
([
'phone'
=>
$this
->
params
[
'phone'
]]);
}
$data
[
'update_time'
]
=
date
(
'Y-m-d H:i:s'
,
time
());
if
(
!
empty
(
$this
->
params
[
'password'
]))
{
if
(
!
empty
(
$this
->
params
[
'password'
])
&&
!
empty
(
$agent_data
[
'password'
])
)
{
$md5_password
=
md5
(
$this
->
params
[
'password'
]);
if
((
$md5_password
!=
$
password
[
'password'
])
&&
(
$password
[
'password'
]
!=
$this
->
params
[
'password'
]))
{
if
((
$md5_password
!=
$
agent_data
[
'password'
])
&&
(
$agent_data
[
'password'
]
!=
$this
->
params
[
'password'
]))
{
$data
[
'password'
]
=
$md5_password
;
}
}
}
if
(
$num
>
0
)
{
return
$this
->
response
(
101
,
'手机号重复'
);
}
$store
=
new
AStore
();
$data
[
'district_id'
]
=
$store
->
getStoreKeyById
(
'district_id'
,
[
'id'
=>
$this
->
params
[
'store_id'
]]);
...
...
public/resource/js/agent.js
View file @
75772249
...
...
@@ -30,6 +30,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
$
(
".form-horizontal"
)[
0
].
reset
();
//重置表单
agent
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
$
(
"#password"
).
parent
().
removeClass
(
'hide'
);
//编辑显示密码
$
(
"#password"
).
attr
(
'type'
,
'text'
);
agent
.
Edit
();
});
...
...
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