切换导航条
此项目
正在载入...
登录
潘浩文
/
maifuzi
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
潘浩文
6 years ago
提交
55a8e760fa29570f971955bed350a9a75f842ab4
1 个父辈
49eb5e87
1 个管道 的构建
通过
耗费 1 秒
接口
变更
1
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
15 行增加
和
1 行删除
api/wxapp/controller/PublicController.php
api/wxapp/controller/PublicController.php
查看文件 @
55a8e76
...
...
@@ -133,6 +133,13 @@ class PublicController extends RestBaseController
->
where
(
'openid'
,
$openid
)
->
where
(
'app_id'
,
$appId
)
->
update
(
$userData
);
$re
=
Db
::
name
(
'user'
)
->
where
(
'id'
,
$findThirdPartyUser
[
'user_id'
])
->
find
();
if
(
empty
(
$re
[
'mobile'
])){
$this
->
success
(
"请先手机号注册!"
,
[
'token'
=>
$token
]);
}
if
(
$re
[
'status'
]
!=
1
){
$this
->
success
(
"请先填写用户信息!"
,
[
'token'
=>
$token
]);
}
$this
->
success
(
"登录成功!"
,
[
'token'
=>
$token
]);
}
else
{
...
...
@@ -165,7 +172,14 @@ class PublicController extends RestBaseController
if
(
$userId
&&
$row
){
Db
::
commit
();
$token
=
cmf_generate_user_token
(
$userId
,
'wxapp'
);
$this
->
success
(
"登录成功!"
,
[
'token'
=>
$token
]);
$re
=
Db
::
name
(
'user'
)
->
where
(
'id'
,
$userId
)
->
find
();
if
(
empty
(
$re
[
'mobile'
])){
$this
->
success
(
"请先手机号注册!"
,
[
'token'
=>
$token
]);
}
if
(
$re
[
'status'
]
!=
1
){
$this
->
success
(
"请先填写用户信息!"
,
[
'token'
=>
$token
]);
}
$this
->
success
(
"登陆成功!"
,
[
'token'
=>
$token
]);
}
else
{
Db
::
rollback
();
$this
->
error
([
'code'
=>
'40004'
,
'msg'
=>
'登录失败'
]);
...
...
请
注册
或
登录
后发表评论