Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
quxiu
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冷斌
quxiu
Commits
43d5600f
Commit
43d5600f
authored
Apr 10, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
5632aadb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
32 deletions
+74
-32
application/Appapi/Controller/AuthController.class.php
+56
-31
themes/simplebootx/Appapi/Auth/authstep.html
+18
-1
No files found.
application/Appapi/Controller/AuthController.class.php
View file @
43d5600f
...
@@ -109,9 +109,45 @@ class AuthController extends HomebaseController {
...
@@ -109,9 +109,45 @@ class AuthController extends HomebaseController {
echo
json_encode
(
array
(
"ret"
=>
0
,
'data'
=>
array
(),
'msg'
=>
'您的登陆状态失效,请重新登陆!'
));
echo
json_encode
(
array
(
"ret"
=>
0
,
'data'
=>
array
(),
'msg'
=>
'您的登陆状态失效,请重新登陆!'
));
exit
;
exit
;
}
}
list
(
$ff
,
$userfam
)
=
$this
->
_checkFid
(
$fid
,
$uid
);
$data
[
'uid'
]
=
I
(
"uid"
);
$data
[
'real_name'
]
=
I
(
"real_name"
);
$data
[
'mobile'
]
=
I
(
"mobile"
);
$data
[
'cer_no'
]
=
I
(
"cer_no"
);
$data
[
'front_view'
]
=
I
(
"front_view"
);
$data
[
'back_view'
]
=
I
(
"back_view"
);
$data
[
'handset_view'
]
=
I
(
"handset_view"
);
$data
[
'status'
]
=
0
;
$data
[
'addtime'
]
=
time
();
$authid
=
M
(
"users_auth"
)
->
where
(
"uid='
{
$data
[
'uid'
]
}
'"
)
->
getField
(
"uid"
);
if
(
$authid
){
$result
=
M
(
"users_auth"
)
->
where
(
"uid='
{
$authid
}
'"
)
->
save
(
$data
);
}
else
{
$result
=
M
(
"users_auth"
)
->
add
(
$data
);
}
if
(
$result
!==
false
){
if
(
!
empty
(
$ff
))
{
if
(
$userfam
)
{
$family
=
M
(
"users_family"
)
->
where
(
'id='
.
$userfam
[
'id'
])
->
save
(
$ff
);
}
else
{
$family
=
M
(
"users_family"
)
->
add
(
$ff
);
}
}
echo
json_encode
(
array
(
"ret"
=>
200
,
'data'
=>
array
(),
'msg'
=>
''
));
}
else
{
echo
json_encode
(
array
(
"ret"
=>
0
,
'data'
=>
array
(),
'msg'
=>
'提交失败,请重新提交'
));
}
exit
;
}
protected
function
_checkFid
(
$fid
,
$uid
)
{
$ff
=
[];
$ff
=
[];
$userfam
=
false
;
$userfam
=
false
;
if
(
!
empty
(
$fid
)
&&
$fid
>
0
)
{
if
(
!
empty
(
$fid
)
&&
$fid
>
0
)
{
$Family
=
M
(
'family'
);
$Family
=
M
(
'family'
);
$familyinfo
=
$Family
->
where
(
"id=
{
$fid
}
"
)
->
find
();
$familyinfo
=
$Family
->
where
(
"id=
{
$fid
}
"
)
->
find
();
if
(
!
$familyinfo
){
if
(
!
$familyinfo
){
...
@@ -135,7 +171,6 @@ class AuthController extends HomebaseController {
...
@@ -135,7 +171,6 @@ class AuthController extends HomebaseController {
$Family
->
where
(
"uid=
{
$uid
}
"
)
->
delete
();
$Family
->
where
(
"uid=
{
$uid
}
"
)
->
delete
();
$user_family
->
where
(
"familyid=
{
$fam
[
'id'
]
}
"
)
->
delete
();
$user_family
->
where
(
"familyid=
{
$fam
[
'id'
]
}
"
)
->
delete
();
}
}
$userfam
=
$user_family
->
where
(
"uid=
{
$uid
}
"
)
->
find
();
$userfam
=
$user_family
->
where
(
"uid=
{
$uid
}
"
)
->
find
();
if
(
$userfam
)
if
(
$userfam
)
{
{
...
@@ -162,37 +197,27 @@ class AuthController extends HomebaseController {
...
@@ -162,37 +197,27 @@ class AuthController extends HomebaseController {
'divide_family'
=>
'-1'
,
'divide_family'
=>
'-1'
,
);
);
}
}
return
[
$ff
,
$userfam
];
$data
[
'uid'
]
=
I
(
"uid"
);
}
$data
[
'real_name'
]
=
I
(
"real_name"
);
$data
[
'mobile'
]
=
I
(
"mobile"
);
public
function
checkFid
()
$data
[
'cer_no'
]
=
I
(
"cer_no"
);
{
$data
[
'front_view'
]
=
I
(
"front_view"
);
$uid
=
I
(
"uid"
);
$data
[
'back_view'
]
=
I
(
"back_view"
);
$token
=
I
(
"token"
);
$data
[
'handset_view'
]
=
I
(
"handset_view"
);
$fid
=
I
(
"fid"
);
$data
[
'status'
]
=
0
;
$data
[
'addtime'
]
=
time
();
if
(
!
$uid
||
!
$token
||
checkToken
(
$uid
,
$token
)
==
700
){
$authid
=
M
(
"users_auth"
)
->
where
(
"uid='
{
$data
[
'uid'
]
}
'"
)
->
getField
(
"uid"
);
echo
json_encode
(
array
(
"ret"
=>
0
,
'data'
=>
array
(),
'msg'
=>
'您的登陆状态失效,请重新登陆!'
));
if
(
$authid
){
exit
;
$result
=
M
(
"users_auth"
)
->
where
(
"uid='
{
$authid
}
'"
)
->
save
(
$data
);
}
}
else
{
$result
=
M
(
"users_auth"
)
->
add
(
$data
);
$this
->
_checkFid
(
$fid
,
$uid
);
}
echo
json_encode
(
array
(
"ret"
=>
200
,
'data'
=>
array
(),
'msg'
=>
''
));
die
;
}
if
(
$result
!==
false
){
if
(
!
empty
(
$ff
))
{
if
(
$userfam
)
{
$family
=
M
(
"users_family"
)
->
where
(
'id='
.
$userfam
[
'id'
])
->
save
(
$ff
);
}
else
{
$family
=
M
(
"users_family"
)
->
add
(
$ff
);
}
}
echo
json_encode
(
array
(
"ret"
=>
200
,
'data'
=>
array
(),
'msg'
=>
''
));
}
else
{
echo
json_encode
(
array
(
"ret"
=>
0
,
'data'
=>
array
(),
'msg'
=>
'提交失败,请重新提交'
));
}
exit
;
}
/* 成功 */
/* 成功 */
public
function
success
(){
public
function
success
(){
$this
->
display
();
$this
->
display
();
...
...
themes/simplebootx/Appapi/Auth/authstep.html
View file @
43d5600f
...
@@ -178,7 +178,24 @@
...
@@ -178,7 +178,24 @@
layer
.
msg
(
"家族ID不能为空"
);
layer
.
msg
(
"家族ID不能为空"
);
return
;
return
;
}
}
this
.
auth2
();
let
_this
=
this
;
let
data
=
this
.
form
;
$
.
ajax
({
url
:
"./index.php?g=Appapi&m=Auth&a=checkFid"
,
dataType
:
"json"
,
data
:
data
,
type
:
"POST"
,
success
:
function
(
data
){
//console.log(data);
if
(
data
.
ret
==
200
){
_this
.
auth2
();
}
else
{
layer
.
msg
(
data
.
msg
);
}
},
error
:
function
(
e
){
layer
.
msg
(
e
.
msg
);
}
})
},
},
addImg
:
function
(
name
)
{
addImg
:
function
(
name
)
{
layer
.
msg
(
"修改已图片方法调用了"
);
layer
.
msg
(
"修改已图片方法调用了"
);
...
...
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