config 目录下新建code.php
1, 'error'=>0, 'need_login'=>-1, 'user_is_registed'=>-2, ];
文件中使用
config('code.success')
统一api返回数据
common.php新建函数
$code, 'msg'=>$msg, 'data'=>$data, ]; return json($result,$httpCode); }
上一篇:小程序开发实现视频上传功能的方法
下一篇:python len()函数的功能有哪些