diff --git a/.envbak b/.envbak new file mode 100644 index 0000000..5f00c6e --- /dev/null +++ b/.envbak @@ -0,0 +1 @@ +APP_DEBUG = true [APP] DEFAULT_TIMEZONE = Asia/Shanghai [DATABASE] TYPE = mysql HOSTNAME = 127.0.0.1 DATABASE = jxhhyq USERNAME = root PASSWORD = dys114818 HOSTPORT = 3306 CHARSET = utf8 DEBUG = true [LANG] default_lang = zh-cn \ No newline at end of file diff --git a/.example.env b/.example.env deleted file mode 100644 index c27f74c..0000000 --- a/.example.env +++ /dev/null @@ -1 +0,0 @@ -APP_DEBUG = true [APP] DEFAULT_TIMEZONE = Asia/Shanghai [DATABASE] TYPE = mysql HOSTNAME = 127.0.0.1 DATABASE = test USERNAME = username PASSWORD = password HOSTPORT = 3306 CHARSET = utf8 DEBUG = true [LANG] default_lang = zh-cn \ No newline at end of file diff --git a/app/AppService.php b/app/AppService.php index 96556e8..df69c82 100644 --- a/app/AppService.php +++ b/app/AppService.php @@ -3,6 +3,9 @@ namespace app; +use app\service\CloudApiService; +use app\service\UserService; +use app\service\DeviceService; use think\Service; /** @@ -13,6 +16,9 @@ class AppService extends Service public function register() { // 服务注册 + $this->app->bind('cloudService',CloudApiService::class); + $this->app->bind('userService',UserService::class); + $this->app->bind('deviceService',DeviceService::class); } public function boot() diff --git a/app/api/libs/Aliyun.php b/app/api/libs/Aliyun.php new file mode 100644 index 0000000..590c629 --- /dev/null +++ b/app/api/libs/Aliyun.php @@ -0,0 +1,66 @@ +AccessKeyId = config("Aliyun.Sms.AccessKeyId"); + $this->AccessKeySecret = config("Aliyun.Sms.AccessKeySecret"); + $this->SignName = config("Aliyun.Sms.SignName"); + $this->TemplateCode = config("Aliyun.Sms.TemplateCode"); + } + + + public function sendSms($phone, $code) + { + AlibabaCloud::accessKeyClient($this->AccessKeyId, $this->AccessKeySecret) + ->regionId('cn-hangzhou') + ->asDefaultClient(); + + try { + $result = AlibabaCloud::rpc() + ->product('Dysmsapi') + // ->scheme('https') // https | http + ->version('2017-05-25') + ->action('SendSms') + ->method('POST') + ->host('dysmsapi.aliyuncs.com') + ->options([ + 'query' => [ + 'RegionId' => "cn-hangzhou", + 'PhoneNumbers' => $phone, + 'SignName' => $this->SignName, + 'TemplateCode' => $this->TemplateCode, + 'TemplateParam' => json_encode(['code' => $code]) + ], + ]) + ->request(); + $result = $result->toArray(); + if ($result["Code"] == "OK") { + return true; + } else { + throw new HttpExceptions(403, $result['Message'], 19999); + } + } catch (ClientException $e) { + throw new HttpExceptions(403, "短信服务异常", 19999); + } catch (ServerException $e) { + throw new HttpExceptions(403, "短信服务异常", 19999); + } + } +} diff --git a/app/api/libs/Auth.php b/app/api/libs/Auth.php new file mode 100644 index 0000000..869b87e --- /dev/null +++ b/app/api/libs/Auth.php @@ -0,0 +1,84 @@ +username = $request->param('username'); + $this->token = $request->header('token'); + } + + private function __clone() + { + // TODO: Implement __clone() method. + } + //统一的入口 + public static function getInstance(){ + if(!self::$instance instanceof self){ + self::$instance = new self(); + } + return self::$instance; + } + + //获取token + public function getToken(){ + return $this->token; + } + + //生成token + private function createToken(){ + $this->token = md5($this->username.time().rand(100000,999999)); + } + + //设置token 保持登录状态 + public function setToken(){ + $this->createToken(); + //写入数据表 + $user = UserModel::where('user_name','=',$this->username)->find(); + $user->token = $this->token; + $user->expire_time = time() +Config::get('auth.expire_time'); + $user->save(); + return $this; + } + + //验证,10006:无权限 + public function checkLogin(){ + //1.到数据库中查询用户信息,token + $user = UserModel::where('token','=',$this->token)->find(); + if(!$user){ + throw new HttpExceptions(403,"无权限",10006); + } + //2. 登录是否过期 10007:超时 + if($user['expire_time']expiration_time-time())<5){ + $user->expiration_time = time()+3600; +// config('auth.expire_time'); + $user->save(); + } + // echo $user->expiration_time."\n"; + return true; + } +} diff --git a/app/common.php b/app/common.php index 57cb6d8..066efaf 100644 --- a/app/common.php +++ b/app/common.php @@ -1,2 +1,144 @@ regionId('cn-hangzhou') + ->asDefaultClient(); + + try { + $result = AlibabaCloud::rpc() + ->product('Dysmsapi') + // ->scheme('https') // https | http + ->version('2017-05-25') + ->action('SendSms') + ->method('POST') + ->host($smsConfig['host']) + ->options([ + 'query' => [ + 'RegionId' => "cn-hangzhou", + 'PhoneNumbers' => $phone, + 'SignName' => $smsConfig['SignName'], + 'TemplateCode' => $smsConfig['TemplateCode'], + 'TemplateParam' => "{\"code\":$code}", + 'SmsUpExtendCode' => "2", + 'OutId' => "1", + ], + ]) + ->request(); + print_r($result->toArray()); + } catch (ClientException $e) { + echo $e->getErrorMessage() . PHP_EOL; + } catch (ServerException $e) { + echo $e->getErrorMessage() . PHP_EOL; + } +} + +/** + * 获取token + * Author: daiysh + * DateTime: 2020-03-30 15:25 + * @return mixed + */ +function getAccessToken() { + $wxConfig = Config::get('wxconfig'); + // 将token放到缓存中,检查token是否失效 + $token = Cache::get('access_token'); + try { + if (!$token) { + $res = file_get_contents($wxConfig['getTokenUrl'].'&appid='.$wxConfig['appid'].'&secret='.$wxConfig['secret']); + // json_decode接受一个 JSON 格式的字符串并且把它转换为 PHP 变量 + $res = json_decode($res, true); + $token = $res['access_token']; + $time = $res['expires_in']; + if($token){ + // 缓存在3600秒之后过期 + Cache::set('access_token', $token, $time); + } + } + } catch (Exception $e) { +// echo $e->getMessage(); + } + + return $token; + +} + +/** + * http 请求公共方法 + * Author: daiysh + * DateTime: 2020-03-30 15:27 + * @param $url + * @param null $data + * @return bool|string + */ +function httpRequest($url, $data = null) +{ + $curl = curl_init(); + curl_setopt($curl, CURLOPT_URL, $url); + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); + curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE); + if (! empty($data)) { + curl_setopt($curl, CURLOPT_POST, 1); + curl_setopt($curl, CURLOPT_POSTFIELDS, $data); + } + curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE); + $output = curl_exec($curl); + curl_close($curl); + return $output; +} + +function ok($data) { + $code = 20000; + $message = 'success'; + $result=array( + 'code' => $code, + 'message' => $message, + 'data' => $data + ); + + return json($result); +} + +function fail($data) { + $code = 10000; + $message = 'fail'; + $result=array( + 'code' => $code, + 'message' => $message, + 'data' => $data + ); + + return json($result); +} + +function return_msg($code,$msg) { + $result=array( + 'code' => $code, + 'message' => $msg + ); + + return $result; +} + + diff --git a/app/controller/Company.php b/app/controller/Company.php new file mode 100644 index 0000000..2899a54 --- /dev/null +++ b/app/controller/Company.php @@ -0,0 +1,36 @@ +app->cloudService->databaseQuery('bs_company',$request->param()); + } + + public function create(Request $request) { + // 推送到云端 + $this->app->cloudService->databaseAdd('bs_company',$request->param()); +// return ok($this->app->deviceService->insert($request->param())); + } + + public function update(Request $request) { + // 更新云端数据 + $this->app->cloudService->databaseUpdate('bs_company',$request->param()); + } + + public function delete(Request $request) { + // 更新云端数据 + $this->app->cloudService->databaseDelete('bs_company',$request->param()); + } + +} diff --git a/app/controller/DailyCheck.php b/app/controller/DailyCheck.php new file mode 100644 index 0000000..0e60831 --- /dev/null +++ b/app/controller/DailyCheck.php @@ -0,0 +1,34 @@ +app->cloudService->databaseQuery('bs_daily_check',$request->param()); + } + + public function create(Request $request) { + $this->app->cloudService->dailyCheckAdd('bs_daily_check',$request->param()); + } + + public function update(Request $request) { + $this->app->cloudService->databaseUpdate('bs_daily_check',$request->param()); + } + + public function delete(Request $request) { + $this->app->cloudService->databaseDelete('bs_daily_check',$request->param()); + } + +} diff --git a/app/controller/Device.php b/app/controller/Device.php new file mode 100644 index 0000000..603a29b --- /dev/null +++ b/app/controller/Device.php @@ -0,0 +1,54 @@ +app->cloudService->databaseQuery('bs_device',$request->param()); + } + + public function deviceList(Request $request) { + return $this->app->cloudService->findDeviceList($request->param()); + } + + public function typeList(Request $request) { + return $this->app->cloudService->findTypeList($request->param()); + } + + public function companylist() { + return $this->app->cloudService->findCompanyList(); + } + + + public function create(Request $request) { + // 推送到云端 + $this->app->cloudService->databaseAdd('bs_device',$request->param()); + } + + public function update(Request $request) { + // 更新云端数据 + $this->app->cloudService->databaseUpdate('bs_device',$request->param()); + } + public function updateCompany(Request $request) { + // 批量更新公司 + $this->app->cloudService->batchUpdateCompany('bs_device',$request->param()); + } + + public function delete(Request $request) { + // 更新云端数据 + $this->app->cloudService->databaseDelete('bs_device',$request->param()); + } + +} diff --git a/app/controller/File.php b/app/controller/File.php new file mode 100644 index 0000000..21604c4 --- /dev/null +++ b/app/controller/File.php @@ -0,0 +1,64 @@ +upload2cloud($_FILES['file'])); + + + } + + private function upload2cloud($file) { + // 0 从数据库中取值 + $config = Db::table('sys_config')->where('type','tencentYun')->findOrEmpty();//->where('type', tencentYun)->find(); + // 初始化 + $secretId = $config['app_id'];//"AKIDUn13vcDWRRHvMarib1NISQH3agUAnBQQ"; //"云 API 密钥 SecretId"; + $secretKey = $config['app_secret'];//"wjPq42uo5HOXG7rKgjtjR4gCrQyQqAYn"; //"云 API 密钥 SecretKey"; + $region = "ap-guangzhou"; //设置一个默认的存储桶地域 + $cosClient = new Client( + array( + 'region' => $region, + 'schema' => 'https', //协议头部,默认为http + 'credentials'=> array( + 'secretId' => $secretId , + 'secretKey' => $secretKey))); + // 上传文件流 + try { + //存储桶名称 格式:BucketName-APPID + $bucket = "upload-1300792747"; + + $fileName = $file['name']; + // 文件名+时间戳生成唯一的文件名 + $key = "jxshhkj/device/" . time() . substr($fileName,strpos($fileName, '.'),strlen($fileName)); + $fileObj = fopen($file['tmp_name'], "rb"); + if ($fileObj) { + $result = $cosClient->putObject(array( + 'Bucket' => $bucket, + 'Key' => $key, + 'Body' => $fileObj + )); + + return "https://" . $result['Location']; + } + } catch (\Exception $e) { + echo "$e\n"; + } + + return null; + } + +} diff --git a/app/controller/Identity.php b/app/controller/Identity.php new file mode 100644 index 0000000..b26f43d --- /dev/null +++ b/app/controller/Identity.php @@ -0,0 +1,35 @@ +app->cloudService->databaseQuery('bs_identity',$request->param()); + } + + public function create(Request $request) { + // 推送到云端 + $this->app->cloudService->databaseAdd('bs_identity',$request->param()); + } + + public function update(Request $request) { + // 更新云端数据 + $this->app->cloudService->databaseUpdate('bs_identity',$request->param()); + } + + public function delete(Request $request) { + // 更新云端数据 + $this->app->cloudService->databaseDelete('bs_identity',$request->param()); + } +} diff --git a/app/controller/Index.php b/app/controller/Index.php index a0c83ce..88f59d1 100644 --- a/app/controller/Index.php +++ b/app/controller/Index.php @@ -7,11 +7,12 @@ class Index extends BaseController { public function index() { - return '

:) 2020新春快乐

