Commit b78f6d50 authored by hujun's avatar hujun

url

parent aa9bfca7
......@@ -753,15 +753,19 @@ class PrivacyNumber
* 获取下载参数->开始下载->更新数据库已下载
*
* @return Response|\think\response\Json|\think\response\Jsonp|\think\response\Redirect|\think\response\View|\think\response\Xml|void
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
public function downVoiceByParams()
{
set_time_limit(0);
$params = Request::instance()->param();
if (!in_array($params['source'], [1,2])) {
return Response::create(['code'=>101, 'msg'=>'参数错误'], 'json');
}
$url = 'http://www.tptl.com/task/getDownVoiceParams?source='.$params['source'];
$base_url = 'https://api.tonglianjituan.com/task/';
$url = $base_url .'getDownVoiceParams?source='.$params['source'];
$get_params = curl_get($url);
$data = json_decode($get_params,true);
if ($data['code'] != 200) {
......@@ -808,13 +812,14 @@ class PrivacyNumber
if (file_exists(PHONE_VOICE.'/'.$save_path)) {
$update_id[] = $v['id'];
$this->m_down->updateData(['id'=>$v['id'], 'voice_file'=>$save_path]);
}
}
//更新下载
$id_string = implode(',', $update_id);
$url = 'http://www.tptl.com/task/updateDownVoiceId?id='.$id_string.'&source='.$params['source'];
curl_get($url);
$url = $base_url .'updateDownVoiceId?id='.$id_string.'&source='.$params['source'];
curl_post($url, ['id'=>$id_string, 'source'=>$params['source']], 30000);
return ;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment