修复错误ws账户会上号问题
This commit is contained in:
parent
a79c65e33b
commit
10c0d16d8a
|
@ -82,10 +82,13 @@ class TaskController
|
|||
$user_id = $request->data['id'];
|
||||
$phone = $request->post('phone');
|
||||
$GetLodeLog = GetLodeLog::where('phone', $phone)->first();
|
||||
if (!empty($GetLodeLog) && $GetLodeLog->status == 0) {
|
||||
if(is_null($GetLodeLog)){
|
||||
return ApiResponseApp::error([],'请发送验证码');
|
||||
}
|
||||
if ($GetLodeLog->status == 0) {
|
||||
return ApiResponseApp::success([]);
|
||||
}
|
||||
if (!empty($GetLodeLog) && $GetLodeLog->status == 1) {
|
||||
if ($GetLodeLog->status == 1) {
|
||||
$GetLodeLog->status = 2;
|
||||
$GetLodeLog->save();
|
||||
return ApiResponseApp::success(['code' => $GetLodeLog->code]);
|
||||
|
@ -93,8 +96,8 @@ class TaskController
|
|||
/**
|
||||
* 这里查询是否上号成功 2是等待上号
|
||||
*/
|
||||
if (!empty($GetLodeLog) && $GetLodeLog->status == 2) {
|
||||
$ws_build_status = SendCode::send_code($phone)['code'];
|
||||
if ($GetLodeLog->status == 2) {
|
||||
$ws_build_status = SendCode::get_ws_status($phone);
|
||||
//上号成功
|
||||
if ($ws_build_status == 0) {
|
||||
//检查是否在本地库中 如果不在则是全新
|
||||
|
|
Loading…
Reference in New Issue