ThinkPHP V' . \think\facade\App::version() . '
14载初心不改 - 你值得信赖的PHP框架

[ V6.0 版本由 亿速云 独家赞助发布 ]
'; + return '

:) 2020新春快乐

ThinkPHP V' . \think\facade\App::version() . '
14载初心不改 - 你值得信赖的PHP框架

[ V6.0 版本由 亿速云 独家赞助发布 ]
'; } public function hello($name = 'ThinkPHP6') { + sendSms('15179140800','567890'); return 'hello,' . $name; } } diff --git a/app/controller/Member.php b/app/controller/Member.php new file mode 100644 index 0000000..741e5f8 --- /dev/null +++ b/app/controller/Member.php @@ -0,0 +1,31 @@ +app->cloudService->databaseQuery('cloud_member',$request->param()); + } + + public function sync() { + + } + +} diff --git a/app/controller/Role.php b/app/controller/Role.php new file mode 100644 index 0000000..940551f --- /dev/null +++ b/app/controller/Role.php @@ -0,0 +1,23 @@ +app->cloudService->databaseQuery('sys_role',$request->param()); + } + + public function test() + { + $token = ['token' => 'admin-token']; + $data = ['data' => $token, 'code' => 20000]; + return json($data); + + } + +} + diff --git a/app/controller/User.php b/app/controller/User.php new file mode 100644 index 0000000..7c79a55 --- /dev/null +++ b/app/controller/User.php @@ -0,0 +1,71 @@ +app->userService->findList($request->param())); + } + public function login(Request $request) { + $data = $request->param(); + // 0 校验参数,把数据交由模型层来进行处理 + $checkData = UserModel::checkLogin($data); + if ($checkData['code'] == 1) { + return $checkData; + } + + // 1 设置token + // 2 返回token到前端 + Auth::getInstance()->setToken(); + $token = Auth::getInstance()->getToken(); + $data = ['token' => $token]; + $result = ['data' => $data, 'code' => 20000]; + return json($result); + + } + + public function info() + { + //1 根据token查询用户信息 + $roles=array(0=>"admin"); + $result = ['roles' => $roles, 'name' => 'Super Admin', 'avatar' =>'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif']; + $data = ['code' => 20000, 'msg' => 'success', 'data' => $result]; + + return json($data); + } + + public function logout(Request $request) + { + $token = $request->param()['token']; + //1 根据用户名,清除token+过期时间 + $user = UserModel::where('token','=',$token)->find(); + $user->token = null; + $user->expire_time = 0; + $user->save(); + } + + public function create(Request $request) + { + $returnvalue = $this->app->userService->insert($request->param()); + return ok(json($returnvalue)); + } + + public function update(Request $request) + { + $returnvalue = $this->app->userService->update($request->param()); + return ok(json($returnvalue)); + } + + public function delete(Request $request) + { + $returnvalue = $this->app->userService->delete($request->param()); + return ok(json($returnvalue)); + } + +} diff --git a/app/exception/ExceptionHandle.php b/app/exception/ExceptionHandle.php new file mode 100644 index 0000000..344da52 --- /dev/null +++ b/app/exception/ExceptionHandle.php @@ -0,0 +1,35 @@ +msg = $e->getMessage()?:$this->msg; + if($e instanceof HttpExceptions){ + $this->httpcode = $e->getStatusCode()?:$this->httpcode; + } + $this->errorcode = $e->getCode()?:$this->errorcode; + $result_data = [ + 'message'=>$this->msg, + 'data'=>[], + 'errorcode'=>$this->errorcode + ]; + return json($result_data,$this->httpcode); + } + +} diff --git a/app/exception/HttpExceptions.php b/app/exception/HttpExceptions.php new file mode 100644 index 0000000..8095ff5 --- /dev/null +++ b/app/exception/HttpExceptions.php @@ -0,0 +1,31 @@ +statusCode = $statusCode; + $this->headers = $headers; + + parent::__construct($message, $code, $previous); + } + + public function getStatusCode() + { + return $this->statusCode; + } + + public function getHeaders() + { + return $this->headers; + } +} diff --git a/app/middleware/CheckAdminLogin.php b/app/middleware/CheckAdminLogin.php new file mode 100644 index 0000000..ab4237b --- /dev/null +++ b/app/middleware/CheckAdminLogin.php @@ -0,0 +1,19 @@ +checkLogin(); + return $next($request); + } +} diff --git a/app/model/DeviceModel.php b/app/model/DeviceModel.php new file mode 100644 index 0000000..19f76a6 --- /dev/null +++ b/app/model/DeviceModel.php @@ -0,0 +1,29 @@ + 'int', + 'name' => 'string', + 'model_type' => 'string', + 'unit' => 'string', + 'manufacturer' => 'string', + 'manufact_number' => 'string', + 'manufact_date' => 'datetime', + 'use_date' => 'string', + 'purpose' => 'string', + 'remark' => 'string', + 'create_time' => 'datetime', + 'update_time' => 'datetime' + ]; +} diff --git a/app/model/RoleModel.php b/app/model/RoleModel.php new file mode 100644 index 0000000..ec3e3be --- /dev/null +++ b/app/model/RoleModel.php @@ -0,0 +1,15 @@ + 'int', + 'name' => 'string', + 'create_time' => 'datetime', + 'update_time' => 'datetime', + ]; +} diff --git a/app/model/UserModel.php b/app/model/UserModel.php new file mode 100644 index 0000000..0333bf3 --- /dev/null +++ b/app/model/UserModel.php @@ -0,0 +1,58 @@ + 'int', + 'phone' => 'int', + 'user_name' => 'string', + 'nick_name' => 'string', + 'password' => 'string', + 'token' => 'string', + 'expire_time' => 'int', + 'create_time' => 'datetime', + 'last_login_time' => 'int', + ]; + + public static function checkLogin($data){ + //1. 验证数据,这里要注意和之前版本的验证上是有区别的 +// try { +// $result = validate(ManagerValidate::class)->scene('login')->check($data); +// } catch (ValidateException $e) { +// // 验证失败 输出错误信息 +// return return_msg(0,$e->getError()); +// } + //2.验证密码和用户名 + $m = self::where('user_name', $data['username'])->find(); + if(!$m){ + return return_msg(1,"用户名不存在"); + } + //验证密码是否正确 + $hash = password_hash($data['password'], PASSWORD_DEFAULT); // $m['password'] +// $hash = '$2y$07$BCryptRequires22Chrcte/VlQH0piJtjXl.0t1XkA8pw9dMXTpOq'; + if(password_verify($m['password'],$hash)) { + //记录用户登录的状态 + session('username',$data['username']); + session('userid',$m['id']); + return return_msg(0,"登录成功"); + } + + return return_msg(1,"密码输入错误"); + + } +} diff --git a/app/service/CloudApiService.php b/app/service/CloudApiService.php new file mode 100644 index 0000000..d4ba842 --- /dev/null +++ b/app/service/CloudApiService.php @@ -0,0 +1,431 @@ +env = self::$env; + $obj->query = $query;// $param['query']; + $data = json_encode($obj); + + return httpRequest($url, $data); + + } + + private static function wrapPage($param) + { + $skipSize = ($param['page'] - 1) * $param['limit']; + $limitSize = $param['limit']; + $pageStr = ".skip(" . $skipSize . ").limit(" . $limitSize . ")"; + + return $pageStr; + + } + + private static function getIdentityQuery($param) + { + $where = ""; + if ($param['name']) { + $condition = array(); + if ($param['name']) { + $condition['real_name'] = $param['name']; + } + if ($param['phone']) { + $condition['phone'] = $param['phone']; + } + + $where = ".where(" . json_encode($condition) . ")"; + } + + return $where; + } + + private static function getMemberQuery($param) + { + $where = ""; + if ($param['nickname'] || $param['phone']) { + $condition = array(); + if ($param['nickname']) { + $condition['nickname'] = $param['nickname']; + } + if ($param['phone']) { + $condition['phone'] = $param['phone']; + } + $where = ".where(" . json_encode($condition) . ")"; + } + + return $where; + } + + private static function getDailyCheckQuery($param) + { + $where = ""; + if ($param['deviceId'] || $param['kindType']) { + $condition = array(); + if ($param['deviceId']) { + $condition['device_id'] = $param['deviceId']; + } + if ($param['kindType']) { + $condition['kind_type'] = intval($param['kindType']); + } + $where = ".where(" . json_encode($condition) . ")"; + } + + return $where; + } + + private static function getDeviceQuery($param) + { + $where = ""; + if ($param['name'] || $param['model_type'] || $param['company_code'] || $param['device_code']) { + $condition = array(); + if ($param['name']) { + $condition['name'] = $param['name']; + } + if ($param['model_type']) { + $condition['model_type'] = $param['model_type']; + } + if ($param['company_code']) { + $condition['company_code'] = $param['company_code']; + } + if ($param['device_code']) { + $condition['device_code'] = $param['device_code']; + } + $where = ".where(" . json_encode($condition) . ")"; + } + + return $where; + } + + private static function getDeviceTypeQuery($param) + { + $where = ""; + if ($param['name'] || $param['company_code'] || $param['device_code']) { + $condition = array(); + if ($param['name']) { + $condition['name'] = $param['name']; + } + if ($param['company_code']) { + $condition['company_code'] = $param['company_code']; + } + if ($param['device_code']) { + $condition['device_code'] = $param['device_code']; + } + $where = ".where(" . json_encode($condition) . ")"; + } + + return $where; + } + + + public static function findCompanyList() + { + $query = "db.collection('bs_company').limit(100).get()"; + $url = self::$http_api_url . getAccessToken(); + $obj = new class + { + }; + $obj->env = self::$env; + $obj->query = $query; + $data = json_encode($obj); + + return httpRequest($url, $data); + } + + public static function findDeviceList() + { + // limit 默认10条,这里设置为1000条 + $query = "db.collection('bs_device').limit(1000).orderBy('createTime', 'desc').get()"; + $url = self::$http_api_url . getAccessToken(); + $obj = new class + { + }; + $obj->env = self::$env; + $obj->query = $query; + $data = json_encode($obj); + + return httpRequest($url, $data); + } + + public static function findTypeList() + { + // limit 默认10条,这里设置为100条 + $query = "db.collection('bs_device_type').limit(100).orderBy('createTime', 'desc').get()"; + $url = self::$http_api_url . getAccessToken(); + $obj = new class + { + }; + $obj->env = self::$env; + $obj->query = $query; + $data = json_encode($obj); + + return httpRequest($url, $data); + } + + + public static function databaseAdd($collection, array $dataObj) + { + $url = self::$HTTPAPI_DATABASE_ADD . getAccessToken(); + try { + $modelObj = new class{}; + $modelObj->data = $dataObj; + $query = "db.collection('" . $collection . "').add(" . json_encode($modelObj) . ")"; + // TODO: 如果是巡检计划 & 保养计划的表,则更新设备状态值 + if (strcmp($collection, 'bs_daily_check') == 0) { + // 1 更加设备Id 查询设备记录 + // 2 检查是否存在字段dailyCheckState,不存在则添加,否则更新。 + $collection = "bs_device"; + $id = $dataObj['device_id']; + $kindType = $dataObj['kind_type']; + self::updateDeviceDailyCheckState($collection,$id,$kindType); + } + + $obj = new class{}; + $obj->env = self::$env; + $obj->query = $query;// $param['query']; + $data = json_encode($obj); + } catch (Exception $e) { + echo $e->getMessage(); + } + + httpRequest($url, $data); + } + + public static function dailyCheckAdd($collection, array $dataObj) + { + $ids = $dataObj['device_id']; + $idsLength = count($ids); + for ($x = 0; $x < $idsLength; $x++) { + $id = $ids[$x]; + $dataObj['device_id'] = $id; + + self::dailyCheckAddOne($collection,$dataObj); + } + } + + public static function dailyCheckAddOne($collection, array $dataObj) + { + $url = self::$HTTPAPI_DATABASE_ADD . getAccessToken(); + try { + $modelObj = new class{}; + $modelObj->data = $dataObj; + $query = "db.collection('" . $collection . "').add(" . json_encode($modelObj) . ")"; + /* + * 如果是巡检计划 & 保养计划的表,则更新设备状态值 + * 1 更加设备Id 查询设备记录 + * 2 检查是否存在字段dailyCheckState,不存在则添加,否则更新。 + */ + $collection = "bs_device"; + $id = $dataObj['device_id']; + $kindType = $dataObj['kind_type']; + self::updateDeviceDailyCheckState($collection,$id,$kindType); + + $obj = new class{}; + $obj->env = self::$env; + $obj->query = $query;// $param['query']; + $data = json_encode($obj); + } catch (Exception $e) { + echo $e->getMessage(); + } + + httpRequest($url, $data); + } + + + + private static function updateDeviceDailyCheckState($collection,$id,$kindType) { + $url = self::$HTTPAPI_DATABASE_UPDATE . getAccessToken(); + $dataObj = array( + 'daily_check_1_state' => 1, + 'daily_check1_num' => 1 + ); + if ($kindType == 2) { + $dataObj = array( + 'daily_check_2_state' => 1, + 'daily_check2_num' => 1 + ); + } + try { + $modelObj = new class{}; + $modelObj->data = $dataObj; + $query = "db.collection('" . $collection . "').where({_id:'" . $id . "'}).update(" . json_encode($modelObj) . ")"; + + $obj = new class{}; + $obj->env = self::$env; + $obj->query = $query;// $param['query']; + $data = json_encode($obj); + } catch (Exception $e) { + echo $e->getMessage(); + } + + httpRequest($url, $data); + + } + + public static function databaseUpdate($collection, $dataObj) + { + $url = self::$HTTPAPI_DATABASE_UPDATE . getAccessToken(); + try { + $modelObj = new class{}; + $modelObj->data = $dataObj; + $query = "db.collection('" . $collection . "').where({_id:'" . $dataObj['_id'] . "'}).update(" . json_encode($modelObj) . ")"; + + $obj = new class{}; + $obj->env = self::$env; + $obj->query = $query;// $param['query']; + $data = json_encode($obj); + } catch (Exception $e) { + echo $e->getMessage(); + } + + httpRequest($url, $data); + } + + + public static function batchUpdateCompany($collection, $param) + { + $ids = $param['ids']; + $idsLength = count($ids); + $company_code = $param['company_code']; + $company_name = $param['company_name']; + // TODO:遍历ids,更新公司 + for ($x = 0; $x < $idsLength; $x++) { + $id = $ids[$x]; + $obj = array(); + $obj['id'] = $id; + $obj['company_code'] = $company_code; + $obj['company_name'] = $company_name; + self::updateDeviceType($collection,$obj); + } + + + } + public static function updateDeviceType($collection, $dataObj) { + $url = self::$HTTPAPI_DATABASE_UPDATE . getAccessToken(); + try { + $modelObj = new class{}; + $modelObj->data = $dataObj; + $query = "db.collection('" . $collection . "').where({_id:'" . $dataObj['id'] . "'}).update(" . json_encode($modelObj) . ")"; + + $obj = new class{}; + $obj->env = self::$env; + $obj->query = $query;// $param['query']; + $data = json_encode($obj); + } catch (Exception $e) { + echo $e->getMessage(); + } + + httpRequest($url,$data); + } + + public static function databaseDelete($collection, array $dataObj) + { + $url = self::$HTTPAPI_DATABASE_DELETE . getAccessToken(); + try { + $modelObj = new class{}; + $modelObj->data = $dataObj; + $query = "db.collection('" . $collection . "').where({_id:'" . $dataObj['_id'] . "'}).remove()"; + + $obj = new class{}; + $obj->env = self::$env; + $obj->query = $query; + $data = json_encode($obj); + } catch (Exception $e) { + echo $e->getMessage(); + } + + httpRequest($url, $data); + + // 更新设备表中的状态 + if (strcmp($collection, 'bs_daily_check') == 0) { + $collection = "bs_device"; + $id = $dataObj['device_id']; + $kindType = $dataObj['kind_type']; + self::updateDeviceDailyCheckState2($collection,$id,$kindType); + } + + } + + private static function updateDeviceDailyCheckState2($collection,$id,$kindType) { + $url = self::$HTTPAPI_DATABASE_UPDATE . getAccessToken(); + $dataObj = array( + 'daily_check_1_state' => 0, + 'daily_check1_num' => 1 + ); + if ($kindType == 2) { + $dataObj = array( + 'daily_check_2_state' => 0, + 'daily_check2_num' => 1 + ); + } + try { + $modelObj = new class{}; + $modelObj->data = $dataObj; + $query = "db.collection('" . $collection . "').where({_id:'" . $id . "'}).update(" . json_encode($modelObj) . ")"; + + $obj = new class{}; + $obj->env = self::$env; + $obj->query = $query;// $param['query']; + $data = json_encode($obj); + } catch (Exception $e) { + echo $e->getMessage(); + } + + httpRequest($url, $data); + + } + +} diff --git a/app/service/CompanyService.php b/app/service/CompanyService.php new file mode 100644 index 0000000..f298b61 --- /dev/null +++ b/app/service/CompanyService.php @@ -0,0 +1,15 @@ +save(); + } + + public static function update(array $data) + { + $user = UserModel::find($data['id']); + return $user->save($data); + } + + public static function delete(array $data) + { + Db::name('sys_user')->where('id', $data['id'])->delete(); + + } + + + public static function findList() + { + //分页查询 构造分页数据 定义一个分页类 + $list = Db::table('sys_user')->page(1, 10)->select(); //Db::find(1)->paginate(1,10); + return $list; + } + +} diff --git a/composer.json b/composer.json index 387c8b6..6fee5a2 100644 --- a/composer.json +++ b/composer.json @@ -17,12 +17,16 @@ { "name": "yunwuxin", "email": "448901948@qq.com" - } + } ], "require": { "php": ">=7.1.0", "topthink/framework": "^6.0.0", - "topthink/think-orm": "^2.0" + "topthink/think-orm": "^2.0", + "endroid/qrcode": "^3.7", + "alibabacloud/client": "^1.5", + "endroid/qr-code": "^3.7", + "qcloud/cos-sdk-v5": ">=2.0" }, "require-dev": { "symfony/var-dumper": "^4.2", @@ -44,5 +48,11 @@ "@php think service:discover", "@php think vendor:publish" ] + }, + "repositories": { + "packagist": { + "type": "composer", + "url": "https://packagist.phpcomposer.com" + } } } diff --git a/composer.lock b/composer.lock index bdec3cf..001844a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,172 +4,1689 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "74a749574e0f40df27b0061a71e2b878", + "content-hash": "714e490b67f212d3bda8ec1ca416b517", "packages": [ + { + "name": "adbario/php-dot-notation", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/adbario/php-dot-notation.git", + "reference": "eee4fc81296531e6aafba4c2bbccfc5adab1676e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/adbario/php-dot-notation/zipball/eee4fc81296531e6aafba4c2bbccfc5adab1676e", + "reference": "eee4fc81296531e6aafba4c2bbccfc5adab1676e", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.0|^5.0|^6.0", + "squizlabs/php_codesniffer": "^3.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Adbar\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Riku Särkinen", + "email": "riku@adbar.io" + } + ], + "description": "PHP dot notation access to arrays", + "homepage": "https://github.com/adbario/php-dot-notation", + "keywords": [ + "ArrayAccess", + "dotnotation" + ], + "time": "2019-01-01T23:59:15+00:00" + }, + { + "name": "alibabacloud/client", + "version": "1.5.21", + "source": { + "type": "git", + "url": "https://github.com/aliyun/openapi-sdk-php-client.git", + "reference": "a11d68d90d50d2bde46c3a656eef5e0563c08b69" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aliyun/openapi-sdk-php-client/zipball/a11d68d90d50d2bde46c3a656eef5e0563c08b69", + "reference": "a11d68d90d50d2bde46c3a656eef5e0563c08b69", + "shasum": "" + }, + "require": { + "adbario/php-dot-notation": "^2.2", + "clagiordano/weblibs-configmanager": "^1.0", + "danielstjules/stringy": "^3.1", + "ext-curl": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-simplexml": "*", + "ext-xmlwriter": "*", + "guzzlehttp/guzzle": "^6.3", + "mtdowling/jmespath.php": "^2.4", + "php": ">=5.5" + }, + "require-dev": { + "composer/composer": "^1.8", + "drupal/coder": "^8.3", + "ext-dom": "*", + "ext-pcre": "*", + "ext-sockets": "*", + "ext-spl": "*", + "league/climate": "^3.2.4", + "mikey179/vfsstream": "^1.6", + "monolog/monolog": "^1.24", + "phpunit/phpunit": "^4.8.35|^5.4.3", + "psr/cache": "^1.0", + "symfony/dotenv": "^3.4", + "symfony/var-dumper": "^3.4" + }, + "suggest": { + "ext-sockets": "To use client-side monitoring" + }, + "type": "library", + "autoload": { + "psr-4": { + "AlibabaCloud\\Client\\": "src" + }, + "files": [ + "src/Functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Alibaba Cloud SDK", + "email": "sdk-team@alibabacloud.com", + "homepage": "http://www.alibabacloud.com" + } + ], + "description": "Alibaba Cloud Client for PHP - Use Alibaba Cloud in your PHP project", + "homepage": "https://www.alibabacloud.com/", + "keywords": [ + "alibaba", + "alibabacloud", + "aliyun", + "client", + "cloud", + "library", + "sdk", + "tool" + ], + "time": "2020-02-26T04:39:45+00:00" + }, + { + "name": "bacon/bacon-qr-code", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/Bacon/BaconQrCode.git", + "reference": "eaac909da3ccc32b748a65b127acd8918f58d9b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/eaac909da3ccc32b748a65b127acd8918f58d9b0", + "reference": "eaac909da3ccc32b748a65b127acd8918f58d9b0", + "shasum": "" + }, + "require": { + "dasprid/enum": "^1.0", + "ext-iconv": "*", + "php": "^7.1" + }, + "require-dev": { + "phly/keep-a-changelog": "^1.4", + "phpunit/phpunit": "^6.4", + "squizlabs/php_codesniffer": "^3.1" + }, + "suggest": { + "ext-imagick": "to generate QR code images" + }, + "type": "library", + "autoload": { + "psr-4": { + "BaconQrCode\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Ben Scholzen 'DASPRiD'", + "email": "mail@dasprids.de", + "homepage": "http://www.dasprids.de", + "role": "Developer" + } + ], + "description": "BaconQrCode is a QR code generator for PHP.", + "homepage": "https://github.com/Bacon/BaconQrCode", + "time": "2018-04-25T17:53:56+00:00" + }, + { + "name": "clagiordano/weblibs-configmanager", + "version": "v1.0.7", + "source": { + "type": "git", + "url": "https://github.com/clagiordano/weblibs-configmanager.git", + "reference": "6ef4c27354368deb2f54b39bbe06601da8c873a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clagiordano/weblibs-configmanager/zipball/6ef4c27354368deb2f54b39bbe06601da8c873a0", + "reference": "6ef4c27354368deb2f54b39bbe06601da8c873a0", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "clagiordano/phpunit-result-printer": "^1", + "phpunit/phpunit": "^4.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "clagiordano\\weblibs\\configmanager\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Claudio Giordano", + "email": "claudio.giordano@autistici.org", + "role": "Developer" + } + ], + "description": "weblibs-configmanager is a tool library for easily read and access to php config array file and direct read/write configuration file / object", + "keywords": [ + "clagiordano", + "configuration", + "manager", + "tool", + "weblibs" + ], + "time": "2019-09-25T22:10:10+00:00" + }, + { + "name": "danielstjules/stringy", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/danielstjules/Stringy.git", + "reference": "df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/danielstjules/Stringy/zipball/df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e", + "reference": "df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Stringy\\": "src/" + }, + "files": [ + "src/Create.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel St. Jules", + "email": "danielst.jules@gmail.com", + "homepage": "http://www.danielstjules.com" + } + ], + "description": "A string manipulation library with multibyte support", + "homepage": "https://github.com/danielstjules/Stringy", + "keywords": [ + "UTF", + "helpers", + "manipulation", + "methods", + "multibyte", + "string", + "utf-8", + "utility", + "utils" + ], + "time": "2017-06-12T01:10:27+00:00" + }, + { + "name": "dasprid/enum", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/DASPRiD/Enum.git", + "reference": "631ef6e638e9494b0310837fa531bedd908fc22b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/631ef6e638e9494b0310837fa531bedd908fc22b", + "reference": "631ef6e638e9494b0310837fa531bedd908fc22b", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "^6.4", + "squizlabs/php_codesniffer": "^3.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DASPRiD\\Enum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Ben Scholzen 'DASPRiD'", + "email": "mail@dasprids.de", + "homepage": "https://dasprids.de/" + } + ], + "description": "PHP 7.1 enum implementation", + "keywords": [ + "enum", + "map" + ], + "time": "2017-10-25T22:45:27+00:00" + }, + { + "name": "endroid/qr-code", + "version": "3.7.7", + "source": { + "type": "git", + "url": "https://github.com/endroid/qr-code.git", + "reference": "bfb64f163628b59ba250a6a1da95b6252b5718c3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/endroid/qr-code/zipball/bfb64f163628b59ba250a6a1da95b6252b5718c3", + "reference": "bfb64f163628b59ba250a6a1da95b6252b5718c3", + "shasum": "" + }, + "require": { + "bacon/bacon-qr-code": "^2.0", + "ext-gd": "*", + "khanamiryan/qrcode-detector-decoder": "^1.0.2", + "myclabs/php-enum": "^1.5", + "php": ">=7.2", + "symfony/http-foundation": "^3.4||^4.2.12||^5.0", + "symfony/options-resolver": "^3.4||^4.0||^5.0", + "symfony/property-access": "^3.4||^4.0||^5.0" + }, + "require-dev": { + "endroid/test": "dev-master" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Endroid\\QrCode\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeroen van den Enden", + "email": "info@endroid.nl" + } + ], + "description": "Endroid QR Code", + "homepage": "https://github.com/endroid/qr-code", + "keywords": [ + "bundle", + "code", + "endroid", + "php", + "qr", + "qrcode" + ], + "time": "2020-03-10T08:32:43+00:00" + }, + { + "name": "endroid/qrcode", + "version": "3.7.7", + "source": { + "type": "git", + "url": "https://github.com/endroid/qr-code.git", + "reference": "bfb64f163628b59ba250a6a1da95b6252b5718c3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/endroid/qr-code/zipball/bfb64f163628b59ba250a6a1da95b6252b5718c3", + "reference": "bfb64f163628b59ba250a6a1da95b6252b5718c3", + "shasum": "" + }, + "require": { + "bacon/bacon-qr-code": "^2.0", + "ext-gd": "*", + "khanamiryan/qrcode-detector-decoder": "^1.0.2", + "myclabs/php-enum": "^1.5", + "php": ">=7.2", + "symfony/http-foundation": "^3.4||^4.2.12||^5.0", + "symfony/options-resolver": "^3.4||^4.0||^5.0", + "symfony/property-access": "^3.4||^4.0||^5.0" + }, + "require-dev": { + "endroid/test": "dev-master" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Endroid\\QrCode\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeroen van den Enden", + "email": "info@endroid.nl" + } + ], + "description": "Endroid QR Code", + "homepage": "https://github.com/endroid/qr-code", + "keywords": [ + "bundle", + "code", + "endroid", + "php", + "qr", + "qrcode" + ], + "abandoned": "endroid/qr-code", + "time": "2020-03-10T08:32:43+00:00" + }, + { + "name": "guzzlehttp/command", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/command.git", + "reference": "2aaa2521a8f8269d6f5dfc13fe2af12c76921034" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/command/zipball/2aaa2521a8f8269d6f5dfc13fe2af12c76921034", + "reference": "2aaa2521a8f8269d6f5dfc13fe2af12c76921034", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^6.2", + "guzzlehttp/promises": "~1.3", + "guzzlehttp/psr7": "~1.0", + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.9-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Command\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + } + ], + "description": "Provides the foundation for building command-based web service clients", + "time": "2016-11-24T13:34:15+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "6.5.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "aab4ebd862aa7d04f01a4b51849d657db56d882e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/aab4ebd862aa7d04f01a4b51849d657db56d882e", + "reference": "aab4ebd862aa7d04f01a4b51849d657db56d882e", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.6.1", + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.11" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.1" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.5-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2020-04-18T10:38:46+00:00" + }, + { + "name": "guzzlehttp/guzzle-services", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle-services.git", + "reference": "9e3abf20161cbf662d616cbb995f2811771759f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle-services/zipball/9e3abf20161cbf662d616cbb995f2811771759f7", + "reference": "9e3abf20161cbf662d616cbb995f2811771759f7", + "shasum": "" + }, + "require": { + "guzzlehttp/command": "~1.0", + "guzzlehttp/guzzle": "^6.2", + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "gimler/guzzle-description-loader": "^0.0.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Command\\Guzzle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "Stefano Kowalke", + "email": "blueduck@mail.org", + "homepage": "https://github.com/konafets" + } + ], + "description": "Provides an implementation of the Guzzle Command library that uses Guzzle service descriptions to describe web services, serialize requests, and parse responses into easy to use model structures.", + "time": "2017-10-06T14:32:02+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20T10:07:11+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + }, + "suggest": { + "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2019-07-01T23:21:34+00:00" + }, + { + "name": "khanamiryan/qrcode-detector-decoder", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/khanamiryan/php-qrcode-detector-decoder.git", + "reference": "89b57f2d9939dd57394b83f6ccbd3e1a74659e34" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/89b57f2d9939dd57394b83f6ccbd3e1a74659e34", + "reference": "89b57f2d9939dd57394b83f6ccbd3e1a74659e34", + "shasum": "" + }, + "require": { + "php": "^5.6|^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Zxing\\": "lib/" + }, + "files": [ + "lib/Common/customFunctions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ashot Khanamiryan", + "email": "a.khanamiryan@gmail.com", + "homepage": "https://github.com/khanamiryan", + "role": "Developer" + } + ], + "description": "QR code decoder / reader", + "homepage": "https://github.com/khanamiryan/php-qrcode-detector-decoder/", + "keywords": [ + "barcode", + "qr", + "zxing" + ], + "time": "2020-04-19T16:18:51+00:00" + }, { "name": "league/flysystem", - "version": "1.0.64", + "version": "1.0.67", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "5b1f36c75c4bdde981294c2a0ebdb437ee6f275e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/5b1f36c75c4bdde981294c2a0ebdb437ee6f275e", + "reference": "5b1f36c75c4bdde981294c2a0ebdb437ee6f275e", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": ">=5.5.9" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "require-dev": { + "phpspec/phpspec": "^3.4", + "phpunit/phpunit": "^5.7.26" + }, + "suggest": { + "ext-fileinfo": "Required for MimeType", + "ext-ftp": "Allows you to use FTP server storage", + "ext-openssl": "Allows you to use FTPS server storage", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", + "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", + "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "Cloud Files", + "WebDAV", + "abstraction", + "aws", + "cloud", + "copy.com", + "dropbox", + "file systems", + "files", + "filesystem", + "filesystems", + "ftp", + "rackspace", + "remote", + "s3", + "sftp", + "storage" + ], + "time": "2020-04-16T13:21:26+00:00" + }, + { + "name": "league/flysystem-cached-adapter", + "version": "1.0.9", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-cached-adapter.git", + "reference": "08ef74e9be88100807a3b92cc9048a312bf01d6f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-cached-adapter/zipball/08ef74e9be88100807a3b92cc9048a312bf01d6f", + "reference": "08ef74e9be88100807a3b92cc9048a312bf01d6f", + "shasum": "" + }, + "require": { + "league/flysystem": "~1.0", + "psr/cache": "^1.0.0" + }, + "require-dev": { + "mockery/mockery": "~0.9", + "phpspec/phpspec": "^3.4", + "phpunit/phpunit": "^5.7", + "predis/predis": "~1.0", + "tedivm/stash": "~0.12" + }, + "suggest": { + "ext-phpredis": "Pure C implemented extension for PHP" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\Cached\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "frankdejonge", + "email": "info@frenky.net" + } + ], + "description": "An adapter decorator to enable meta-data caching.", + "time": "2018-07-09T20:51:04+00:00" + }, + { + "name": "mtdowling/jmespath.php", + "version": "2.5.0", + "source": { + "type": "git", + "url": "https://github.com/jmespath/jmespath.php.git", + "reference": "52168cb9472de06979613d365c7f1ab8798be895" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/52168cb9472de06979613d365c7f1ab8798be895", + "reference": "52168cb9472de06979613d365c7f1ab8798be895", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "symfony/polyfill-mbstring": "^1.4" + }, + "require-dev": { + "composer/xdebug-handler": "^1.2", + "phpunit/phpunit": "^4.8.36|^7.5.15" + }, + "bin": [ + "bin/jp.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-4": { + "JmesPath\\": "src/" + }, + "files": [ + "src/JmesPath.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Declaratively specify how to extract elements from a JSON document", + "keywords": [ + "json", + "jsonpath" + ], + "time": "2019-12-30T18:03:34+00:00" + }, + { + "name": "myclabs/php-enum", + "version": "1.7.6", + "source": { + "type": "git", + "url": "https://github.com/myclabs/php-enum.git", + "reference": "5f36467c7a87e20fbdc51e524fd8f9d1de80187c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/php-enum/zipball/5f36467c7a87e20fbdc51e524fd8f9d1de80187c", + "reference": "5f36467c7a87e20fbdc51e524fd8f9d1de80187c", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7", + "squizlabs/php_codesniffer": "1.*", + "vimeo/psalm": "^3.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "MyCLabs\\Enum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP Enum contributors", + "homepage": "https://github.com/myclabs/php-enum/graphs/contributors" + } + ], + "description": "PHP Enum implementation", + "homepage": "http://github.com/myclabs/php-enum", + "keywords": [ + "enum" + ], + "time": "2020-02-14T08:15:52+00:00" + }, + { + "name": "opis/closure", + "version": "3.5.1", + "source": { + "type": "git", + "url": "https://github.com/opis/closure.git", + "reference": "93ebc5712cdad8d5f489b500c59d122df2e53969" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/opis/closure/zipball/93ebc5712cdad8d5f489b500c59d122df2e53969", + "reference": "93ebc5712cdad8d5f489b500c59d122df2e53969", + "shasum": "" + }, + "require": { + "php": "^5.4 || ^7.0" + }, + "require-dev": { + "jeremeamia/superclosure": "^2.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.5.x-dev" + } + }, + "autoload": { + "psr-4": { + "Opis\\Closure\\": "src/" + }, + "files": [ + "functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marius Sarca", + "email": "marius.sarca@gmail.com" + }, + { + "name": "Sorin Sarca", + "email": "sarca_sorin@hotmail.com" + } + ], + "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.", + "homepage": "https://opis.io/closure", + "keywords": [ + "anonymous functions", + "closure", + "function", + "serializable", + "serialization", + "serialize" + ], + "time": "2019-11-29T22:36:02+00:00" + }, + { + "name": "psr/cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "time": "2016-08-06T20:24:11+00:00" + }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2017-02-14T16:28:37+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "psr/log", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2020-03-23T09:12:05+00:00" + }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-10-23T01:57:42+00:00" + }, + { + "name": "qcloud/cos-sdk-v5", + "version": "v2.0.8", "source": { "type": "git", - "url": "https://github.com/thephpleague/flysystem.git", - "reference": "d13c43dbd4b791f815215959105a008515d1a2e0" + "url": "https://github.com/tencentyun/cos-php-sdk-v5.git", + "reference": "9d9471397fd4712e9b35adf819a9f2e28b91d079" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/d13c43dbd4b791f815215959105a008515d1a2e0", - "reference": "d13c43dbd4b791f815215959105a008515d1a2e0", + "url": "https://api.github.com/repos/tencentyun/cos-php-sdk-v5/zipball/9d9471397fd4712e9b35adf819a9f2e28b91d079", + "reference": "9d9471397fd4712e9b35adf819a9f2e28b91d079", "shasum": "" }, "require": { - "ext-fileinfo": "*", - "php": ">=5.5.9" + "guzzlehttp/guzzle": "~6.3", + "guzzlehttp/guzzle-services": "~1.1", + "php": ">=5.3.0" }, - "conflict": { - "league/flysystem-sftp": "<1.0.6" + "type": "library", + "autoload": { + "psr-0": { + "Qcloud\\Cos\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "yaozongyou", + "email": "yaozongyou@vip.qq.com" + }, + { + "name": "lewzylu", + "email": "327874225@qq.com" + } + ], + "description": "PHP SDK for QCloud COS", + "keywords": [ + "cos", + "php", + "qcloud" + ], + "time": "2020-04-21T01:45:23+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" }, "require-dev": { - "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7.26" + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" }, - "suggest": { - "ext-fileinfo": "Required for MimeType", - "ext-ftp": "Allows you to use FTP server storage", - "ext-openssl": "Allows you to use FTPS server storage", - "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", - "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", - "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", - "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", - "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", - "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", - "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", - "league/flysystem-webdav": "Allows you to use WebDAV storage", - "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", - "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", - "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "v5.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "26fb006a2c7b6cdd23d52157b05f8414ffa417b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/26fb006a2c7b6cdd23d52157b05f8414ffa417b6", + "reference": "26fb006a2c7b6cdd23d52157b05f8414ffa417b6", + "shasum": "" + }, + "require": { + "php": "^7.2.5", + "symfony/mime": "^4.4|^5.0", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "predis/predis": "~1.0", + "symfony/expression-language": "^4.4|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "5.0-dev" } }, "autoload": { "psr-4": { - "League\\Flysystem\\": "src/" + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony HttpFoundation Component", + "homepage": "https://symfony.com", + "time": "2020-03-30T14:14:32+00:00" + }, + { + "name": "symfony/inflector", + "version": "v5.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/inflector.git", + "reference": "70c25c66427e2bb6ba0827d668366d60b0a90cbf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/inflector/zipball/70c25c66427e2bb6ba0827d668366d60b0a90cbf", + "reference": "70c25c66427e2bb6ba0827d668366d60b0a90cbf", + "shasum": "" + }, + "require": { + "php": "^7.2.5", + "symfony/polyfill-ctype": "~1.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" } }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Inflector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { - "name": "Frank de Jonge", - "email": "info@frenky.net" + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Filesystem abstraction: Many filesystems, one API.", + "description": "Symfony Inflector Component", + "homepage": "https://symfony.com", "keywords": [ - "Cloud Files", - "WebDAV", - "abstraction", - "aws", - "cloud", - "copy.com", - "dropbox", - "file systems", - "files", - "filesystem", - "filesystems", - "ftp", - "rackspace", - "remote", - "s3", - "sftp", - "storage" + "inflection", + "pluralize", + "singularize", + "string", + "symfony", + "words" ], - "time": "2020-02-05T18:14:17+00:00" + "time": "2020-03-27T16:56:45+00:00" }, { - "name": "league/flysystem-cached-adapter", - "version": "1.0.9", + "name": "symfony/mime", + "version": "v5.0.7", "source": { "type": "git", - "url": "https://github.com/thephpleague/flysystem-cached-adapter.git", - "reference": "08ef74e9be88100807a3b92cc9048a312bf01d6f" + "url": "https://github.com/symfony/mime.git", + "reference": "481b7d6da88922fb1e0d86a943987722b08f3955" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-cached-adapter/zipball/08ef74e9be88100807a3b92cc9048a312bf01d6f", - "reference": "08ef74e9be88100807a3b92cc9048a312bf01d6f", + "url": "https://api.github.com/repos/symfony/mime/zipball/481b7d6da88922fb1e0d86a943987722b08f3955", + "reference": "481b7d6da88922fb1e0d86a943987722b08f3955", "shasum": "" }, "require": { - "league/flysystem": "~1.0", - "psr/cache": "^1.0.0" + "php": "^7.2.5", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" }, - "require-dev": { - "mockery/mockery": "~0.9", - "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7", - "predis/predis": "~1.0", - "tedivm/stash": "~0.12" + "conflict": { + "symfony/mailer": "<4.4" }, - "suggest": { - "ext-phpredis": "Pure C implemented extension for PHP" + "require-dev": { + "egulias/email-validator": "^2.1.10", + "symfony/dependency-injection": "^4.4|^5.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, "autoload": { "psr-4": { - "League\\Flysystem\\Cached\\": "src/" + "Symfony\\Component\\Mime\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A library to manipulate MIME messages", + "homepage": "https://symfony.com", + "keywords": [ + "mime", + "mime-type" + ], + "time": "2020-03-27T16:56:45+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v5.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "09dccfffd24b311df7f184aa80ee7b61ad61ed8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/09dccfffd24b311df7f184aa80ee7b61ad61ed8d", + "reference": "09dccfffd24b311df7f184aa80ee7b61ad61ed8d", + "shasum": "" + }, + "require": { + "php": "^7.2.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" } }, + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { - "name": "frankdejonge", - "email": "info@frenky.net" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "An adapter decorator to enable meta-data caching.", - "time": "2018-07-09T20:51:04+00:00" + "description": "Symfony OptionsResolver Component", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "time": "2020-03-27T16:56:45+00:00" }, { - "name": "opis/closure", - "version": "3.5.1", + "name": "symfony/polyfill-ctype", + "version": "v1.15.0", "source": { "type": "git", - "url": "https://github.com/opis/closure.git", - "reference": "93ebc5712cdad8d5f489b500c59d122df2e53969" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/93ebc5712cdad8d5f489b500c59d122df2e53969", - "reference": "93ebc5712cdad8d5f489b500c59d122df2e53969", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14", + "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14", "shasum": "" }, "require": { - "php": "^5.4 || ^7.0" + "php": ">=5.3.3" }, - "require-dev": { - "jeremeamia/superclosure": "^2.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "suggest": { + "ext-ctype": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.5.x-dev" + "dev-master": "1.15-dev" } }, "autoload": { "psr-4": { - "Opis\\Closure\\": "src/" + "Symfony\\Polyfill\\Ctype\\": "" }, "files": [ - "functions.php" + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -178,53 +1695,59 @@ ], "authors": [ { - "name": "Marius Sarca", - "email": "marius.sarca@gmail.com" + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" }, { - "name": "Sorin Sarca", - "email": "sarca_sorin@hotmail.com" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.", - "homepage": "https://opis.io/closure", + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", "keywords": [ - "anonymous functions", - "closure", - "function", - "serializable", - "serialization", - "serialize" + "compatibility", + "ctype", + "polyfill", + "portable" ], - "time": "2019-11-29T22:36:02+00:00" + "time": "2020-02-27T09:26:54+00:00" }, { - "name": "psr/cache", - "version": "1.0.1", + "name": "symfony/polyfill-intl-idn", + "version": "v1.15.0", "source": { "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf", + "reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=5.3.3", + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php72": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.15-dev" } }, "autoload": { "psr-4": { - "Psr\\Cache\\": "src/" - } + "Symfony\\Polyfill\\Intl\\Idn\\": "" + }, + "files": [ + "bootstrap.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -232,45 +1755,59 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Common interface for caching libraries", + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", "keywords": [ - "cache", - "psr", - "psr-6" + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" ], - "time": "2016-08-06T20:24:11+00:00" + "time": "2020-03-09T19:04:49+00:00" }, { - "name": "psr/container", - "version": "1.0.0", + "name": "symfony/polyfill-mbstring", + "version": "v1.15.0", "source": { "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac", + "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.15-dev" } }, "autoload": { "psr-4": { - "Psr\\Container\\": "src/" - } + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -278,48 +1815,55 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" ], - "time": "2017-02-14T16:28:37+00:00" + "time": "2020-03-09T19:04:49+00:00" }, { - "name": "psr/log", - "version": "1.1.2", + "name": "symfony/polyfill-php72", + "version": "v1.15.0", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801" + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "37b0976c78b94856543260ce09b460a7bc852747" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/37b0976c78b94856543260ce09b460a7bc852747", + "reference": "37b0976c78b94856543260ce09b460a7bc852747", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=5.3.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "1.15-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -327,46 +1871,61 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", "keywords": [ - "log", - "psr", - "psr-3" + "compatibility", + "polyfill", + "portable", + "shim" ], - "time": "2019-11-01T11:05:21+00:00" + "time": "2020-02-27T09:26:54+00:00" }, { - "name": "psr/simple-cache", - "version": "1.0.1", + "name": "symfony/property-access", + "version": "v5.0.7", "source": { "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + "url": "https://github.com/symfony/property-access.git", + "reference": "6b14bd5e184fc3bbbd35e378692c61af765515b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "url": "https://api.github.com/repos/symfony/property-access/zipball/6b14bd5e184fc3bbbd35e378692c61af765515b8", + "reference": "6b14bd5e184fc3bbbd35e378692c61af765515b8", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^7.2.5", + "symfony/inflector": "^4.4|^5.0" + }, + "require-dev": { + "symfony/cache": "^4.4|^5.0" + }, + "suggest": { + "psr/cache-implementation": "To cache access methods." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "5.0-dev" } }, "autoload": { "psr-4": { - "Psr\\SimpleCache\\": "src/" - } + "Symfony\\Component\\PropertyAccess\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -374,19 +1933,28 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Common interfaces for simple caching", + "description": "Symfony PropertyAccess Component", + "homepage": "https://symfony.com", "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" + "access", + "array", + "extraction", + "index", + "injection", + "object", + "property", + "property path", + "reflection" ], - "time": "2017-10-23T01:57:42+00:00" + "time": "2020-03-27T16:56:45+00:00" }, { "name": "topthink/framework", @@ -452,16 +2020,16 @@ }, { "name": "topthink/think-helper", - "version": "v3.1.3", + "version": "v3.1.4", "source": { "type": "git", "url": "https://github.com/top-think/think-helper.git", - "reference": "4d85dfd3778623bbb1de3648f1dcd0c82f4439f4" + "reference": "c28d37743bda4a0455286ca85b17b5791d626e10" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/think-helper/zipball/4d85dfd3778623bbb1de3648f1dcd0c82f4439f4", - "reference": "4d85dfd3778623bbb1de3648f1dcd0c82f4439f4", + "url": "https://api.github.com/repos/top-think/think-helper/zipball/c28d37743bda4a0455286ca85b17b5791d626e10", + "reference": "c28d37743bda4a0455286ca85b17b5791d626e10", "shasum": "" }, "require": { @@ -487,7 +2055,7 @@ } ], "description": "The ThinkPHP6 Helper Package", - "time": "2019-09-30T02:36:48+00:00" + "time": "2019-11-08T08:01:10+00:00" }, { "name": "topthink/think-orm", @@ -536,132 +2104,18 @@ } ], "packages-dev": [ - { - "name": "symfony/polyfill-mbstring", - "version": "v1.14.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2", - "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.14-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "time": "2020-01-13T11:15:53+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.14.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", - "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.14-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "time": "2020-01-13T11:15:53+00:00" - }, { "name": "symfony/var-dumper", - "version": "v4.4.4", + "version": "v4.4.7", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "46b53fd714568af343953c039ff47b67ce8af8d6" + "reference": "5a0c2d93006131a36cf6f767d10e2ca8333b0d4a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/46b53fd714568af343953c039ff47b67ce8af8d6", - "reference": "46b53fd714568af343953c039ff47b67ce8af8d6", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/5a0c2d93006131a36cf6f767d10e2ca8333b0d4a", + "reference": "5a0c2d93006131a36cf6f767d10e2ca8333b0d4a", "shasum": "" }, "require": { @@ -724,20 +2178,20 @@ "debug", "dump" ], - "time": "2020-01-25T12:44:29+00:00" + "time": "2020-03-27T16:54:36+00:00" }, { "name": "topthink/think-trace", - "version": "v1.2", + "version": "v1.3", "source": { "type": "git", "url": "https://github.com/top-think/think-trace.git", - "reference": "4589d06a07945d57478cc2236f4b23d51ff919cc" + "reference": "d8da2e39df268ab8775013de699f0c3012e51318" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/think-trace/zipball/4589d06a07945d57478cc2236f4b23d51ff919cc", - "reference": "4589d06a07945d57478cc2236f4b23d51ff919cc", + "url": "https://api.github.com/repos/top-think/think-trace/zipball/d8da2e39df268ab8775013de699f0c3012e51318", + "reference": "d8da2e39df268ab8775013de699f0c3012e51318", "shasum": "" }, "require": { @@ -771,7 +2225,7 @@ } ], "description": "thinkphp debug trace", - "time": "2019-10-17T02:14:09+00:00" + "time": "2020-03-18T07:59:53+00:00" } ], "aliases": [], diff --git a/config/api/Aliyun.php b/config/api/Aliyun.php new file mode 100644 index 0000000..a7d2536 --- /dev/null +++ b/config/api/Aliyun.php @@ -0,0 +1,10 @@ +[ + 'AccessKeyId'=>'LTAI4Fs3dT55kRZWnoNps5Yr', + 'AccessKeySecret'=>'4aIgEwn8TqQJMrnkqNdDzAKaZYrk0a', + 'SignName'=>'智慧猪', + 'TemplateCode'=>'SMS_183766457', + ], + "expire_time"=>300 +]; diff --git a/config/app.php b/config/app.php index 1cfaf5c..98a51f6 100644 --- a/config/app.php +++ b/config/app.php @@ -30,5 +30,5 @@ // 错误显示信息,非调试模式有效 'error_message' => '页面错误!请稍后再试~', // 显示错误信息 - 'show_error_msg' => false, + 'show_error_msg' => true, ]; diff --git a/config/auth.php b/config/auth.php new file mode 100644 index 0000000..24f33c2 --- /dev/null +++ b/config/auth.php @@ -0,0 +1,9 @@ + env('auth.expire_time', '3600') +]; diff --git a/config/database.php b/config/database.php index 7b94ac1..f11efe1 100644 --- a/config/database.php +++ b/config/database.php @@ -21,13 +21,13 @@ // 数据库类型 'type' => env('database.type', 'mysql'), // 服务器地址 - 'hostname' => env('database.hostname', '127.0.0.1'), + 'hostname' => env('database.hostname', 'www.innerbboy.cn'), // 数据库名 - 'database' => env('database.database', ''), + 'database' => env('database.database', 'database'), // 用户名 - 'username' => env('database.username', 'root'), + 'username' => env('database.username', 'daiysh'), // 密码 - 'password' => env('database.password', ''), + 'password' => env('database.password', 'dys11481890'), // 端口 'hostport' => env('database.hostport', '3306'), // 数据库连接参数 diff --git a/config/log.php b/config/log.php index ea24ff9..238bf07 100644 --- a/config/log.php +++ b/config/log.php @@ -37,7 +37,7 @@ // 日志输出格式化 'format' => '[%s][%s] %s', // 是否实时写入 - 'realtime_write' => false, + 'realtime_write' => true, ], // 其它日志通道配置 ], diff --git a/config/middleware.php b/config/middleware.php index 7e1972f..f23a0ec 100644 --- a/config/middleware.php +++ b/config/middleware.php @@ -2,7 +2,10 @@ // 中间件配置 return [ // 别名或分组 - 'alias' => [], + 'alias' => [ + 'checkApiLogin' => \app\middleware\CheckApiLogin::class, + 'checkAdminLogin' => \app\middleware\CheckAdminLogin::class + ], // 优先级设置,此数组中的中间件会按照数组中的顺序优先执行 'priority' => [], ]; diff --git a/config/miniapp.php b/config/miniapp.php new file mode 100644 index 0000000..a905b7a --- /dev/null +++ b/config/miniapp.php @@ -0,0 +1,10 @@ + 'wxc429fdf05d591605', + // 用户唯一凭证密钥 + 'secret' => '6d92b57ad1d5137a1c4a3cc7c34f7705' +]; diff --git a/config/route.php b/config/route.php index 955eeec..489afb0 100644 --- a/config/route.php +++ b/config/route.php @@ -42,4 +42,7 @@ 'default_jsonp_handler' => 'jsonpReturn', // 默认JSONP处理方法 'var_jsonp_handler' => 'callback', +// 'middleware' => [ +// app\api\libs\Auth::class +// ], ]; diff --git a/config/smsconfig.php b/config/smsconfig.php new file mode 100644 index 0000000..e4cb23f --- /dev/null +++ b/config/smsconfig.php @@ -0,0 +1,17 @@ + 'dysmsapi.aliyuncs.com', + // accessKeyId + 'accessKeyId' => 'LTAI4Fs3dT55kRZWnoNps5Yr', + // accessSecret + 'accessSecret' => '4aIgEwn8TqQJMrnkqNdDzAKaZYrk0a', + // SignName + 'SignName' => '智慧猪', + // TemplateCode + 'TemplateCode' => 'SMS_183766457' +]; diff --git a/config/wxconfig.php b/config/wxconfig.php new file mode 100644 index 0000000..0dd051a --- /dev/null +++ b/config/wxconfig.php @@ -0,0 +1,18 @@ + 'wxc429fdf05d591605', + // secret + 'secret' => '6d92b57ad1d5137a1c4a3cc7c34f7705', + // getTokenUrl + 'getTokenUrl' => 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential', + // HTTP API 接口地址 + 'httpApiUrl' => 'https://api.weixin.qq.com/tcb', + // Cloud 云环境test + 'env' => 'test-87exc' +]; + diff --git a/readMe.txt b/readMe.txt new file mode 100644 index 0000000..f0dc98b --- /dev/null +++ b/readMe.txt @@ -0,0 +1,3 @@ +// 增加origin 地址 +https://gitee.com/inner_boy/tp6-basic.git +// 增加行数测试 diff --git a/route/app.php b/route/app.php index d8e09e3..7184b54 100644 --- a/route/app.php +++ b/route/app.php @@ -15,3 +15,20 @@ }); Route::get('hello/:name', 'index/hello'); +// +//Route::group('admin',function(){ +// Route::get('device/list','/Device/list'); +//})->middleware('checkApiLogin'); + +// ----- 需要token 验证的接口 +// Route::get('device/list','/Device/list')->middleware('checkApiLogin'); + + + +// ----- 需要验证admin登录的接口 +//Route::group('admin',function(){ +// Route::get('/Device/list'); +//})->middleware('checkAdminLogin'); + +//Route::post('device/index','Device/list')->middleware('checkApiLogin'); + diff --git a/view/README.md b/view/README.md deleted file mode 100644 index 360eb24..0000000 --- a/view/README.md +++ /dev/null @@ -1 +0,0 @@ -如果不使用模板,可以删除该目录 \ No newline at end of file