|
...
|
...
|
@@ -43,17 +43,18 @@ class SyncMobile extends Command |
|
|
|
$data = $client->request('GET', $url, [
|
|
|
|
'proxy' => env('CURL_PROXY'), // 代理服务器地址和端口号
|
|
|
|
])->getBody()->getContents();
|
|
|
|
$data = json_decode($data, true);
|
|
|
|
DB::table('gl_mobile')->delete();
|
|
|
|
$create_time = date('Y-m-d H:i:s');
|
|
|
|
foreach ($data as $v){
|
|
|
|
$param = [
|
|
|
|
'mobile'=>$v,
|
|
|
|
'created_at'=>$create_time
|
|
|
|
];
|
|
|
|
DB::table('gl_mobile')->insert($param);
|
|
|
|
}
|
|
|
|
dd($data);
|
|
|
|
if(!empty($data)){
|
|
|
|
$data = json_decode($data, true);
|
|
|
|
DB::table('gl_mobile')->delete();
|
|
|
|
$create_time = date('Y-m-d H:i:s');
|
|
|
|
foreach ($data as $v){
|
|
|
|
$param = [
|
|
|
|
'mobile'=>$v,
|
|
|
|
'created_at'=>$create_time
|
|
|
|
];
|
|
|
|
DB::table('gl_mobile')->insert($param);
|
|
|
|
}
|
|
|
|
$userModel = new User();
|
|
|
|
try {
|
|
|
|
$data[] = '13083988828';
|
...
|
...
|
|