Commit f251258c authored by 康帅杰's avatar 康帅杰 :speech_balloon:
Browse files

发送和验证错误信息修改

parent a3c1a45f
No related merge requests found
Showing with 7 additions and 8 deletions
+7 -8
......@@ -4,7 +4,7 @@
* @Author: kidkang
* @Date: 2021-03-02 18:14:04
* @Last Modified by: kidkang
* @Last Modified time: 2021-03-03 08:57:17
* @Last Modified time: 2021-03-03 09:22:18
*/
return [
'code' => '验证码',
......@@ -12,10 +12,10 @@ return [
'type' => '类型',
'msg' => [
'send' => [
'fail' => [3001, '发送失败'],
'fail' => ['发送失败', 1001],
],
'check' => [
'fail' => [3002, '验证失败'],
'fail' => ['验证失败', 2001],
],
],
'rules' => [
......
......@@ -4,7 +4,7 @@
* @Author: kidkang
* @Date: 2021-03-02 10:30:04
* @Last Modified by: kidkang
* @Last Modified time: 2021-03-02 17:36:49
* @Last Modified time: 2021-03-03 09:22:47
*/
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'));
}
}
......@@ -4,7 +4,7 @@
* @Author: kidkang
* @Date: 2021-03-02 11:46:08
* @Last Modified by: kidkang
* @Last Modified time: 2021-03-02 17:42:35
* @Last Modified time: 2021-03-03 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);
......
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