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
5ac11aef
Commit
5ac11aef
authored
Aug 21, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
错误码
parent
ccddeb8b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
1 deletion
+47
-1
CallPhoneService.php
application/api_broker/service/CallPhoneService.php
+1
-1
RongDemo.php
application/api_broker/untils/RongDemo.php
+46
-0
No files found.
application/api_broker/service/CallPhoneService.php
View file @
5ac11aef
...
@@ -344,7 +344,7 @@ class CallPhoneService
...
@@ -344,7 +344,7 @@ class CallPhoneService
if
(
$data
[
'status'
]
!=
'success'
)
{
if
(
$data
[
'status'
]
!=
'success'
)
{
//绑定失败返回错误信息
//绑定失败返回错误信息
$data
[
'status'
]
=
'failed'
;
$data
[
'status'
]
=
'failed'
;
$data
[
'msg'
]
=
'拨号失败,15秒再试,再无法拨号请联系请联系运营人员!'
;
$data
[
'msg'
]
=
$result
[
'code_msg'
]
;
}
}
}
}
...
...
application/api_broker/untils/RongDemo.php
View file @
5ac11aef
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
namespace
app\api_broker\untils
;
namespace
app\api_broker\untils
;
use
app\api_broker\service\PushMessageService
;
use
app\chat\utils\CurlUtil
;
use
app\chat\utils\CurlUtil
;
class
RongDemo
class
RongDemo
...
@@ -155,6 +156,7 @@ class RongDemo
...
@@ -155,6 +156,7 @@ class RongDemo
'userData'
=>
$aNumber
.
'-'
.
$bNumber
//记录a和b号码,回调使用
'userData'
=>
$aNumber
.
'-'
.
$bNumber
//记录a和b号码,回调使用
];
];
$result
=
json_decode
(
$this
->
sendCurl
(
$url
,
$post_data
,
$Authorization
),
true
);
$result
=
json_decode
(
$this
->
sendCurl
(
$url
,
$post_data
,
$Authorization
),
true
);
$result
[
'code_msg'
]
=
$this
->
getCodeString
(
$result
[
'statusCode'
]);
return
$result
;
return
$result
;
}
}
...
@@ -178,4 +180,47 @@ class RongDemo
...
@@ -178,4 +180,47 @@ class RongDemo
$result
=
json_decode
(
$this
->
sendCurl
(
$url
,
$post_data
,
$Authorization
),
true
);
$result
=
json_decode
(
$this
->
sendCurl
(
$url
,
$post_data
,
$Authorization
),
true
);
return
$result
;
return
$result
;
}
}
/**
* 容联云code对于说明
*
* @param $code
* @return string
*/
public
function
getCodeString
(
$code
)
{
$msg
=
''
;
switch
(
$code
)
{
case
'000000'
:
$msg
=
'成功'
;
break
;
case
'300001'
:
$msg
=
'参数错误'
;
break
;
case
'300002'
:
$msg
=
'验证错误'
;
break
;
case
'301101'
:
$msg
=
'无号码资源'
;
break
;
case
'301201'
:
$msg
=
'云内部存储异常'
;
break
;
case
'301401'
:
$msg
=
'无空闲号码'
;
break
;
case
'301402'
:
$msg
=
'分配失败'
;
break
;
case
'301403'
:
$msg
=
'数据库错误'
;
break
;
case
'301501'
:
$msg
=
'类型号码未配置'
;
break
;
case
'301633'
:
$msg
=
'找不到应用'
;
break
;
case
'320201'
:
$msg
=
'号码已解绑'
;
break
;
case
'320400'
:
$msg
=
'参数异常'
;
break
;
case
'320402'
:
$msg
=
'号码已使用'
;
break
;
case
'320500'
:
$msg
=
'落地异常'
;
break
;
case
'309000'
:
$msg
=
'其它错误'
;
break
;
}
return
$msg
;
}
}
}
\ No newline at end of file
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