Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PHP
laravel-sms
Commits
f251258c
Commit
f251258c
authored
4 years ago
by
康帅杰
Browse files
Options
Download
Email Patches
Plain Diff
发送和验证错误信息修改
parent
a3c1a45f
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
resources/lang/zh-CN/sms.php
+3
-3
resources/lang/zh-CN/sms.php
src/Controllers/CheckController.php
+2
-3
src/Controllers/CheckController.php
src/Controllers/SendController.php
+2
-2
src/Controllers/SendController.php
with
7 additions
and
8 deletions
+7
-8
resources/lang/zh-CN/sms.php
View file @
f251258c
...
...
@@ -4,7 +4,7 @@
* @Author: kidkang
* @Date: 2021-03-02 18:14:04
* @Last Modified by: kidkang
* @Last Modified time: 2021-03-03 0
8:57
:1
7
* @Last Modified time: 2021-03-03 0
9:22
:1
8
*/
return
[
'code'
=>
'验证码'
,
...
...
@@ -12,10 +12,10 @@ return [
'type'
=>
'类型'
,
'msg'
=>
[
'send'
=>
[
'fail'
=>
[
3001
,
'发送失败'
],
'fail'
=>
[
'发送失败'
,
1001
],
],
'check'
=>
[
'fail'
=>
[
3002
,
'验证失败'
],
'fail'
=>
[
'验证失败'
,
2001
],
],
],
'rules'
=>
[
...
...
This diff is collapsed.
Click to expand it.
src/Controllers/CheckController.php
View file @
f251258c
...
...
@@ -4,7 +4,7 @@
* @Author: kidkang
* @Date: 2021-03-02 10:30:04
* @Last Modified by: kidkang
* @Last Modified time: 2021-03-0
2 17:36
:4
9
* @Last Modified time: 2021-03-0
3 09:22
:4
7
*/
namespace
Yjtec\Sms\Controllers
;
...
...
@@ -41,10 +41,9 @@ class CheckController extends Controller
if
(
$request
->
has
(
'is_final'
))
{
$clearCache
=
(
int
)
$request
->
is_final
?
true
:
false
;
}
$code
=
$request
->
code
;
return
app
(
'sms'
)
->
type
(
$type
)
->
check
(
$phone
,
$code
,
$clearCache
)
?
success
()
:
error
();
:
error
(
...
trans
(
'sms::sms.msg.check.fail'
)
);
}
}
This diff is collapsed.
Click to expand it.
src/Controllers/SendController.php
View file @
f251258c
...
...
@@ -4,7 +4,7 @@
* @Author: kidkang
* @Date: 2021-03-02 11:46:08
* @Last Modified by: kidkang
* @Last Modified time: 2021-03-0
2 17:42:35
* @Last Modified time: 2021-03-0
3 09:23:03
*/
namespace
Yjtec\Sms\Controllers
;
...
...
@@ -57,7 +57,7 @@ class SendController extends Controller
$m
->
status
=
-
1
;
$m
->
extra
=
$sms
->
errMsg
();
$m
->
save
();
return
error
();
return
error
(
...
trans
(
'sms::sms.msg.send.fail'
)
);
}
//return new SmsResource($re);
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help