完善上号流程
This commit is contained in:
parent
ee9b47ce40
commit
b691331fe1
|
@ -78,7 +78,7 @@ class TaskController
|
||||||
$user_id = $request->data['id'];
|
$user_id = $request->data['id'];
|
||||||
$phone = $request->post('phone');
|
$phone = $request->post('phone');
|
||||||
$GetLodeLog = GetLodeLog::where('phone', $phone)->first();
|
$GetLodeLog = GetLodeLog::where('phone', $phone)->first();
|
||||||
if ($GetLodeLog->status == 0) {
|
if ($GetLodeLog->status == 0&&!empty($GetLodeLog)) {
|
||||||
return ApiResponseApp::success([]);
|
return ApiResponseApp::success([]);
|
||||||
}
|
}
|
||||||
if ($GetLodeLog->status == 1) {
|
if ($GetLodeLog->status == 1) {
|
||||||
|
@ -89,7 +89,7 @@ class TaskController
|
||||||
/**
|
/**
|
||||||
* 这里查询是否上号成功 2是等待上号
|
* 这里查询是否上号成功 2是等待上号
|
||||||
*/
|
*/
|
||||||
if ($GetLodeLog->status == 2) {
|
if ($GetLodeLog->status == 2&&!empty($GetLodeLog)) {
|
||||||
$ws_build_status = SendCode::get_ws_status($phone) == 0;
|
$ws_build_status = SendCode::get_ws_status($phone) == 0;
|
||||||
//上号成功
|
//上号成功
|
||||||
if (UserPhone::where('phone', $phone)->count() == 0 && $ws_build_status) {
|
if (UserPhone::where('phone', $phone)->count() == 0 && $ws_build_status) {
|
||||||
|
@ -102,7 +102,7 @@ class TaskController
|
||||||
$UserPhone->save();
|
$UserPhone->save();
|
||||||
$GetLodeLog->delete();
|
$GetLodeLog->delete();
|
||||||
//首次成功关联,赠送50积分
|
//首次成功关联,赠送50积分
|
||||||
// $this->first_phone($phone, $user_id);
|
$this->first_phone($phone, $user_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ApiResponseApp::success([]);
|
return ApiResponseApp::success([]);
|
||||||
|
|
Loading…
Reference in New Issue