Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
U
User
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
zhangjun
User
Commits
f293329a
Commit
f293329a
authored
Jul 08, 2022
by
zhangjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
634c0e14
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
134 additions
and
4 deletions
+134
-4
register.php
center/controllers/register.php
+56
-1
findpassword.php
center/views/findpassword.php
+48
-1
constants.php
esf_core/config/constants.php
+2
-2
user_model.php
esf_core/models/user_model.php
+28
-0
No files found.
center/controllers/register.php
View file @
f293329a
...
@@ -662,7 +662,7 @@ class Register extends MY_Controller {
...
@@ -662,7 +662,7 @@ class Register extends MY_Controller {
if
(
$ucenterTel
){
if
(
$ucenterTel
){
$return
=
$this
->
user_model
->
ucenterAuthCode
(
$tt
[
'telno'
]);
$return
=
$this
->
user_model
->
ucenterAuthCode
(
$tt
[
'telno'
]);
$return
=
$return
?
1
:
2
;
$return
=
$return
?
1
:
2
;
$return
=
$return
?
1
:
2
;
$return
=
$return
?
1
:
2
;
}
elseif
(
!
$ucenterTel
&&
$result2
>
0
){
}
elseif
(
!
$ucenterTel
&&
$result2
>
0
){
...
@@ -685,6 +685,61 @@ class Register extends MY_Controller {
...
@@ -685,6 +685,61 @@ class Register extends MY_Controller {
}
}
}
}
/**
* 获取验证码
* @author zj add
*/
public
function
forget_getyzm_ucenter
()
{
//验证是否已经通过验证
$validcode
=
random
(
6
);
$tt
=
array
();
$tt
[
'validcode'
]
=
$validcode
;
$tt
[
'telno'
]
=
$this
->
input
->
post
(
'telno'
,
TRUE
);
$tt
[
'kind'
]
=
$this
->
input
->
post
(
'kind'
,
TRUE
);
$tt
[
'dateline'
]
=
time
();
//$tt['yztelno'] = $this->input->post('yztelno',TRUE);
//$tt['ip'] = get_ip();
$security_key
=
$this
->
input
->
post
(
'security_key'
,
TRUE
);
// echo GB_CITY;
$security_key_yz
=
$_SESSION
[
GB_CITY
.
'_register_num_2'
];
// echo $security_key;echo "||";
//echo $security_key_yz;
if
(
$security_key
==
""
||
$security_key
!=
$security_key_yz
){
echo
'400'
;
exit
();
}
if
(
$tt
[
'telno'
]
===
false
||
$tt
[
'kind'
]
===
false
)
{
echo
'400'
;
exit
;
}
else
if
(
$tt
[
'kind'
]
==
4
)
{
//改成验证全站电话
$result2
=
$this
->
user_model
->
yztelno
(
$tt
[
'telno'
]);
/*if(!empty($_COOKIE['zkg'])){
var_dump($ucenterTel);die;
}*/
if
(
$result2
==
0
)
{
echo
'6'
;
exit
;
}
}
$return
=
$this
->
user_model
->
sendAuthSms
(
$tt
[
'telno'
]);
echo
$return
;
exit
();
//sendsms($tt['telno'],$msg,'sx');
//echo '1';
}
/**
/**
...
...
center/views/findpassword.php
View file @
f293329a
...
@@ -81,7 +81,54 @@ $(function(){
...
@@ -81,7 +81,54 @@ $(function(){
<script>
<script>
//发送验证码
//发送验证码
$
(
'#getcode'
).
getVnum
();
$
(
'#getcode'
).
click
(
function
()
{
var
time
=
0
;
var
kind
=
$
(
"#kind"
).
val
();
var
telno
=
$
(
"#telno"
).
val
();
var
yztelno
=
$
(
"#yztelno"
).
val
();
var
security_key_2
=
$
(
"#security_key_2"
).
val
();
var
security_num
=
$
(
"#security_num"
).
val
();
var
security_key
=
$
(
"#security_key"
).
val
();
//alert(security_key_2);
if
(
time
==
0
)
{
var
partten
=
/^1
[
0-9
]{10}
$/
;
//手机号码
if
(
partten
.
test
(
telno
))
{
$
.
post
(
'http://user.house365.com/register/forget_getyzm_ucenter'
,{
act
:
'getyzm'
,
telno
:
telno
,
kind
:
kind
,
yztelno
:
yztelno
,
security_key
:
security_key_2
},
function
(
data
){
if
(
data
==
'1'
){
time
=
60
;
var
oTime
=
null
;
self
.
val
(
'重新获取('
+
time
+
')'
);
self
.
css
({
"color"
:
"#999"
});
oTime
=
setInterval
(
function
(){
if
(
time
>
0
){
time
--
;
self
.
val
(
'重新获取('
+
time
+
')'
);}
else
{
clearInterval
(
oTime
);
self
.
val
(
'获取验证码'
);
self
.
css
({
"color"
:
"#000"
});
$
(
'#sendingnote'
).
hide
();}}
,
1000
);
}
else
if
(
data
==
'2'
){
$
(
'#orderhouse_validcode'
).
html
(
'验证码获取失败,请刷新页面重新获取。'
).
show
();
}
else
if
(
data
==
'4'
){
$
(
'#orderhouse_validcode'
).
html
(
"今日操作已超过4次,请明日再来。"
).
show
();
}
else
if
(
data
==
'6'
){
$
(
"#js_errorBox1"
).
removeClass
(
"Validform_checktip Validform_right"
).
addClass
(
"Validform_checktip Validform_wrong"
)
$
(
"#js_errorBox1"
).
html
(
"您的手机号码未注册过,请直接注册。"
);
}
else
if
(
data
==
'7'
){
$
(
"#js_errorBox1"
).
removeClass
(
"Validform_checktip Validform_right"
).
addClass
(
"Validform_checktip Validform_wrong"
)
$
(
"#js_errorBox1"
).
html
(
"您的操作过于频繁,请稍后再试"
);
}
else
if
(
data
==
'400'
){
$
(
"#js_errorBox1"
).
removeClass
(
"Validform_checktip Validform_right"
).
addClass
(
"Validform_checktip Validform_wrong"
)
$
(
"#js_errorBox1"
).
html
(
"页面参数错误,请刷新后再试"
);
}
}
);
}
else
{
$
(
"#js_errorBox1"
).
empty
();
$
(
"#js_errorBox1"
).
removeClass
(
"Validform_checktip Validform_right"
).
addClass
(
"Validform_checktip Validform_wrong"
)
$
(
"#js_errorBox1"
).
html
(
"请输入正确的手机号码。"
);
}
}
});
function
yz
(){
function
yz
(){
var
flag
=
true
;
var
flag
=
true
;
...
...
esf_core/config/constants.php
View file @
f293329a
...
@@ -384,9 +384,9 @@ define('USER_CENTER','http://user.house365.com/');
...
@@ -384,9 +384,9 @@ define('USER_CENTER','http://user.house365.com/');
// 发送短信接口地址
// 发送短信接口地址
define
(
'GB_SEND_SMS_URL'
,
'http://
user.house365.com/
'
);
define
(
'GB_SEND_SMS_URL'
,
'http://
newrenttest.house365.com/api/tf-app/send-auth-sms
'
);
// 提交忘记密码接口地址
// 提交忘记密码接口地址
define
(
'GB_FORGET_
SMS_URL'
,
'http://user.house365.com/
'
);
define
(
'GB_FORGET_
PWD_URL'
,
'http://newrenttest.house365.com/api/tf-app/forget-pwd
'
);
// 修改手机页面地址
// 修改手机页面地址
define
(
'GB_EDIT_PHONE_URL'
,
'http://newrenttest.house365.com/user-center/edit-phone'
);
define
(
'GB_EDIT_PHONE_URL'
,
'http://newrenttest.house365.com/user-center/edit-phone'
);
// 修改密码页面地址
// 修改密码页面地址
...
...
esf_core/models/user_model.php
View file @
f293329a
...
@@ -695,6 +695,34 @@ class User_model extends MY_Model
...
@@ -695,6 +695,34 @@ class User_model extends MY_Model
}
}
}
}
/**
* 验证是否该用户已注册过手机号
* @param int $uid
* @return string
*/
function
sendAuthSms
(
$telno
)
{
$url
=
GB_SEND_SMS_URL
.
'?telno='
.
$telno
;
$userRes
=
curl_get_contents
(
$url
);
$userRes
=
!
empty
(
$userRes
)
?
json_decode
(
$userRes
,
1
)
:
array
();
$res
=
isset
(
$userRes
[
'result'
]
)
?
isset
(
$userRes
[
'result'
]
)
:
0
;
return
$res
;
}
/**
* 验证是否该用户已注册过手机号
* @param int $uid
* @return string
*/
function
forgetPwd
(
$telno
,
$pwd
,
$code
,
$uid
)
{
$url
=
GB_FORGET_PWD_URL
.
'?phone='
.
$telno
.
'&pwd='
.
$pwd
.
'&uid='
.
$uid
.
'&code='
.
$code
;
$userRes
=
curl_get_contents
(
$url
);
$userRes
=
!
empty
(
$userRes
)
?
json_decode
(
$userRes
,
1
)
:
array
();
$userRes
[
'result'
]
=
isset
(
$userRes
[
'result'
]
)
?
isset
(
$userRes
[
'result'
]
)
:
0
;
return
$userRes
;
}
// /**
// /**
// * 验证是否该用户已注册过手机号,论坛用户绑定手机专用
// * 验证是否该用户已注册过手机号,论坛用户绑定手机专用
...
...
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