1
0

first commit

This commit is contained in:
2020-08-06 14:58:51 +08:00
commit 17096657dc
780 changed files with 92857 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
<?php
// +------------------------------------------------+
// |http://www.cjango.com |
// +------------------------------------------------+
// | 修复BUG不是一朝一夕的事情等我喝醉了再说吧 |
// +------------------------------------------------+
// | Author: 小陈叔叔 <Jason.Chen> |
// +------------------------------------------------+
namespace app\mobile\controller;
use app\common\model\Member as MemberModel;
use app\common\service\Sms as SmsService;
class Sms extends _Init
{
public function _initialize()
{
}
/**
* [短信验证码]
* @return [type] [description]
*/
public function getsms()
{
$mobile = $this->request->post('mobile');
$forget = $this->request->post('forget');
$MemberInfo = MemberModel::where('username', $mobile)->find();
if (!empty($MemberInfo) && empty($forget)) {
return $this->error('这个手机号已经注册过了');
}
$res = SmsService::send($mobile);
if ($res === true) {
return $this->success('发送成功');
} else {
return $this->error($res);
}
}
/**
* [短信验证码]
* @return [type] [description]
*/
public function getresms()
{
$mobile = $this->request->post('mobile');
$MemberInfo = MemberModel::where('username', $mobile)->find();
$res = SmsService::send($mobile);
if ($res === true) {
return $this->success('发送成功');
} else {
return $this->error($res);
}
}
}