Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
b78f6d50
Commit
b78f6d50
authored
Jun 24, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
url
parent
aa9bfca7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
PrivacyNumber.php
application/task/controller/PrivacyNumber.php
+8
-3
No files found.
application/task/controller/PrivacyNumber.php
View file @
b78f6d50
...
@@ -753,15 +753,19 @@ class PrivacyNumber
...
@@ -753,15 +753,19 @@ class PrivacyNumber
* 获取下载参数->开始下载->更新数据库已下载
* 获取下载参数->开始下载->更新数据库已下载
*
*
* @return Response|\think\response\Json|\think\response\Jsonp|\think\response\Redirect|\think\response\View|\think\response\Xml|void
* @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
()
public
function
downVoiceByParams
()
{
{
set_time_limit
(
0
);
$params
=
Request
::
instance
()
->
param
();
$params
=
Request
::
instance
()
->
param
();
if
(
!
in_array
(
$params
[
'source'
],
[
1
,
2
]))
{
if
(
!
in_array
(
$params
[
'source'
],
[
1
,
2
]))
{
return
Response
::
create
([
'code'
=>
101
,
'msg'
=>
'参数错误'
],
'json'
);
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
);
$get_params
=
curl_get
(
$url
);
$data
=
json_decode
(
$get_params
,
true
);
$data
=
json_decode
(
$get_params
,
true
);
if
(
$data
[
'code'
]
!=
200
)
{
if
(
$data
[
'code'
]
!=
200
)
{
...
@@ -808,13 +812,14 @@ class PrivacyNumber
...
@@ -808,13 +812,14 @@ class PrivacyNumber
if
(
file_exists
(
PHONE_VOICE
.
'/'
.
$save_path
))
{
if
(
file_exists
(
PHONE_VOICE
.
'/'
.
$save_path
))
{
$update_id
[]
=
$v
[
'id'
];
$update_id
[]
=
$v
[
'id'
];
$this
->
m_down
->
updateData
([
'id'
=>
$v
[
'id'
],
'voice_file'
=>
$save_path
]);
}
}
}
}
//更新下载
//更新下载
$id_string
=
implode
(
','
,
$update_id
);
$id_string
=
implode
(
','
,
$update_id
);
$url
=
'http://www.tptl.com/task/
updateDownVoiceId?id='
.
$id_string
.
'&source='
.
$params
[
'source'
];
$url
=
$base_url
.
'
updateDownVoiceId?id='
.
$id_string
.
'&source='
.
$params
[
'source'
];
curl_
get
(
$url
);
curl_
post
(
$url
,
[
'id'
=>
$id_string
,
'source'
=>
$params
[
'source'
]],
30000
);
return
;
return
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment