Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sunac-quanmin
Overview
Overview
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
HTML5-李恒逸
sunac-quanmin
Commits
ffabb5d1
Commit
ffabb5d1
authored
Jun 15, 2017
by
HTML5-侯张振
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 个人中心--修改绑定手机号,手机号和验证码输入之后,提示语不对,我现在用的是已经存在的手机号
parent
970ba304
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
5 deletions
+31
-5
customer.php
html/application/controllers/distributor/customer.php
+3
-0
myself.php
html/application/controllers/distributor/myself.php
+17
-3
user_model.php
html/application/models/user_model.php
+9
-0
changemobile.php
html/application/views/distributor/myself/changemobile.php
+2
-2
No files found.
html/application/controllers/distributor/customer.php
View file @
ffabb5d1
...
...
@@ -202,6 +202,9 @@ class Customer extends CI_Controller {
//先判断是否可以重新报备
//1规定时间内,未报备过的
$cbInfo
=
$this
->
customer_building
->
is_report
(
$cb_id
);
//前提未过期
if
(
is_array
(
$cbInfo
)
&&
!
$cbInfo
[
'valid_day'
])
{
$cbInfo
[
'valid_day'
]
=
7
;
}
if
(
$cbInfo
[
'report_status'
]
!=
'NEVER'
||
$time
<
(
$cbInfo
[
'create_time'
]
+
(
$cbInfo
[
'valid_day'
]
-
2
)
*
24
*
3600
)
...
...
html/application/controllers/distributor/myself.php
View file @
ffabb5d1
...
...
@@ -147,13 +147,27 @@ class Myself extends CI_Controller{
$cur_info
=
array
(
'user_mobile'
=>
$post
[
'mobile'
]
);
$use
=
array
(
'user_mobile'
=>
$post
[
'mobile'
],
'user_type'
=>
6
);
$get_user
=
$this
->
user
->
get_use_mobile
(
$use
);
$where
=
array
(
'id'
=>
$this
->
user_id
);
$check
=
$this
->
user
->
update
(
$where
,
$cur_info
);
if
(
$get_user
){
$result
=
array
(
'errcode'
=>
42123
,
'errmsg'
=>
'输入手机号码已存在'
);
echo
json_encode
(
$result
);
return
;
}
$check
=
$this
->
user
->
update
(
$where
,
$cur_info
);
if
(
$check
){
$this
->
session
->
sess_destroy
();
//get 获取请求登录页
alert_redirect
(
site_url
(
'distributor/logindis'
),
'修改成功'
);
return
;
alert_redirect
(
site_url
(
'distributor/logindis'
),
'修改成功'
);
return
;
}
$result
=
array
(
'errcode'
=>
42155
,
'errmsg'
=>
'修改失败,请稍候再试'
);
echo
json_encode
(
$result
);
...
...
html/application/models/user_model.php
View file @
ffabb5d1
...
...
@@ -198,4 +198,12 @@ class User_model extends MY_Model{
}
return
false
;
}
//查询是否有正在使用的手机号
public
function
get_use_mobile
(
$where
){
$this
->
db
->
select
(
'*'
)
->
from
(
'tb_user U'
)
->
where
(
$where
);
$query
=
$this
->
db
->
get
();
return
$query
->
row_array
();
}
}
\ No newline at end of file
html/application/views/distributor/myself/changemobile.php
View file @
ffabb5d1
...
...
@@ -129,8 +129,8 @@
}
},
error
:
function
(){
alert
(
'修改
成功
!'
);
window
.
location
.
href
=
"
<?php
echo
site_url
(
'distributor/logindis'
)
?>
"
;
alert
(
'修改
失败
!'
);
//
window.location.href="
<?php
echo
site_url
(
'distributor/logindis'
)
?>
";
}
});
});
...
...
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