部分测试
This commit is contained in:
parent
749beaec21
commit
b6b094ce92
|
|
@ -19,7 +19,6 @@
|
||||||
<div class="login layui-anim layui-anim-up">
|
<div class="login layui-anim layui-anim-up">
|
||||||
<div class="message">教育体测管理后台</div>
|
<div class="message">教育体测管理后台</div>
|
||||||
<div id="darkbannerwrap"></div>
|
<div id="darkbannerwrap"></div>
|
||||||
|
|
||||||
<form method="post" class="layui-form" >
|
<form method="post" class="layui-form" >
|
||||||
<input name="username" placeholder="用户名" type="text" lay-verify="required" class="layui-input" >
|
<input name="username" placeholder="用户名" type="text" lay-verify="required" class="layui-input" >
|
||||||
<hr class="hr15">
|
<hr class="hr15">
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,104 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\app\controller;
|
||||||
|
|
||||||
|
use think\Controller;
|
||||||
|
use think\Db;
|
||||||
|
use app\bj\controller\Common;
|
||||||
|
use think\Log;
|
||||||
|
use \think\Validate;
|
||||||
|
|
||||||
|
class Card extends Controller{
|
||||||
|
|
||||||
|
|
||||||
|
################################################################个人资料卡################################################################
|
||||||
|
################################################################个人资料卡################################################################
|
||||||
|
################################################################个人资料卡################################################################
|
||||||
|
|
||||||
|
// 获取默认卡片信息
|
||||||
|
// $type 1获取列表,2获取详细信息
|
||||||
|
public function get_card_msg($type=1){
|
||||||
|
$result = Db::table('app_card_data')->select();
|
||||||
|
$data = [];
|
||||||
|
if($type == 1){
|
||||||
|
for ($i=0; $i < count($result); $i++) {
|
||||||
|
array_push($data,['id'=>$result[$i]['id'],'name'=>$result[$i]['name']]);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
// 如果需要详细信息再从中编辑信息
|
||||||
|
$data = $result;
|
||||||
|
}
|
||||||
|
return $this->msg(0,'success',$data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取默认卡片规则
|
||||||
|
// $type 1获取列表,2获取详细信息
|
||||||
|
public function get_card_rule(){
|
||||||
|
$result = Db::table('app_card_data')->select();
|
||||||
|
$data = [];
|
||||||
|
if($type == 1){
|
||||||
|
for ($i=0; $i < count($result); $i++) {
|
||||||
|
array_push($data,['id'=>$result[$i]['id'],'name'=>$result[$i]['name']]);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
// 如果需要详细信息再从中编辑信息
|
||||||
|
$data = $result;
|
||||||
|
}
|
||||||
|
return $this->msg(0,'success',$data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新建卡片
|
||||||
|
public function create_card(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
################################################################other################################################################
|
||||||
|
################################################################other################################################################
|
||||||
|
################################################################other################################################################
|
||||||
|
|
||||||
|
public function verify_parameters($data,$type){
|
||||||
|
// 设置验证
|
||||||
|
$rule = [
|
||||||
|
'aan_id' => 'require|number',
|
||||||
|
'nickname' => 'require|chsAlpha',
|
||||||
|
'birthday' => 'require|date',
|
||||||
|
'gender' => 'require|number|in:0,1,2',
|
||||||
|
];
|
||||||
|
$msg = [
|
||||||
|
'aan_id.require' => '账号信息缺失',
|
||||||
|
'nickname.require' => '昵称缺失',
|
||||||
|
'birthday.require' => '生日缺失',
|
||||||
|
'gender.require' => '性别缺失',
|
||||||
|
|
||||||
|
'aan_id.number' => '账号信息格式错误',
|
||||||
|
'nickname.chsAlpha' => '昵称只能是只能是汉字、字母',
|
||||||
|
'birthday.date' => '生日信息格式错误',
|
||||||
|
'gender.number' => '性别格式错误',
|
||||||
|
'gender.in' => '性别信息错误',
|
||||||
|
];
|
||||||
|
$validate = new Validate($rule,$msg);
|
||||||
|
$result = $validate->check($data);
|
||||||
|
if(!$result){
|
||||||
|
return $validate->getError();
|
||||||
|
}
|
||||||
|
|
||||||
|
$parameter['aan_id'] = $data['aan_id'];
|
||||||
|
$parameter['nickname'] = $data['nickname'];
|
||||||
|
$parameter['birthday'] = $data['birthday'];
|
||||||
|
$parameter['gender'] = $data['gender'];
|
||||||
|
$parameter['create_time'] = date('Y-m-d H:i:s');
|
||||||
|
$parameter['last_update_time'] = date('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
|
||||||
|
return $parameter;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function msg($code,$msg='',$data=[]){
|
||||||
|
return json(['code'=>$code,'msg'=>$msg,'data'=>$data]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -24,26 +24,35 @@ class Index extends Controller{
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建用户卡片
|
// 创建用户卡片
|
||||||
public function create_user_card(){
|
public function create_user_data(){
|
||||||
$data = input();
|
$data = input();
|
||||||
$result = Db::table('app_user_card')->insert([
|
|
||||||
'aan_id'=>$data['id'],
|
$result = Db::table('app_user_data')->insert($verify_result);
|
||||||
'nickname'=>$data['nickname'],
|
|
||||||
'birthday'=>$data['birthday'],
|
|
||||||
'gender'=>$data['gender'],
|
|
||||||
'create_time'=>date('Y-m-d H:i:s'),
|
|
||||||
'last_update_time'=>date('Y-m-d H:i:s'),
|
|
||||||
]);
|
|
||||||
if($result){
|
if($result){
|
||||||
return $this->msg(0,'success');
|
return $this->msg(0,'success');
|
||||||
}else{
|
}else{
|
||||||
return $this->msg(10001,'创建失败');
|
return $this->msg(10001,'创建失败');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 获取账号下用户卡片列表
|
|
||||||
|
// 切换用户
|
||||||
|
public function switch_user(){
|
||||||
|
$data = input();
|
||||||
|
$verify_result = $this->verify_parameters($data,'register');
|
||||||
|
$result = Db::table('app_user_data')->insert($verify_result);
|
||||||
|
if($result){
|
||||||
|
return $this->msg(0,'success');
|
||||||
|
}else{
|
||||||
|
return $this->msg(10001,'创建失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 获取账号下用户列表
|
||||||
// $type 1获取列表,2获取详细信息
|
// $type 1获取列表,2获取详细信息
|
||||||
public function user_card_list($aan_id = 1,$type=1){
|
public function user_card_list($aan_id,$type=1){
|
||||||
$result = Db::table('app_user_card')->where(['aan_id'=>$aan_id])->select();
|
$result = Db::table('app_user_data')->where(['aan_id'=>$aan_id])->select();
|
||||||
|
// $result = Db::table('app_user_data')->where(['aan_id'=>$aan_id])->field('id,nickname')->select();
|
||||||
$data = [];
|
$data = [];
|
||||||
if($type == 1){
|
if($type == 1){
|
||||||
for ($i=0; $i < count($result); $i++) {
|
for ($i=0; $i < count($result); $i++) {
|
||||||
|
|
@ -52,18 +61,21 @@ class Index extends Controller{
|
||||||
}else{
|
}else{
|
||||||
$data = $result;
|
$data = $result;
|
||||||
}
|
}
|
||||||
return $data;
|
return $this->msg(0,'success',$data);
|
||||||
}
|
}
|
||||||
// 获取账号下用户卡片详细信息
|
|
||||||
|
// 获取账号下用户详细信息
|
||||||
public function user_card_information($id){
|
public function user_card_information($id){
|
||||||
$result = Db::table('app_user_card')->where(['id'=>$id])->find();
|
$result = Db::table('app_user_card')->where(['id'=>$id])->find();
|
||||||
if($result){
|
if($result){
|
||||||
return $result;
|
return $this->msg(0,'success',$result);
|
||||||
}else{
|
}else{
|
||||||
return false;
|
return $this->msg(10001,'error');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 创建身体数据
|
// 创建身体数据
|
||||||
public function create_body_data(){
|
public function create_body_data(){
|
||||||
$data = input();
|
$data = input();
|
||||||
|
|
@ -117,6 +129,43 @@ class Index extends Controller{
|
||||||
################################################################other################################################################
|
################################################################other################################################################
|
||||||
################################################################other################################################################
|
################################################################other################################################################
|
||||||
|
|
||||||
|
public function verify_parameters($data,$type){
|
||||||
|
// 设置验证
|
||||||
|
$rule = [
|
||||||
|
'aan_id' => 'require|number',
|
||||||
|
'nickname' => 'require|chsAlpha',
|
||||||
|
'birthday' => 'require|date',
|
||||||
|
'gender' => 'require|number|in:0,1,2',
|
||||||
|
];
|
||||||
|
$msg = [
|
||||||
|
'aan_id.require' => '账号信息缺失',
|
||||||
|
'nickname.require' => '昵称缺失',
|
||||||
|
'birthday.require' => '生日缺失',
|
||||||
|
'gender.require' => '性别缺失',
|
||||||
|
|
||||||
|
'aan_id.number' => '账号信息格式错误',
|
||||||
|
'nickname.chsAlpha' => '昵称只能是只能是汉字、字母',
|
||||||
|
'birthday.date' => '生日信息格式错误',
|
||||||
|
'gender.number' => '性别格式错误',
|
||||||
|
'gender.in' => '性别信息错误',
|
||||||
|
];
|
||||||
|
$validate = new Validate($rule,$msg);
|
||||||
|
$result = $validate->check($data);
|
||||||
|
if(!$result){
|
||||||
|
return $validate->getError();
|
||||||
|
}
|
||||||
|
|
||||||
|
$parameter['aan_id'] = $data['aan_id'];
|
||||||
|
$parameter['nickname'] = $data['nickname'];
|
||||||
|
$parameter['birthday'] = $data['birthday'];
|
||||||
|
$parameter['gender'] = $data['gender'];
|
||||||
|
$parameter['create_time'] = date('Y-m-d H:i:s');
|
||||||
|
$parameter['last_update_time'] = date('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
|
||||||
|
return $parameter;
|
||||||
|
}
|
||||||
|
|
||||||
public function msg($code,$msg='',$data=[]){
|
public function msg($code,$msg='',$data=[]){
|
||||||
return json(['code'=>$code,'msg'=>$msg,'data'=>$data]);
|
return json(['code'=>$code,'msg'=>$msg,'data'=>$data]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,11 @@ namespace app\app\controller;
|
||||||
|
|
||||||
use think\Controller;
|
use think\Controller;
|
||||||
use think\Db;
|
use think\Db;
|
||||||
|
use think\Cache;
|
||||||
use app\bj\controller\Common;
|
use app\bj\controller\Common;
|
||||||
use think\Log;
|
use think\Log;
|
||||||
use \think\Validate;
|
use \think\Validate;
|
||||||
|
use PHPMailer\PHPMailer\PHPMailer;
|
||||||
|
|
||||||
class Login extends Controller{
|
class Login extends Controller{
|
||||||
|
|
||||||
|
|
@ -18,41 +20,153 @@ class Login extends Controller{
|
||||||
// 注册
|
// 注册
|
||||||
public function register_action(){
|
public function register_action(){
|
||||||
$data = input();
|
$data = input();
|
||||||
$result = Db::table('app_register')->insert([
|
|
||||||
'account_number'=>$data['account_number'],
|
$verify_result = $this->verify_parameters($data,'register');
|
||||||
'password'=>$data['password'],
|
|
||||||
]);
|
if(!is_array($verify_result)){
|
||||||
|
return $this->msg(10001,$verify_result);
|
||||||
|
}
|
||||||
|
// 记录
|
||||||
|
$result = Db::table('app_account_number')->insert($verify_result);
|
||||||
if($result){
|
if($result){
|
||||||
return $this->msg(0,'success');
|
return $this->msg(0,'success');
|
||||||
}else{
|
}else{
|
||||||
return $this->msg(10001,'注册失败');
|
return $this->msg(10003,'注册失败');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 登录
|
// 登录
|
||||||
public function login_action(){
|
public function login_action(){
|
||||||
$data = input();
|
$data = input();
|
||||||
$result = Db::table('app_register')->where([
|
$verify_result = $this->verify_parameters($data,'login');
|
||||||
'account_number'=>$data['account_number'],
|
if(!is_array($verify_result)){
|
||||||
'password'=>$data['password'],
|
return $this->msg(10001,$verify_result);
|
||||||
])->count();
|
}
|
||||||
|
$result = Db::table('app_register')->where($verify_result)->field('id')->find();
|
||||||
|
dump($result);
|
||||||
|
die;
|
||||||
if($result){
|
if($result){
|
||||||
|
$user_data = Db::table('app_user_data')->where(['aan_id'=>$result['id']])->field('id,nickname')->select();
|
||||||
return $this->msg(0,'success');
|
return $this->msg(0,'success');
|
||||||
}else{
|
}else{
|
||||||
return $this->msg(10001,'未找到账户');
|
return $this->msg(10001,'未找到账户');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 登录
|
// 手机/邮箱验证
|
||||||
public function phone_code(){
|
/* 接口说明(发邮件)
|
||||||
$data = '696969';
|
* $data(手机或者邮箱信息) 字符串
|
||||||
return $this->msg(0,'success',['phone_code'=>$data]);
|
* $type(验证类型,是注册用,还是其他用途) 字符串 默认register(注册)
|
||||||
|
* $road(是手机还是邮箱还是其他) 字符串 默认tel或email
|
||||||
|
*/
|
||||||
|
public function phone_email_code(){
|
||||||
|
$data = input();
|
||||||
|
if(!array_key_exists('data', $data) || !array_key_exists('type', $data) || !array_key_exists('road', $data)){
|
||||||
|
return $this->msg(10001,'数据&场景&通道必须');
|
||||||
|
}
|
||||||
|
$num = $this->rand_int();
|
||||||
|
if($data['road'] == 'tel'){
|
||||||
|
$result = $this->send_tel_code($data['tel'],$num);
|
||||||
|
}else if($data['road'] == 'email'){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if(is_array($result) && $result['code'] == 0){
|
||||||
|
cache($data['data']."_".$data['road']."_".$data['type'], $num, 20);
|
||||||
|
return $this->msg(0,'success');
|
||||||
|
}else{
|
||||||
|
return $this->msg(10001,'error');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 登录
|
|
||||||
public function email_code(){
|
|
||||||
$data = '696969';
|
/* 接口说明(发邮件)
|
||||||
return $this->msg(0,'success',['email_code'=>$data]);
|
* $address(收件人的邮箱地址) 数组 格式: ['460834639@qq.com','460834639@qq.com'.......]
|
||||||
|
* $content(邮件的主题数据信息) 数组 格式:['title'=>'123','from_user_name'=>'123','content'=>'123']
|
||||||
|
* $annex(附件路径信息) 字符串
|
||||||
|
*/
|
||||||
|
public function send_email_code($address,$content,$annex=''){
|
||||||
|
// $ad = '460834639@qq.com';
|
||||||
|
$ad1 = '295155911@qq.com';
|
||||||
|
$mail = new PHPMailer(); //实例化
|
||||||
|
$mail->IsSMTP(); // 启用SMTP
|
||||||
|
$mail->Host = "smtp.126.com"; //SMTP服务器 163邮箱例子
|
||||||
|
$mail->Port = 465; //邮件发送端口
|
||||||
|
$mail->SMTPAuth = true; //启用SMTP认证
|
||||||
|
$mail->SMTPSecure = 'ssl';
|
||||||
|
$mail->CharSet = "UTF-8"; //字符集
|
||||||
|
$mail->Encoding = "base64"; //编码方式
|
||||||
|
$mail->Username = "tsf3920322@126.com"; //你的邮箱
|
||||||
|
$mail->Password = "HLWXNRPUCTHJFIIX"; //你的密码(邮箱后台的授权密码)
|
||||||
|
$mail->From = "tsf3920322@126.com"; //发件人地址(也就是你的邮箱)
|
||||||
|
|
||||||
|
// $mail->Subject = "微盟测试邮件"; //邮件标题
|
||||||
|
$mail->Subject = $content['title']; //邮件标题
|
||||||
|
|
||||||
|
// $mail->FromName = "微盟体测中心"; //发件人姓名
|
||||||
|
$mail->FromName = $content['from_user_name']; //发件人姓名
|
||||||
|
|
||||||
|
for ($i=0; $i < count($address); $i++) {
|
||||||
|
$mail->AddAddress($address[$i], ""); //添加收件人(地址,昵称)
|
||||||
|
}
|
||||||
|
if($annex != ''){
|
||||||
|
// $url = ROOT_PATH. 'public' . DS . 'tsf' . DS .'demoooo.jpg';
|
||||||
|
$mail->AddAttachment($annex,''); // 添加附件,并指定名称
|
||||||
|
}
|
||||||
|
|
||||||
|
$mail->IsHTML(true); //支持html格式内容
|
||||||
|
|
||||||
|
$mail->Body = $content['content']; //邮件主体内容
|
||||||
|
|
||||||
|
//发送
|
||||||
|
if (!$mail->Send()) {
|
||||||
|
return $this->msg(10001,$mail->ErrorInfo);
|
||||||
|
// return $mail->ErrorInfo;
|
||||||
|
} else {
|
||||||
|
return $this->msg(0,'success');
|
||||||
|
// return 'success';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function send_tel_code($tel,$code){
|
||||||
|
// 初始化cURL会话
|
||||||
|
$ch = curl_init();
|
||||||
|
$headers = [
|
||||||
|
'Accept: application/json',
|
||||||
|
'Content-Type: application/json',
|
||||||
|
];
|
||||||
|
// 设置头部信息
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
||||||
|
// 设置请求的URL
|
||||||
|
$url = "http://sms.ybhdmob.com/Message/Send?token=ybhdmob";
|
||||||
|
curl_setopt($ch, CURLOPT_URL, $url);
|
||||||
|
// 设置为POST请求
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
// 设置POST数据
|
||||||
|
$postData = array(
|
||||||
|
'phone' => $tel,
|
||||||
|
'content' => '【xxxx】您好,欢迎使用xxx,,您的手机验证码是:'.$code.',验证码一分钟内有效,若非本人操作,请忽略!'
|
||||||
|
);
|
||||||
|
$postData = json_encode($postData);
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
|
||||||
|
// 设置返回结果不直接输出,而是返回到变量中
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
// 发送请求并获取响应
|
||||||
|
$response = curl_exec($ch);
|
||||||
|
// 检查是否有错误发生
|
||||||
|
if (curl_errno($ch)) {
|
||||||
|
$error_message = curl_error($ch);
|
||||||
|
return "请求错误: " . $error_message;
|
||||||
|
}
|
||||||
|
// 关闭cURL会话
|
||||||
|
curl_close($ch);
|
||||||
|
// 处理响应
|
||||||
|
if ($response) {
|
||||||
|
return json_decode($response,true);
|
||||||
|
} else {
|
||||||
|
echo "未收到响应";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -60,6 +174,80 @@ class Login extends Controller{
|
||||||
################################################################other################################################################
|
################################################################other################################################################
|
||||||
################################################################other################################################################
|
################################################################other################################################################
|
||||||
|
|
||||||
|
public function test(){
|
||||||
|
dump($this->send_tel_code('18530934717',$this->rand_int()));
|
||||||
|
// dump(['code']);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function rand_int(){
|
||||||
|
return mt_rand(100000,999999);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function verify_parameters($data,$type){
|
||||||
|
// 设置验证
|
||||||
|
$rule = [
|
||||||
|
'tel' => 'number|length:11',
|
||||||
|
'password' => 'require',
|
||||||
|
'email' => 'email',
|
||||||
|
'code' => 'number',
|
||||||
|
];
|
||||||
|
$msg = [
|
||||||
|
'password.require' => '密码必须',
|
||||||
|
'tel.number' => '手机必须是数字',
|
||||||
|
'code.number' => '验证码必须是数字',
|
||||||
|
'tel.length' => '手机必须是11位',
|
||||||
|
'email' => '邮箱格式错误',
|
||||||
|
];
|
||||||
|
$validate = new Validate($rule,$msg);
|
||||||
|
$result = $validate->check($data);
|
||||||
|
if(!$result){
|
||||||
|
return $validate->getError();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断参数
|
||||||
|
if(array_key_exists('tel', $data)){
|
||||||
|
$parameter['tel'] = $data['tel'];
|
||||||
|
$parameter['password'] = $data['password'];
|
||||||
|
$montage_data = 'tel';
|
||||||
|
}else if(array_key_exists('email', $data)){
|
||||||
|
$parameter['email'] = $data['email'];
|
||||||
|
$parameter['password'] = $data['password'];
|
||||||
|
$montage_data = 'email';
|
||||||
|
}else{
|
||||||
|
return '手机/邮箱必须';
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检验是否注册过
|
||||||
|
if($montage_data == 'tel'){
|
||||||
|
$inspect_repeat = Db::table('app_account_number')->where(['tel'=>$parameter['tel'],'password'=>$parameter['password']])->count();
|
||||||
|
}else{
|
||||||
|
$inspect_repeat = Db::table('app_account_number')->where(['email'=>$parameter['email'],'password'=>$parameter['password']])->count();
|
||||||
|
}
|
||||||
|
|
||||||
|
if($inspect_repeat){
|
||||||
|
return '注册失败,账号已存在';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($type == 'register'){
|
||||||
|
if(array_key_exists('code', $data)){
|
||||||
|
if(cache($parameter[$montage_data]."_".$montage_data."_register") == false){
|
||||||
|
return '验证码过期';
|
||||||
|
}else{
|
||||||
|
if($data['code'] != cache($parameter[$montage_data]."_".$montage_data."_register")){
|
||||||
|
return '验证码错误';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return '验证码必须';
|
||||||
|
}
|
||||||
|
$parameter['create_time'] = date('Y-m-d H:i:s');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $parameter;
|
||||||
|
}
|
||||||
|
|
||||||
public function msg($code,$msg='',$data=[]){
|
public function msg($code,$msg='',$data=[]){
|
||||||
return json(['code'=>$code,'msg'=>$msg,'data'=>$data]);
|
return json(['code'=>$code,'msg'=>$msg,'data'=>$data]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,8 @@
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.4.0",
|
"php": ">=5.4.0",
|
||||||
"topthink/framework": "5.0.*"
|
"topthink/framework": "5.0.*",
|
||||||
|
"phpmailer/phpmailer": "^6.9"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
Loading…
Reference in New Issue