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
bdf8fd0b
Commit
bdf8fd0b
authored
Jun 27, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
尝试5次绑定隐私号码
parent
3e2baa1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
CellPhone.php
application/api_broker/controller/CellPhone.php
+24
-2
No files found.
application/api_broker/controller/CellPhone.php
View file @
bdf8fd0b
...
...
@@ -126,8 +126,8 @@ class CellPhone extends Basic
$record2
=
empty
(
$this
->
params
[
'record'
])
?
'true'
:
'false'
;
/* 是否录音(容联云规定string类型)*/
$aliYunPhone
=
new
AliYunPhone
();
$phone_x
=
$aliYunPhone
->
getAliYunPhone
(
$phone_a
,
$phone_b
,
$is_privacy
);
//获取未绑定隐号
$result
=
$Rong
->
setNumber
(
$phone_a
,
$phone_b
,
$phone_x
[
'phone_x'
],
$phone_x
[
'area'
],
$time
,
$record2
);
$phone_x
=
$aliYunPhone
->
getAliYunPhone
(
$phone_a
,
$phone_b
,
$is_privacy
);
//获取未绑定隐号
$result
=
$Rong
->
setNumber
(
$phone_a
,
$phone_b
,
$phone_x
[
'phone_x'
],
$phone_x
[
'area'
],
$time
,
$record2
);
/*绑定成功*/
if
(
$result
[
'statusCode'
]
==
'000000'
)
{
...
...
@@ -136,8 +136,30 @@ class CellPhone extends Basic
$this
->
msg
=
'绑定成功'
;
$this
->
data
=
[
'phone'
=>
$phone_x
[
'phone_x'
]
];
}
else
{
$phone_x_arr
[]
=
$phone_x
[
'phone_x'
];
//剔除绑定失败的中间号
//尝试5次再绑定
for
(
$i
=
0
;
$i
<
5
;
$i
++
)
{
$phone_x
=
$aliYunPhone
->
getAliYunPhone
(
$phone_a
,
$phone_b
,
$is_privacy
,
$phone_x_arr
);
//获取未绑定隐号
$result
=
$Rong
->
setNumber
(
$phone_a
,
$phone_b
,
$phone_x
[
'phone_x'
],
$phone_x
[
'area'
],
$time
,
$record2
);
if
(
$result
[
'statusCode'
]
==
'000000'
)
{
$aliYunPhone
=
new
AliYunPhone
();
$aliYunPhone
->
editStatus
(
$phone_x
,
$phone_a
,
$phone_b
,
$record
,
$time
,
0
,
$result
[
'data'
][
'mappingId'
],
$is_privacy
);
//记录绑定
$this
->
msg
=
'绑定成功'
;
$this
->
data
=
[
'phone'
=>
$phone_x
[
'phone_x'
]
];
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$this
->
data
);
}
else
{
$phone_x_arr
[]
=
$phone_x
[
'phone_x'
];
//剔除绑定失败的中间号
}
}
//绑定失败返回错误信息
$this
->
code
=
101
;
$this
->
msg
=
'拨号失败,15秒再试,再无法拨号请联系请联系运营人员!'
;
}
}
...
...
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